Explorar o código

Proper fix for #2122 #2150

Bundled cpu_features needs to be built with PIC but SHARED_LIBS should
be OFF.
Koichiro Iwao hai 1 mes
pai
achega
efb04daa34
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/Mayaqua/CMakeLists.txt

+ 2 - 1
src/Mayaqua/CMakeLists.txt

@@ -126,7 +126,8 @@ if(UNIX)
     target_link_libraries(mayaqua PRIVATE cpu_features)
   else()
     message("-- Using bundled cpu_features")
-    set(BUILD_SHARED_LIBS ON)
+    set(BUILD_SHARED_LIBS OFF)
+    set(CMAKE_POSITION_INDEPENDENT_CODE ON)
     add_subdirectory(3rdparty/cpu_features)
     target_link_libraries(mayaqua PRIVATE cpu_features)
   endif()