Skip to content

Commit

Permalink
Merge pull request #54 from hzulla/linux-linking-fixed
Browse files Browse the repository at this point in the history
Linux linking fixed
  • Loading branch information
danstowell committed Dec 15, 2015
2 parents cf6498e + e9c69ee commit a963ecb
Showing 1 changed file with 12 additions and 20 deletions.
32 changes: 12 additions & 20 deletions source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -237,38 +237,30 @@ 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")

set_property(TARGET PitchDetection
APPEND PROPERTY COMPILE_DEFINITIONS SC_FFT_FFTW)
if (APPLE)
set_property(TARGET PitchDetection APPEND PROPERTY COMPILE_DEFINITIONS SC_FFT_VDSP)
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_VDSP)
endif()
else()
set_property(TARGET PitchDetection
APPEND PROPERTY COMPILE_DEFINITIONS SC_FFT_VDSP)
include_directories(${FFTW3F_INCLUDE_DIR})
set_property(TARGET PitchDetection APPEND PROPERTY COMPILE_DEFINITIONS SC_FFT_FFTW)
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_FFTW)
endif()
endif()

Expand Down

0 comments on commit a963ecb

Please sign in to comment.