Skip to content

Commit

Permalink
Correctly set position-independent code (gazebosim#950)
Browse files Browse the repository at this point in the history
This was broken by gazebosim/gz-cmake#399, since
we dropped the gazebo-specific flag, we can use native CMake mechanism
for marking this library position-independent.

Signed-off-by: Michael Carroll <[email protected]>
  • Loading branch information
mjcarroll authored and mderbaso-deepx committed Jun 6, 2024
1 parent 5f157c4 commit cb664a9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ogre2/src/terrain/Terra/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ file( GLOB_RECURSE TERRA_SOURCES
)

add_library(${PROJECT_NAME} STATIC ${TERRA_SOURCES})
set_property(TARGET ${PROJECT_NAME} PROPERTY POSITION_INDEPENDENT_CODE ON)

if(GZ_ADD_fPIC_TO_LIBRARIES AND NOT _gz_add_library_INTERFACE)
target_compile_options(${PROJECT_NAME} PRIVATE -fPIC)
endif()

# disable all warnings for Terra
if (UNIX)
Expand Down

0 comments on commit cb664a9

Please sign in to comment.