瀏覽代碼

Build bundled cpu_features with PIC

After updating bundled cpu_features to 0.9.0, set_property() is not
effective. We need to use set() instead.

Resolves: #2122 #2150
Koichiro Iwao 1 月之前
父節點
當前提交
2746e8dd19
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/Mayaqua/CMakeLists.txt

+ 2 - 1
src/Mayaqua/CMakeLists.txt

@@ -125,8 +125,9 @@ if(UNIX)
     message("-- Using system's cpu_features")
     target_link_libraries(mayaqua PRIVATE cpu_features)
   else()
+    message("-- Using bundled cpu_features")
+    set(BUILD_SHARED_LIBS ON)
     add_subdirectory(3rdparty/cpu_features)
-    set_property(TARGET cpu_features PROPERTY POSITION_INDEPENDENT_CODE ON)
     target_link_libraries(mayaqua PRIVATE cpu_features)
   endif()