zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit 730ae35c763d3e65849932f6207ed349a59a96c9
parent a159578f0b6d8b802294d5970a83da6db374fac1
Author: Johannes Lorenz <j.git@lorenz-ho.me>
Date:   Sat, 22 Feb 2025 16:46:04 +0100

Various CMake updates/fixes

* Raise CMake minimum version to prevent warnings
* Add missing FFTW include dirs (not used on Linux because they are
  often in default paths like `/usr/include`)
* Link against rt library only if it exists

Diffstat:
MCMakeLists.txt | 2+-
Msrc/CMakeLists.txt | 2+-
Msrc/Tests/CMakeLists.txt | 5++++-
3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.10) set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/") project(zynaddsubfx) set(VERSION_MAJOR "3") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt @@ -351,7 +351,7 @@ list(APPEND AUDIO_LIBRARY_DIRS ${LIBLO_LIBRARY_DIRS}) message(STATUS "Compiling with liblo") # other include directories -include_directories(${ZLIB_INCLUDE_DIRS} ${MXML_INCLUDE_DIRS}) +include_directories(${ZLIB_INCLUDE_DIRS} ${MXML_INCLUDE_DIRS} ${FFTW3F_INCLUDE_DIRS}) include_directories(${CMAKE_BINARY_DIR}/src) # for zyn-version.h ... if(NOT ${X11_X11_LIB} STREQUAL "") diff --git a/src/Tests/CMakeLists.txt b/src/Tests/CMakeLists.txt @@ -71,7 +71,10 @@ if(NOT (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")) ${PLATFORM_LIBRARIES}) add_executable(ins-test InstrumentStats.cpp) - target_link_libraries(ins-test ${test_lib} rt) + target_link_libraries(ins-test ${test_lib}) + if(HAVE_LIBRT) + target_link_libraries(ins-test rt) + endif() if(LIBLO_FOUND) quick_test(PortChecker lo-server zynaddsubfx_core zynaddsubfx_nio