X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=CMakeLists.txt;h=9510a700bcf09f90cfb27d27a7f063ecd1bb7436;hb=7d297a015d091b15f3bec4aee9d008b83a3d64af;hp=0d3464b78fb51493987539b76e5aac5eb9905a01;hpb=d4384c6d5c7cb6dc16979c650cd21aa29f0aedb5;p=pulseview.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 0d3464b..9510a70 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,11 +28,11 @@ project(pulseview) #------------------------------------------------------------------------------- option(ENABLE_TESTS "Enable unit tests" FALSE) -option(STATIC_PKGDEPS_LIBS "Statically link to sigrok libraries" FALSE) +option(STATIC_PKGDEPS_LIBS "Statically link to (pkgconfig) libraries" FALSE) if(WIN32) - # On Windows/MinGW we need to statically link to libraries - # This option is user configurable, but enable it by default on win32 + # On Windows/MinGW we need to statically link to libraries. + # This option is user configurable, but enable it by default on win32. set(STATIC_PKGDEPS_LIBS TRUE) endif() @@ -49,7 +49,7 @@ pkg_check_modules(PKGDEPS REQUIRED # On Windows/MinGW we explicitly point cmake to the Boost directory. if(WIN32) set(BOOST_ROOT /usr/local) -endif(WIN32) +endif() find_package(Qt4 REQUIRED) find_package(Boost 1.46 COMPONENTS unit_test_framework REQUIRED) @@ -114,13 +114,6 @@ set(pulseview_RESOURCES pulseview.qrc ) -set(pulseview_TEST_SOURCES - pv/datasnapshot.cpp - pv/logicdatasnapshot.cpp - test/logicdatasnapshot.cpp - test/test.cpp -) - qt4_wrap_cpp(pulseview_HEADERS_MOC ${pulseview_HEADERS}) qt4_wrap_ui(pulseview_FORMS_HEADERS ${pulseview_FORMS}) qt4_add_resources(pulseview_RESOURCES_RCC ${pulseview_RESOURCES}) @@ -188,18 +181,7 @@ install(PROGRAMS ${PROJECT_NAME} DESTINATION bin/) #------------------------------------------------------------------------------- if(ENABLE_TESTS) - - add_definitions(pulseview-tests - -DBOOST_TEST_DYN_LINK - ) - - add_executable(pulseview-test - ${pulseview_TEST_SOURCES} - ) - - target_link_libraries(pulseview-test ${PULSEVIEW_LINK_LIBS}) - + add_subdirectory(test) enable_testing() - add_test(test ${CMAKE_CURRENT_BINARY_DIR}/pulseview-test) - + add_test(test ${CMAKE_CURRENT_BINARY_DIR}/test/pulseview-test) endif(ENABLE_TESTS)