From 466efc5da3a404b45e58babd239e5d58e83c294e Mon Sep 17 00:00:00 2001 From: Green Sky Date: Sun, 19 May 2024 11:44:37 +0200 Subject: [PATCH] plugin symbol visibility --- plugins/CMakeLists.txt | 12 ++++++++++-- plugins/plugin_zox_ngc_hs.cpp | 3 +++ src/solanaceae/zox/ngc.hpp | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index c5bd9a9..1df67b9 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -3,7 +3,10 @@ cmake_minimum_required(VERSION 3.14...3.24 FATAL_ERROR) add_library(plugin_zox_ngc SHARED ./plugin_zox_ngc.cpp ) -set_property(TARGET plugin_zox_ngc PROPERTY C_VISIBILITY_PRESET hidden) +set_target_properties(plugin_zox_ngc PROPERTIES + C_VISIBILITY_PRESET hidden + POSITION_INDEPENDENT_CODE ON +) target_link_libraries(plugin_zox_ngc PUBLIC solanaceae_plugin @@ -15,7 +18,12 @@ target_link_libraries(plugin_zox_ngc PUBLIC add_library(plugin_zox_ngc_hs SHARED ./plugin_zox_ngc_hs.cpp ) -set_property(TARGET plugin_zox_ngc_hs PROPERTY C_VISIBILITY_PRESET hidden) + +set_target_properties(plugin_zox_ngc_hs PROPERTIES + C_VISIBILITY_PRESET hidden + POSITION_INDEPENDENT_CODE ON +) +target_compile_definitions(plugin_zox_ngc_hs PUBLIC ENTT_API_IMPORT) target_link_libraries(plugin_zox_ngc_hs PUBLIC solanaceae_plugin diff --git a/plugins/plugin_zox_ngc_hs.cpp b/plugins/plugin_zox_ngc_hs.cpp index 28e2a8d..420c13a 100644 --- a/plugins/plugin_zox_ngc_hs.cpp +++ b/plugins/plugin_zox_ngc_hs.cpp @@ -5,6 +5,9 @@ #include #include +#include +#include + #include #include diff --git a/src/solanaceae/zox/ngc.hpp b/src/solanaceae/zox/ngc.hpp index 6d7aa43..d78405a 100644 --- a/src/solanaceae/zox/ngc.hpp +++ b/src/solanaceae/zox/ngc.hpp @@ -1,10 +1,10 @@ #pragma once -#include #include #include +#include #include #include