Fix build - static library used in shared library must have position-independent code

dev
immibis 2023-10-11 05:15:57 +02:00
parent f07b7a1b60
commit 32fed5af73
1 changed files with 5 additions and 0 deletions

View File

@ -1,5 +1,10 @@
add_library(Colobot-Common STATIC)
if(NOT CBOT_STATIC)
# required to use static library inside CBot shared library
set_property(TARGET Colobot-Common PROPERTY POSITION_INDEPENDENT_CODE ON)
endif()
target_sources(Colobot-Common PRIVATE
src/common/stringutils.cpp
src/common/stringutils.h