Skip to content

Commit

Permalink
add fpic
Browse files Browse the repository at this point in the history
  • Loading branch information
CppCXY committed Sep 15, 2023
1 parent 5e53f65 commit 9246466
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions third-party/libuv-1.46.0/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,11 @@ endif()
add_library(uv_a STATIC ${uv_sources})
target_compile_definitions(uv_a PRIVATE ${uv_defines})
target_compile_options(uv_a PRIVATE ${uv_cflags})
# add -fPIC by CPPCXY
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
target_compile_options(uv_a PRIVATE -fPIC)
endif()

target_include_directories(uv_a
PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
Expand Down

0 comments on commit 9246466

Please sign in to comment.