We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ede8a10 commit f122ea4Copy full SHA for f122ea4
1 file changed
cmake/API.cmake
@@ -431,7 +431,10 @@ function(fprime_add_config_build_target)
431
append_list_property("${INTERNAL_MODULE_NAME}" GLOBAL PROPERTY "FPRIME_CONFIG_MODULES")
432
set_property(TARGET "${INTERNAL_MODULE_NAME}" PROPERTY FPRIME_CONFIGURATION TRUE)
433
set_property(TARGET "${FPRIME__INTERNAL_CONFIG_TARGET_NAME}" PROPERTY FPRIME_CONFIGURATION TRUE)
434
-
+ # Static libraries must be position independent when building shared libraries
435
+ if (BUILD_SHARED_LIBS AND CONFIG_LIBRARY_TYPE STREQUAL "STATIC")
436
+ target_compile_options(${INTERNAL_MODULE_NAME} PRIVATE -fPIC)
437
+ endif()
438
# Clear the historical variables and set up autocode
439
clear_historical_variables()
440
fprime_attach_custom_targets("${INTERNAL_MODULE_NAME}")
0 commit comments