--- src/CMakeLists.txt.orig 2026-05-23 14:59:55 UTC +++ src/CMakeLists.txt @@ -27,6 +27,18 @@ set(PROJECT_INCLUDE_DIR ${PROJECT_BINARY_DIR}/include) # The path to the project global include directory set(PROJECT_INCLUDE_DIR ${PROJECT_BINARY_DIR}/include) +# Set up include directories +include_directories( + ${PROJECT_INCLUDE_DIR} + ${CMAKE_BINARY_DIR} +if(QT_ONLY) + ${CMAKE_SOURCE_DIR}/echolib + ${CMAKE_SOURCE_DIR}/async/audio + ${CMAKE_SOURCE_DIR}/async/core + ${CMAKE_SOURCE_DIR}/async/cpp + ${INCLUDE_INSTALL_DIR}/svxlink/svxlink +endif(QT_ONLY) +) # Where to put library files set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib) @@ -43,6 +55,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cma list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules/") # Optional parts +option(QT_ONLY "Only Build Qt applications and libs" OFF) option(USE_QT "Build Qt applications and libs" ON) option(BUILD_STATIC_LIBS "Build static libraries in addition to dynamic" OFF) @@ -52,12 +65,6 @@ add_definitions(-DINTERNAL_SAMPLE_RATE=${INTERNAL_SAMP endif(NOT DEFINED INTERNAL_SAMPLE_RATE) add_definitions(-DINTERNAL_SAMPLE_RATE=${INTERNAL_SAMPLE_RATE}) -# Set up include directories -include_directories( - ${PROJECT_INCLUDE_DIR} - ${CMAKE_BINARY_DIR} -) - # Warnings should be enabled for GCC. Also turning off the NDEBUG flag # since that remove asserts. if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) @@ -85,7 +92,6 @@ endif(NOT CMAKE_BUILD_TYPE) FORCE) endif(NOT CMAKE_BUILD_TYPE) - ############################################################################## # Install targets properties setup ############################################################################## @@ -99,6 +105,18 @@ endif(NOT DEFINED INCLUDE_INSTALL_DIR) set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_FULL_INCLUDEDIR}) endif(NOT DEFINED INCLUDE_INSTALL_DIR) +# Set up include directories +include_directories( + ${PROJECT_INCLUDE_DIR} + ${CMAKE_BINARY_DIR} +if(QT_ONLY) + ${CMAKE_SOURCE_DIR}/echolib + ${CMAKE_SOURCE_DIR}/async/audio + ${CMAKE_SOURCE_DIR}/async/core + ${INCLUDE_INSTALL_DIR}/svxlink/svxlink +endif(QT_ONLY) +) + # Where to install libraries if(NOT DEFINED LIB_INSTALL_DIR) #set(LIB_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}) @@ -297,11 +315,11 @@ configure_file(${CMAKE_SOURCE_DIR}/config.h.in ) # Find the Sigc++ library -find_package(SIGC REQUIRED) -include_directories(${SIGC_INCLUDE_DIRS}) -add_definitions(${SIGC_DEFINITIONS}) +find_package(SIGC2 REQUIRED) +include_directories(${SIGC2_INCLUDE_DIRS}) +add_definitions(${SIGC2_DEFINITIONS}) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SIGC_CXX_FLAGS}") -set(LIBS ${LIBS} ${SIGC_LIBRARIES}) +set(LIBS ${LIBS} ${SIGC2_LIBRARIES}) find_package(LADSPA) if(LADSPA_FOUND) @@ -331,9 +349,11 @@ add_subdirectory(misc) add_subdirectory(doc) add_subdirectory(async) add_subdirectory(misc) +if(NOT QT_ONLY) add_subdirectory(echolib) add_subdirectory(locationinfo) add_subdirectory(svxlink) +endif(NOT QT_ONLY) if(USE_QT) add_subdirectory(qtel) endif(USE_QT)