X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=CMakeLists.txt;h=f1e71061059e0eee2344fa51020d26b614ac20d2;hb=649f62311e282c44e70cbf0f0d8d83cf1895e623;hp=49358505fe81dd4891a0fc0c4777cb8b9ca89201;hpb=7591fe238e1be53579819ec97bc0b3b76af8f67e;p=pulseview.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 4935850..f1e7106 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,7 +34,6 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake") option(DISABLE_WERROR "Build without -Werror" FALSE) option(ENABLE_SIGNALS "Build with UNIX signals" TRUE) option(ENABLE_DECODE "Build with libsigrokdecode" TRUE) -option(ENABLE_COTIRE "Enable cotire" FALSE) option(ENABLE_TESTS "Enable unit tests" FALSE) option(STATIC_PKGDEPS_LIBS "Statically link to (pkg-config) libraries" FALSE) option(FORCE_QT4 "Force use of Qt4 even if Qt5 is available" FALSE) @@ -96,12 +95,20 @@ else() endif() if(WIN32) +if(ENABLE_TESTS) # 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_win32 REQUIRED) +endif() +else() +if(ENABLE_TESTS) + find_package(Boost 1.42 COMPONENTS filesystem system thread unit_test_framework REQUIRED) else() find_package(Boost 1.42 COMPONENTS filesystem system thread REQUIRED) endif() +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. @@ -385,11 +392,6 @@ if(WIN32) set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "-mwindows") endif() -if(ENABLE_COTIRE) - include(cotire) - cotire(${PROJECT_NAME}) -endif() - #=============================================================================== #= Installation #-------------------------------------------------------------------------------