X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=CMakeLists.txt;h=2d9ec8f2ff76fd9260d6315e2d4a641c3f399064;hp=df201786445b17d7e6da62321471d61094791ced;hb=140181a46034cf65739ba4bf0bf1260ab94ac736;hpb=de1d99bbe58f825e30048baa48a9439c01686f10 diff --git a/CMakeLists.txt b/CMakeLists.txt index df201786..2d9ec8f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,8 @@ project(pulseview) #------------------------------------------------------------------------------- option(DISABLE_WERROR "Build without -Werror" FALSE) +option(ENABLE_SIGNALS "Build with UNIX signals" TRUE) +option(ENABLE_SIGROKDECODE "Build with libsigrokdecode" FALSE) option(ENABLE_TESTS "Enable unit tests" FALSE) option(STATIC_PKGDEPS_LIBS "Statically link to (pkgconfig) libraries" FALSE) @@ -39,18 +41,26 @@ if(WIN32) # For boost-thread we need two additional settings on win32: set(Boost_USE_STATIC_LIBS on) add_definitions(-DBOOST_THREAD_USE_LIB) + + # Windsws does not support UNIX signals + set(ENABLE_SIGNALS FALSE) endif() #=============================================================================== #= Dependencies #------------------------------------------------------------------------------- -find_package(PkgConfig) -pkg_check_modules(PKGDEPS REQUIRED - libsigrokdecode>=0.1.0 +list(APPEND PKGDEPS libsigrok>=0.2.0 ) +if(ENABLE_SIGROKDECODE) + list(APPEND PKGDEPS libsigrokdecode>=0.1.0) +endif() + +find_package(PkgConfig) +pkg_check_modules(PKGDEPS REQUIRED ${PKGDEPS}) + find_package(Qt4 REQUIRED) # Find the platform's thread library (needed for boost-thread). @@ -90,7 +100,6 @@ configure_file ( set(pulseview_SOURCES main.cpp - signalhandler.cpp pv/mainwindow.cpp pv/sigsession.cpp pv/data/analog.cpp @@ -105,6 +114,7 @@ set(pulseview_SOURCES pv/prop/bool.cpp pv/prop/double.cpp pv/prop/enum.cpp + pv/prop/int.cpp pv/prop/property.cpp pv/prop/binding/binding.cpp pv/prop/binding/deviceoptions.cpp @@ -121,7 +131,6 @@ set(pulseview_SOURCES ) set(pulseview_HEADERS - signalhandler.h pv/mainwindow.h pv/sigsession.h pv/dialogs/about.h @@ -144,6 +153,11 @@ set(pulseview_RESOURCES pulseview.qrc ) +if(ENABLE_SIGNALS) + list(APPEND pulseview_SOURCES signalhandler.cpp) + list(APPEND pulseview_HEADERS signalhandler.h) +endif() + qt4_wrap_cpp(pulseview_HEADERS_MOC ${pulseview_HEADERS}) qt4_wrap_ui(pulseview_FORMS_HEADERS ${pulseview_FORMS}) qt4_add_resources(pulseview_RESOURCES_RCC ${pulseview_RESOURCES}) @@ -157,6 +171,10 @@ include(${QT_USE_FILE}) add_definitions(${QT_DEFINITIONS}) add_definitions(-Wall -Wextra) +if(ENABLE_SIGROKDECODE) + add_definitions(-DENABLE_SIGROKDECODE) +endif() + if(NOT DISABLE_WERROR) add_definitions(-Werror) endif()