diff --git a/colobot-common/CMakeLists.txt b/colobot-common/CMakeLists.txt index 84dd8a5f..96d98b95 100644 --- a/colobot-common/CMakeLists.txt +++ b/colobot-common/CMakeLists.txt @@ -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