X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=CMakeLists.txt;h=11767a6fc587df5a7948169aaa3751a568ac7f4d;hp=2ba907af96be14167535429551873a751d639c04;hb=2445160a5d1eb98196d2a1d57246d4c37dd13811;hpb=1198b8872516662c257e5dcdec346094ed4f32dd diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ba907af..11767a6f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,7 +33,7 @@ project(pulseview) option(DISABLE_WERROR "Build without -Werror" FALSE) option(ENABLE_SIGNALS "Build with UNIX signals" TRUE) -option(ENABLE_DECODE "Build with libsigrokdecode" FALSE) +option(ENABLE_DECODE "Build with libsigrokdecode" TRUE) option(ENABLE_COTIRE "Enable cotire" FALSE) option(ENABLE_TESTS "Enable unit tests" FALSE) option(STATIC_PKGDEPS_LIBS "Statically link to (pkg-config) libraries" FALSE) @@ -51,6 +51,12 @@ if(WIN32) set(ENABLE_SIGNALS FALSE) endif() +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING + "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." + FORCE) +endif() + #=============================================================================== #= Dependencies #------------------------------------------------------------------------------- @@ -74,11 +80,18 @@ find_package(Threads) if(WIN32) # On Windows/MinGW we need to use 'thread_win32' instead of 'thread'. # The library is named libboost_thread_win32* (not libboost_thread*). - find_package(Boost 1.42 COMPONENTS system thread_win32 REQUIRED) + find_package(Boost 1.42 COMPONENTS filesystem system thread_win32 REQUIRED) else() - find_package(Boost 1.42 COMPONENTS system thread REQUIRED) + find_package(Boost 1.42 COMPONENTS filesystem system thread REQUIRED) endif() +#=============================================================================== +#= System Introspection +#------------------------------------------------------------------------------- + +include(memaccess) +memaccess_check_unaligned_le(HAVE_UNALIGNED_LITTLE_ENDIAN_ACCESS) + #=============================================================================== #= Config Header #------------------------------------------------------------------------------- @@ -114,6 +127,11 @@ set(pulseview_SOURCES pv/data/logicsnapshot.cpp pv/data/signaldata.cpp pv/data/snapshot.cpp + pv/device/device.cpp + pv/device/file.cpp + pv/device/devinst.cpp + pv/device/inputfile.cpp + pv/device/sessionfile.cpp pv/dialogs/about.cpp pv/dialogs/connect.cpp pv/dialogs/storeprogress.cpp @@ -155,6 +173,7 @@ set(pulseview_HEADERS pv/mainwindow.h pv/sigsession.h pv/storesession.h + pv/device/devinst.h pv/dialogs/about.h pv/dialogs/connect.h pv/dialogs/storeprogress.h @@ -204,6 +223,8 @@ if(ENABLE_DECODE) pv/data/decoderstack.cpp pv/data/decode/annotation.cpp pv/data/decode/decoder.cpp + pv/data/decode/row.cpp + pv/data/decode/rowdata.cpp pv/prop/binding/decoderoptions.cpp pv/view/decodetrace.cpp pv/widgets/decodergroupbox.cpp @@ -278,6 +299,10 @@ set(PULSEVIEW_LINK_LIBS if(STATIC_PKGDEPS_LIBS) link_directories(${PKGDEPS_STATIC_LIBRARY_DIRS}) list(APPEND PULSEVIEW_LINK_LIBS ${PKGDEPS_STATIC_LIBRARIES}) +if(WIN32) + # Workaround for a MinGW linking issue. + list(APPEND PULSEVIEW_LINK_LIBS "-llzma -llcms2") +endif() else() link_directories(${PKGDEPS_LIBRARY_DIRS}) list(APPEND PULSEVIEW_LINK_LIBS ${PKGDEPS_LIBRARIES})