X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=CMakeLists.txt;h=8566adf04a8509294c0625f6f9521c4f76da8970;hp=7d46b25ee5359b171f93216ffec1924ab7cf260d;hb=d52d8455db515a779b4451c223ba7aaded70951a;hpb=c6dd7ed262a3bc4879b511f516532bc954d743f4 diff --git a/CMakeLists.txt b/CMakeLists.txt index 7d46b25e..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). @@ -158,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()