X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=CMakeLists.txt;h=8566adf04a8509294c0625f6f9521c4f76da8970;hp=fc8fb4c9e521b6856e1d7fe189e90b804b99505f;hb=d52d8455db515a779b4451c223ba7aaded70951a;hpb=f4c92e1c49680738bde7d5fa08153fa914ac2920 diff --git a/CMakeLists.txt b/CMakeLists.txt index fc8fb4c9..8566adf0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,7 @@ project(pulseview) #------------------------------------------------------------------------------- option(DISABLE_WERROR "Build without -Werror" FALSE) +option(ENABLE_SIGROKDECODE "Build with libsigrokdecode" FALSE) option(ENABLE_TESTS "Enable unit tests" FALSE) option(STATIC_PKGDEPS_LIBS "Statically link to (pkgconfig) libraries" FALSE) @@ -45,12 +46,17 @@ 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,6 +96,7 @@ configure_file ( set(pulseview_SOURCES main.cpp + signalhandler.cpp pv/mainwindow.cpp pv/sigsession.cpp pv/data/analog.cpp @@ -101,8 +108,10 @@ set(pulseview_SOURCES pv/dialogs/about.cpp pv/dialogs/connect.cpp pv/dialogs/deviceoptions.cpp + 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 @@ -119,6 +128,7 @@ set(pulseview_SOURCES ) set(pulseview_HEADERS + signalhandler.h pv/mainwindow.h pv/sigsession.h pv/dialogs/about.h @@ -154,6 +164,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()