From 18b3806981b04a3869682b143fe0fff8a18cade5 Mon Sep 17 00:00:00 2001 From: Hanno Zulla Date: Tue, 15 Dec 2015 14:09:39 +0100 Subject: [PATCH 1/2] fix linking on Linux for PitchDetection, LadspaUGen --- source/CMakeLists.txt | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 473bdfa482..c1f34414b3 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -226,7 +226,7 @@ BUILD_PLUGIN(MembraneUGens "MembraneUGens/Membrane_shape.c;MembraneUGens/Membran # LadspaUGen if(NOT WIN32) - BUILD_PLUGIN(LadspaUGen "LadspaUGen/LadspaUGen.cpp;LadspaUGen/search.c" "" "LadspaUGen") + BUILD_PLUGIN(LadspaUGen "LadspaUGen/LadspaUGen.cpp;LadspaUGen/search.c" "dl" "LadspaUGen") add_executable(ladspalist LadspaUGen/ladspalist.c LadspaUGen/search.c) target_link_libraries(ladspalist dl) endif() @@ -237,38 +237,35 @@ BUILD_PLUGIN(OteyPianoUGens "OteyPianoUGens/OteyPiano.cpp;OteyPianoUGens/dwgs.cp # PitchDetectionUGens file(GLOB PitchDetectionSources PitchDetection/*cpp) + if(APPLE) set (PitchDetectionLibs "-framework Accelerate") else() - set (PitchDetectionLibs ${FFTW3F_LIBRARY}) -endif() - -BUILD_PLUGIN(PitchDetection "${PitchDetectionSources}" - "${PitchDetectionLibs}" "PitchDetection") - - - -if (NOT APPLE) find_package(FFTW3f) - if (!FFTW3F_FOUND) message(SEND_ERROR "Cannot find libfftw3f") endif() + set (PitchDetectionLibs ${FFTW3F_LIBRARY}) +endif() - include_directories(${FFTW3F_INCLUDE_DIR}) +BUILD_PLUGIN(PitchDetection "${PitchDetectionSources}" + "${PitchDetectionLibs}" "PitchDetection") +if (APPLE) set_property(TARGET PitchDetection - APPEND PROPERTY COMPILE_DEFINITIONS SC_FFT_FFTW) + APPEND PROPERTY COMPILE_DEFINITIONS SC_FFT_VDSP) if (SUPERNOVA) set_property(TARGET PitchDetection_supernova - APPEND PROPERTY COMPILE_DEFINITIONS SC_FFT_FFTW) + APPEND PROPERTY COMPILE_DEFINITIONS SC_FFT_VDSP) endif() else() + include_directories(${FFTW3F_INCLUDE_DIR}) + set_property(TARGET PitchDetection - APPEND PROPERTY COMPILE_DEFINITIONS SC_FFT_VDSP) + APPEND PROPERTY COMPILE_DEFINITIONS SC_FFT_FFTW) if (SUPERNOVA) set_property(TARGET PitchDetection_supernova - APPEND PROPERTY COMPILE_DEFINITIONS SC_FFT_VDSP) + APPEND PROPERTY COMPILE_DEFINITIONS SC_FFT_FFTW) endif() endif() From e9c69eeb2319ebad3c515a903861d2d8a5eaa708 Mon Sep 17 00:00:00 2001 From: Hanno Zulla Date: Tue, 15 Dec 2015 14:11:51 +0100 Subject: [PATCH 2/2] formatting fix --- source/CMakeLists.txt | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index c1f34414b3..73e7d759d1 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -252,20 +252,15 @@ BUILD_PLUGIN(PitchDetection "${PitchDetectionSources}" "${PitchDetectionLibs}" "PitchDetection") if (APPLE) - set_property(TARGET PitchDetection - APPEND PROPERTY COMPILE_DEFINITIONS SC_FFT_VDSP) + set_property(TARGET PitchDetection APPEND PROPERTY COMPILE_DEFINITIONS SC_FFT_VDSP) if (SUPERNOVA) - set_property(TARGET PitchDetection_supernova - APPEND PROPERTY COMPILE_DEFINITIONS SC_FFT_VDSP) + set_property(TARGET PitchDetection_supernova APPEND PROPERTY COMPILE_DEFINITIONS SC_FFT_VDSP) endif() else() include_directories(${FFTW3F_INCLUDE_DIR}) - - set_property(TARGET PitchDetection - APPEND PROPERTY COMPILE_DEFINITIONS SC_FFT_FFTW) + set_property(TARGET PitchDetection APPEND PROPERTY COMPILE_DEFINITIONS SC_FFT_FFTW) if (SUPERNOVA) - set_property(TARGET PitchDetection_supernova - APPEND PROPERTY COMPILE_DEFINITIONS SC_FFT_FFTW) + set_property(TARGET PitchDetection_supernova APPEND PROPERTY COMPILE_DEFINITIONS SC_FFT_FFTW) endif() endif()