fix: macos?

This commit is contained in:
Xiphoseer 2024-01-05 20:59:52 +01:00
parent 6fb88e79a0
commit cb84dbcc22
3 changed files with 6 additions and 1 deletions

View File

@ -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 $<TARGET_FILE:MariaDB::ConnCpp> ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
# Add the subdirectories
add_subdirectory(dCommonTests)

View File

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

View File

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