]> sigrok.org Git - pulseview.git/blobdiff - test/CMakeLists.txt
Fix build on MinGW (boost thread related).
[pulseview.git] / test / CMakeLists.txt
index 13bb6dd6aa1c14c56526204a0c3a657f7911b982..4bac48bb7e6adad769a0210533d18885e8527619 100644 (file)
@@ -29,7 +29,13 @@ endif()
 find_package(PkgConfig)
 pkg_check_modules(PKGDEPS REQUIRED ${PKGDEPS})
 
-find_package(Boost 1.42 COMPONENTS filesystem system unit_test_framework REQUIRED)
+if(WIN32)
+       # On Windows/MinGW we need to use 'thread_win32' instead of 'thread'.
+       # The library is named libboost_thread_win32* (not libboost_thread*).
+       find_package(Boost 1.42 COMPONENTS filesystem system thread_win32 unit_test_framework REQUIRED)
+else()
+       find_package(Boost 1.42 COMPONENTS filesystem system thread unit_test_framework REQUIRED)
+endif()
 
 # Find the platform's thread library (needed for C++11 threads).
 # This will set ${CMAKE_THREAD_LIBS_INIT} to the correct, OS-specific value.