[CMake] Use POSITION_INDEPENDENT_CODE property instead of manually setting -fPIC (Alchemy sync)

This commit is contained in:
Router Gray
2019-12-20 16:19:21 -06:00
parent 6608dd0b8d
commit 0496374328
9 changed files with 18 additions and 60 deletions

View File

@@ -17,14 +17,6 @@ include_directories(
### basic_plugin_example
if(NOT WORD_SIZE EQUAL 32)
if(WINDOWS)
# add_definitions(/FIXED:NO)
else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
add_definitions(-fPIC)
endif(WINDOWS)
endif (NOT WORD_SIZE EQUAL 32)
set(basic_plugin_example_SOURCE_FILES
basic_plugin_example.cpp
)
@@ -34,6 +26,8 @@ add_library(basic_plugin_example
${basic_plugin_example_SOURCE_FILES}
)
set_target_properties(basic_plugin_example PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
target_link_libraries(basic_plugin_example
${LLPLUGIN_LIBRARIES}
${LLCOMMON_LIBRARIES}