Skip to content

Commit

Permalink
Setting PIC for all targets
Browse files Browse the repository at this point in the history
  • Loading branch information
Taylor Holberton committed Apr 28, 2024
1 parent ba70191 commit 9558d61
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/overrides.cmake")
include("${CMAKE_CURRENT_SOURCE_DIR}/overrides.cmake")
endif()

if(UIKIT_PYTHON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()

if(POLICY CMP0135)
cmake_policy(SET CMP0135 NEW)
endif()
Expand Down Expand Up @@ -66,11 +70,6 @@ target_link_libraries(uikit
imgui::opengl3
implot::implot)

if(UIKIT_PYTHON)
set_target_properties(uikit PROPERTIES POSITION_INDEPENDENT_CODE ON)
set_target_properties(uikit_font_data PROPERTIES POSITION_INDEPENDENT_CODE ON)
endif()

if(EMSCRIPTEN)
target_link_libraries(uikit PUBLIC imgui::sdl2)
else()
Expand Down

0 comments on commit 9558d61

Please sign in to comment.