From c7efd13e50c353a1d642a20f91c5135774f541b2 Mon Sep 17 00:00:00 2001 From: preverte <122558118+preverte@users.noreply.github.com> Date: Mon, 17 Apr 2023 16:46:43 +0200 Subject: [PATCH] Added -fPIC flag for sdk_core compilation --- sdk_core/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdk_core/CMakeLists.txt b/sdk_core/CMakeLists.txt index 60037f6..c54ab32 100644 --- a/sdk_core/CMakeLists.txt +++ b/sdk_core/CMakeLists.txt @@ -27,6 +27,7 @@ else(WIN32) endif (WIN32) target_compile_options(${SDK_LIBRARY} + PRIVATE $<$:-Wno-missing-field-initializers -fPIC> PRIVATE $<$:-Wall -Werror -Wno-c++11-long-long> PRIVATE $<$:-Wno-unknown-pragmas -Wall -Werror -Wno-c++11-long-long> PRIVATE $<$:-Wno-unknown-pragmas -Wall -Werror -Wno-c++11-long-long>) @@ -88,4 +89,4 @@ target_sources(${SDK_LIBRARY} install(TARGETS ${SDK_LIBRARY} PUBLIC_HEADER DESTINATION include ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib) \ No newline at end of file + LIBRARY DESTINATION lib)