From e840b5eb40edbac8e72054256112deeaf5c580c2 Mon Sep 17 00:00:00 2001 From: Nicky Dasmijn Date: Sat, 17 Sep 2022 17:37:45 +0200 Subject: MacOs packaging is weird, as Nat already did point out :( Part of his change was omly taking Release builds into account, the other part from me made the same mistake. Use a generator expression with a custom command to get the symlink the way we want. --- indra/test/CMakeLists.txt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'indra/test') diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index c913e4031f..48c15155a6 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -74,15 +74,6 @@ if (WINDOWS) LINK_FLAGS "/NODEFAULTLIB:LIBCMT" LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\"" ) -elseif (DARWIN) - # Support our "@executable_path/../Resources" load path for our test - # executable. This SHOULD properly be "$/Resources", - # but the CMake $ generator expression isn't evaluated by - # CREATE_LINK, so fudge it. - # Make sure the symlink's parent directory exists... - file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/test") - file(CREATE_LINK "../sharedlibs/Release/Resources" "${CMAKE_BINARY_DIR}/test/Resources" - SYMBOLIC) endif (WINDOWS) set(TEST_EXE $) @@ -111,4 +102,13 @@ set(test_results ${CMAKE_CURRENT_BINARY_DIR}/cpp_tests_ok.txt) # developers choose to disable LL_TESTS. if (LL_TESTS) add_custom_target(tests_ok ALL DEPENDS ${test_results}) + if(DARWIN) + # Support our "@executable_path/../Resources" load path for our test + # executable. This SHOULD properly be "$/Resources", + # but the CMake $ generator expression isn't evaluated by + # CREATE_LINK, so fudge it. + add_custom_command( TARGET tests_ok PRE_BUILD + COMMAND cmake -E create_symlink ${SHARED_LIB_STAGING_DIR} ${CMAKE_BINARY_DIR}/test/Resource + ) + endif() endif (LL_TESTS) -- cgit v1.2.3