ports/audio/sorcer-lv2/files/patch-CMakeLists.txt
Yuri Victorovich 1bb79bc493 audio/sorcer-lv2: Unbreak on non-Intel/AMD architectures
Make SSE flags depend on the option SSE that defaults to 'on' only on amd64/i386 architectures.

Also removed the -g flag.
2018-06-09 18:15:58 +00:00

39 lines
1.4 KiB
Text

--- CMakeLists.txt.orig 2016-03-06 16:11:56 UTC
+++ CMakeLists.txt
@@ -15,18 +15,22 @@ find_package(PkgConfig)
#SET(CMAKE_INSTALL_PREFIX "/usr" )
-pkg_check_modules(LV2 lv2 REQUIRED)
-include_directories( ${LV2_INCLUDE_DIRS} )
-
pkg_check_modules(NTK ntk REQUIRED)
include_directories( ${NTK_INCLUDE_DIRS} )
link_directories ( ${NTK_LIBRARY_DIRS} )
+pkg_check_modules(LV2 lv2 REQUIRED)
+include_directories( ${LV2_INCLUDE_DIRS} )
+
+pkg_check_modules(CAIRO cairo REQUIRED)
+include_directories( ${CAIRO_INCLUDE_DIRS} )
+link_directories ( ${CAIRO_LIBRARY_DIRS} )
+
SET(CMAKE_SHARED_LINKER_FLAGS "-fPIC -shared -Wl,-z,nodelete -Wl,--no-undefined")
IF(RELEASE_BUILD)
- SET(CMAKE_CXX_FLAGS "-g -Wall -Wno-unused-variable -msse2 -mfpmath=sse -ffast-math")
- SET(CMAKE_C_FLAGS "-g -Wall -W -Wno-unused-variable -msse2 -mfpmath=sse -ffast-math")
+ SET(CMAKE_CXX_FLAGS "-Wall -Wno-unused-variable ${PORT_SIMD_FLAGS} -ffast-math")
+ SET(CMAKE_C_FLAGS "-Wall -W -Wno-unused-variable ${PORT_SIMD_FLAGS} -ffast-math")
ENDIF()
## The following commands will re-generate the .cpp files from the FAUST .dsp,
@@ -81,6 +85,8 @@ ADD_LIBRARY(sorcer SHARED ${sources})
target_link_libraries( sorcer ${NTK_LIBRARIES} )
#target_link_libraries( sorcer ${SNDFILE_LIBRARIES} )
+target_link_libraries( sorcer ${CAIRO_LIBRARIES} )
+
# Remove "lib" part before name (sorcer.so, not libsorcer.so)
set_target_properties(sorcer PROPERTIES PREFIX "")