Skip to content

Commit

Permalink
Fix -fPIC
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Sep 11, 2023
1 parent b443e4d commit d852bad
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions Bar/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ target_include_directories(Bar
target_compile_features(Bar PUBLIC cxx_std_17)
set_target_properties(Bar PROPERTIES
VERSION ${PROJECT_VERSION}
POSITION_INDEPENDENT_CODE ON
PUBLIC_HEADER include/bar/Bar.hpp)
#target_link_libraries(Bar PUBLIC ...)
add_library(${PROJECT_NAMESPACE}::Bar ALIAS Bar)
Expand Down
1 change: 1 addition & 0 deletions Foo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ target_include_directories(Foo
target_compile_features(Foo PUBLIC cxx_std_17)
set_target_properties(Foo PROPERTIES
VERSION ${PROJECT_VERSION}
POSITION_INDEPENDENT_CODE ON
PUBLIC_HEADER include/foo/Foo.hpp)
#target_link_libraries(Foo PUBLIC ...)
add_library(${PROJECT_NAMESPACE}::Foo ALIAS Foo)
Expand Down
1 change: 1 addition & 0 deletions FooBar/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ if(APPLE)
INSTALL_RPATH "@loader_path")
elseif(UNIX)
set_target_properties(FooBar PROPERTIES
POSITION_INDEPENDENT_CODE ON
INSTALL_RPATH "$ORIGIN")
endif()
target_link_libraries(FooBar
Expand Down

0 comments on commit d852bad

Please sign in to comment.