summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/cmake/Copy3rdPartyLibs.cmake18
-rw-r--r--indra/test/CMakeLists.txt18
2 files changed, 18 insertions, 18 deletions
diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index b265c92e45..5bb988d639 100644
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -152,15 +152,6 @@ if(WINDOWS)
endforeach()
elseif(DARWIN)
- # Support our "@executable_path/../Resources" load path for executables
- # that end up in any of the above SHARED_LIB_STAGING_DIR_MUMBLE
- # directories.
- # Cannot use ${SHARED_LIB_STAGING_DIR} here as it used a generator expression and tha this not
- # supported by file(...)
- file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/sharedlibs/Release/Resources")
- file(CREATE_LINK "${CMAKE_BINARY_DIR}/sharedlibs/Release/Resources" "${CMAKE_BINARY_DIR}/sharedlibs/Resources"
- SYMBOLIC)
-
set(vivox_lib_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
set(slvoice_files SLVoice)
set(vivox_libs
@@ -299,3 +290,12 @@ add_custom_target(
stage_third_party_libs ALL
DEPENDS ${third_party_targets}
)
+
+if(DARWIN)
+ # Support our "@executable_path/../Resources" load path for executables
+ # that end up in any of the above SHARED_LIB_STAGING_DIR_MUMBLE
+ # directories.
+ add_custom_command( TARGET stage_third_party_libs POST_BUILD
+ COMMAND cmake -E create_symlink ${SHARED_LIB_STAGING_DIR} ${CMAKE_BINARY_DIR}/sharedlibs/Resources
+ )
+endif() \ No newline at end of file
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 "$<TARGET_FILE_DIR:lltest>/Resources",
- # but the CMake $<TARGET_FILE_DIR> 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 $<TARGET_FILE:lltest>)
@@ -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 "$<TARGET_FILE_DIR:lltest>/Resources",
+ # but the CMake $<TARGET_FILE_DIR> 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)