Static linking instead of DLL

This commit is contained in:
legatt 2025-08-06 18:14:50 +03:00
parent ff6c146153
commit eb480f02b8
4 changed files with 2 additions and 18 deletions

View File

@ -13,7 +13,7 @@ find_package(EnTT CONFIG REQUIRED)
# Link library
add_library(ECS SHARED ${HEADERS} ${SOURCES})
add_library(ECS ${HEADERS} ${SOURCES})
add_library(ECS::ECS ALIAS ECS)
target_link_libraries(ECS PUBLIC Economy::Economy)

View File

@ -20,12 +20,4 @@ if (CMAKE_VERSION VERSION_GREATER 3.12)
set_property(TARGET ecs_tests PROPERTY CXX_STANDARD 20)
endif()
if (WIN32)
add_custom_command(
TARGET ecs_tests POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_RUNTIME_DLLS:ecs_tests> $<TARGET_FILE_DIR:ecs_tests>
COMMAND_EXPAND_LISTS
)
endif ()
gtest_discover_tests(ecs_tests)

View File

@ -21,7 +21,7 @@ find_package(EnTT CONFIG REQUIRED)
# Link library
add_library(Economy SHARED ${HEADERS} ${HEADERS_COMPONENTS} ${SOURCES} ${SOURCES_SYSTEMS})
add_library(Economy ${HEADERS} ${HEADERS_COMPONENTS} ${SOURCES} ${SOURCES_SYSTEMS})
add_library(Economy::Economy ALIAS Economy)
target_link_libraries(Economy PRIVATE EnTT::EnTT)

View File

@ -21,12 +21,4 @@ if (CMAKE_VERSION VERSION_GREATER 3.12)
set_property(TARGET economy_tests PROPERTY CXX_STANDARD 20)
endif()
if (WIN32)
add_custom_command(
TARGET economy_tests POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_RUNTIME_DLLS:economy_tests> $<TARGET_FILE_DIR:economy_tests>
COMMAND_EXPAND_LISTS
)
endif ()
gtest_discover_tests(economy_tests)