void-packages/srcpkgs/artyfx/patches/fix-avtk-cmake-sse.patch

19 lines
704 B
Diff

--- src/avtk/CMakeLists.txt 2016-12-24 19:36:45.000000000 +0000
+++ src/avtk/CMakeLists.txt 2019-03-09 11:20:24.063980037 +0000
@@ -55,8 +55,13 @@
link_directories ( ${X11_LIBRARY_DIRS} )
-SET(CMAKE_C_FLAGS "-fPIC -msse -msse2 -mfpmath=sse -g") # -fsanitize=address
-SET(CMAKE_CXX_FLAGS "-fPIC -msse -msse2 -mfpmath=sse -g") # -fsanitize=address
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") # -fsanitize=address
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") # -fsanitize=address
+
+IF(BUILD_SSE)
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse -msse2 -mfpmath=sse")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse -msse2 -mfpmath=sse")
+ENDIF()
FILE(GLOB src libs/pffft.cxx avtk/*.cxx )