global export/import

This commit is contained in:
2024-05-28 10:57:40 +02:00
parent a023e5f46e
commit fb5397097b
4 changed files with 39 additions and 10 deletions

View File

@@ -18,9 +18,18 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
option(SOLANACEAE_ECOSYSTEM_BUILD_PLUGINS "Build plugins and not hosts (totato)" ON)
option(SOLANACEAE_ECOSYSTEM_BUILD_TESTING "Build tests" ${BUILD_TESTING})
message("II SOLANACEAE_ECOSYSTEM_BUILD_TESTING " ${SOLANACEAE_ECOSYSTEM_BUILD_TESTING})
if (SOLANACEAE_ECOSYSTEM_BUILD_PLUGINS)
# uggly, but it needs to be defined for all dependencies too
# but this also means that we can not compile a host in the same cmake run as plugins
add_compile_definitions(ENTT_API_IMPORT)
else()
add_compile_definitions(ENTT_API_EXPORT)
endif()
if (SOLANACEAE_ECOSYSTEM_BUILD_TESTING)
include(CTest)
endif()