From 35026dfa0f9c55cece7c3b323fa8cc014cd08b85 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Sat, 18 May 2024 12:28:33 +0200 Subject: [PATCH] try improve entt across-boundry support --- CMakeLists.txt | 4 ++++ src/CMakeLists.txt | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 856947fb..32d4a5af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,6 +38,10 @@ if (TOMATO_ASAN) endif() endif() +# uggly, but it needs to be defined for all of tomato. +# but this also means that we can not compile tomato in the same cmake as plugins +add_compile_definitions(ENTT_API_EXPORT) + # external libs add_subdirectory(./external) # before increasing warn levels, sad :( diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a8bb31de..cacd6b14 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -105,3 +105,8 @@ target_link_libraries(tomato PUBLIC SDL3_image::SDL3_image ) +# probably not enough +#target_compile_definitions(tomato PUBLIC ENTT_API_EXPORT) + +set_target_properties(tomato PROPERTIES POSITION_INDEPENDENT_CODE ON) +