Skip to content

Commit

Permalink
Merge pull request #83 from Klebert-Engineering/do-not-set-cmake-pic
Browse files Browse the repository at this point in the history
Do not set CMAKE_POSITION_INDEPENDENT_CODE.
  • Loading branch information
josephbirkner authored Jun 19, 2024
2 parents 0dd7704 + b685f23 commit fdaef25
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ endif()

if (SIMFIL_SHARED)
set(LIBRARY_TYPE SHARED)
set(CMAKE_POSITION_INDEPENDENT_CODE YES)
else()
set(LIBRARY_TYPE STATIC)
endif()
Expand Down
4 changes: 4 additions & 0 deletions deps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ if (SIMFIL_CONAN)
find_package(nlohmann_json REQUIRED)
endif()
else()
if (SIMFIL_SHARED)
set (CMAKE_POSITION_INDEPENDENT_CODE ON)
endif ()

if (NOT TARGET sfl::sfl)
FetchContent_Declare(sfl
GIT_REPOSITORY "https://github.com/slavenf/sfl-library.git"
Expand Down

0 comments on commit fdaef25

Please sign in to comment.