Static linking instead of DLL
This commit is contained in:
parent
ff6c146153
commit
eb480f02b8
@ -13,7 +13,7 @@ find_package(EnTT CONFIG REQUIRED)
|
|||||||
|
|
||||||
# Link library
|
# Link library
|
||||||
|
|
||||||
add_library(ECS SHARED ${HEADERS} ${SOURCES})
|
add_library(ECS ${HEADERS} ${SOURCES})
|
||||||
add_library(ECS::ECS ALIAS ECS)
|
add_library(ECS::ECS ALIAS ECS)
|
||||||
|
|
||||||
target_link_libraries(ECS PUBLIC Economy::Economy)
|
target_link_libraries(ECS PUBLIC Economy::Economy)
|
||||||
|
|||||||
@ -20,12 +20,4 @@ if (CMAKE_VERSION VERSION_GREATER 3.12)
|
|||||||
set_property(TARGET ecs_tests PROPERTY CXX_STANDARD 20)
|
set_property(TARGET ecs_tests PROPERTY CXX_STANDARD 20)
|
||||||
endif()
|
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)
|
gtest_discover_tests(ecs_tests)
|
||||||
@ -21,7 +21,7 @@ find_package(EnTT CONFIG REQUIRED)
|
|||||||
|
|
||||||
# Link library
|
# 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)
|
add_library(Economy::Economy ALIAS Economy)
|
||||||
|
|
||||||
target_link_libraries(Economy PRIVATE EnTT::EnTT)
|
target_link_libraries(Economy PRIVATE EnTT::EnTT)
|
||||||
|
|||||||
@ -21,12 +21,4 @@ if (CMAKE_VERSION VERSION_GREATER 3.12)
|
|||||||
set_property(TARGET economy_tests PROPERTY CXX_STANDARD 20)
|
set_property(TARGET economy_tests PROPERTY CXX_STANDARD 20)
|
||||||
endif()
|
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)
|
gtest_discover_tests(economy_tests)
|
||||||
Loading…
x
Reference in New Issue
Block a user