adjust cmake concering -fPic

This commit is contained in:
Walter Julius Hennecke 2019-02-23 11:37:37 +01:00
parent 9e82679115
commit d0e2b01e9b

View file

@ -29,8 +29,7 @@ file(GLOB_RECURSE UI_SRC "*.h" "*.c" "*.cpp")
add_library(${UI_LIB_NAME} SHARED ${UI_SRC} $<TARGET_OBJECTS:common> $<TARGET_OBJECTS:base_game>)
target_include_directories(${UI_LIB_NAME} PUBLIC ../json/include ..)
target_link_libraries(${UI_LIB_NAME} -static -lstdc++fs)
target_compile_options(${UI_LIB_NAME} PUBLIC -Wno-narrowing -Wno-write-strings)
target_compile_options(${UI_LIB_NAME} PUBLIC -Wno-narrowing -Wno-write-strings -fPIC)
target_compile_definitions(${UI_LIB_NAME} PUBLIC -DUI_DLL)
set_target_properties(${UI_LIB_NAME} PROPERTIES PREFIX "")
target_compile_definitions(base_game PUBLIC -DUI_DLL)
set_property(TARGET ${UI_LIB_NAME} PROPERTY POSITION_INDEPENDENT_CODE OFF)
target_compile_definitions(base_game PUBLIC -DUI_DLL)