diff options
Diffstat (limited to 'cmake.deps/cmake/BuildLuv.cmake')
-rw-r--r-- | cmake.deps/cmake/BuildLuv.cmake | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/cmake.deps/cmake/BuildLuv.cmake b/cmake.deps/cmake/BuildLuv.cmake index c37a870b3d..ec0707020a 100644 --- a/cmake.deps/cmake/BuildLuv.cmake +++ b/cmake.deps/cmake/BuildLuv.cmake @@ -12,7 +12,8 @@ set(LUV_CMAKE_ARGS -DWITH_SHARED_LIBUV=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON - -DBUILD_MODULE=OFF) + -DBUILD_MODULE=OFF + -DCMAKE_POSITION_INDEPENDENT_CODE=ON) if(USE_BUNDLED_LUAJIT) list(APPEND LUV_CMAKE_ARGS -DWITH_LUA_ENGINE=LuaJit) @@ -33,16 +34,11 @@ if(USE_BUNDLED_LIBUV) -DLIBUV_LIBRARIES=uv_a) endif() -if(MSVC) - list(APPEND LUV_CMAKE_ARGS - "-DCMAKE_C_FLAGS:STRING=${LUV_INCLUDE_FLAGS}") -else() - list(APPEND LUV_CMAKE_ARGS - "-DCMAKE_C_FLAGS:STRING=${LUV_INCLUDE_FLAGS} -fPIC") - if(CMAKE_GENERATOR MATCHES "Unix Makefiles" AND - (CMAKE_SYSTEM_NAME MATCHES ".*BSD" OR CMAKE_SYSTEM_NAME MATCHES "DragonFly")) - list(APPEND LUV_CMAKE_ARGS -DCMAKE_MAKE_PROGRAM=gmake) - endif() +list(APPEND LUV_CMAKE_ARGS + "-DCMAKE_C_FLAGS:STRING=${LUV_INCLUDE_FLAGS}") +if(CMAKE_GENERATOR MATCHES "Unix Makefiles" AND + (CMAKE_SYSTEM_NAME MATCHES ".*BSD" OR CMAKE_SYSTEM_NAME MATCHES "DragonFly")) + list(APPEND LUV_CMAKE_ARGS -DCMAKE_MAKE_PROGRAM=gmake) endif() if(USE_EXISTING_SRC_DIR) |