1 cmake_minimum_required(VERSION 2.6)
6 find_package(PkgConfig)
7 pkg_check_modules(PKGDEPS REQUIRED
12 find_package(Qt4 REQUIRED)
13 find_package(Boost 1.46 COMPONENTS unit_test_framework REQUIRED)
17 set(sigrok-qt2_SOURCES
32 set(sigrok-qt2_HEADERS
44 set(sigrok-qt2_RESOURCES
48 set(sigrok-qt2_TEST_SOURCES
54 set(QT_USE_QTOPENGL TRUE)
56 qt4_wrap_cpp(sigrok-qt2_HEADERS_MOC ${sigrok-qt2_HEADERS})
57 qt4_wrap_ui(sigrok-qt2_FORMS_HEADERS ${sigrok-qt2_FORMS})
58 qt4_add_resources(sigrok-qt2_RESOURCES_RCC ${sigrok-qt2_RESOURCES})
60 include(${QT_USE_FILE})
62 add_definitions(${QT_DEFINITIONS})
63 add_definitions(-DAPP_VERSION="${VERSION}")
66 ${include_directories}
68 ${PKGDEPS_INCLUDE_DIRS}
73 ${PKGDEPS_LIBRARY_DIRS}
76 add_executable(sigrok-qt2
78 ${sigrok-qt2_HEADERS_MOC}
79 ${sigrok-qt2_FORMS_HEADERS}
80 ${sigrok-qt2_RESOURCES_RCC}
83 target_link_libraries(sigrok-qt2
89 add_definitions(-DBOOST_TEST_DYN_LINK)
91 add_executable(sigrok-qt2-test
92 ${sigrok-qt2_TEST_SOURCES}
95 target_link_libraries(sigrok-qt2-test
102 add_test(test ${CMAKE_CURRENT_BINARY_DIR}/sigrok-qt2-test)