From cb84dbcc2234deaa652ef5c3703b6f78deb954d0 Mon Sep 17 00:00:00 2001 From: Xiphoseer Date: Fri, 5 Jan 2024 20:59:52 +0100 Subject: [PATCH] fix: macos? --- tests/CMakeLists.txt | 5 ++++- tests/dCommonTests/CMakeLists.txt | 1 + tests/dGameTests/CMakeLists.txt | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ec5498487..6c4e8d38f 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -4,7 +4,10 @@ enable_testing() find_package(GoogleTest REQUIRED) include(GoogleTest) -unset(CMAKE_RUNTIME_OUTPUT_DIRECTORY) # for now +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin) + +add_custom_target(conncpp_tests + ${CMAKE_COMMAND} -E copy $ ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) # Add the subdirectories add_subdirectory(dCommonTests) diff --git a/tests/dCommonTests/CMakeLists.txt b/tests/dCommonTests/CMakeLists.txt index be23d8665..01c725054 100644 --- a/tests/dCommonTests/CMakeLists.txt +++ b/tests/dCommonTests/CMakeLists.txt @@ -17,6 +17,7 @@ list(APPEND DCOMMONTEST_SOURCES ${DENUMS_TESTS}) # Set our executable add_executable(dCommonTests ${DCOMMONTEST_SOURCES}) +add_dependencies(dCommonTests conncpp_tests) # Link needed libraries target_link_libraries(dCommonTests ${COMMON_LIBRARIES} GTest::gtest_main) diff --git a/tests/dGameTests/CMakeLists.txt b/tests/dGameTests/CMakeLists.txt index 9a76bc82c..20d7e530f 100644 --- a/tests/dGameTests/CMakeLists.txt +++ b/tests/dGameTests/CMakeLists.txt @@ -12,6 +12,7 @@ file(COPY ${GAMEMESSAGE_TESTBITSTREAMS} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) # Add the executable. Remember to add all tests above this! add_executable(dGameTests ${DGAMETEST_SOURCES}) +add_dependencies(dCommonTests conncpp_tests) target_link_libraries(dGameTests ${COMMON_LIBRARIES} GTest::gtest_main dGame dScripts dPhysics Detour Recast tinyxml2 dWorldServer dZoneManager dChatFilter dNavigation)