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) +