summaryrefslogtreecommitdiff
path: root/indra/cmake/LLSharedLibs.cmake
diff options
context:
space:
mode:
authorMark Palange (Mani) <palange@lindenlab.com>2009-11-06 10:53:51 -0800
committerMark Palange (Mani) <palange@lindenlab.com>2009-11-06 10:53:51 -0800
commit05baf9940bd8e9491c4cc7fb426d8e56f50e4d22 (patch)
tree5c512c356b703da68dab533cfd652b261b17c784 /indra/cmake/LLSharedLibs.cmake
parent258eb3d7dd298390eca2740dc3c18c7c454df5e0 (diff)
parent953b7ea550bb59f5ebc12c0dfc4e0a454da4f601 (diff)
merge
Diffstat (limited to 'indra/cmake/LLSharedLibs.cmake')
-rw-r--r--indra/cmake/LLSharedLibs.cmake24
1 files changed, 21 insertions, 3 deletions
diff --git a/indra/cmake/LLSharedLibs.cmake b/indra/cmake/LLSharedLibs.cmake
index a8c81609bb..28f0e7ad12 100644
--- a/indra/cmake/LLSharedLibs.cmake
+++ b/indra/cmake/LLSharedLibs.cmake
@@ -1,9 +1,21 @@
+
+if(DARWIN)
+ set(TMP_PATH "../Resource")
+elseif(LINUX)
+ set(TMP_PATH "../lib")
+else(DARWIN)
+ set(TMP_PATH ".")
+endif(DARWIN)
+
+ set(SHARED_LIB_REL_PATH ${TMP_PATH} CACHE STRING "Relative path from executable to shared libs")
+
# ll_deploy_sharedlibs_command
# target_exe: the cmake target of the executable for which the shared libs will be deployed.
# search_dirs: a list of dirs to search for the dependencies
# dst_path: path to copy deps to, relative to the output location of the target_exe
macro(ll_deploy_sharedlibs_command target_exe search_dirs dst_path)
get_target_property(OUTPUT_LOCATION ${target_exe} LOCATION)
+ get_filename_component(OUTPUT_PATH ${OUTPUT_LOCATION} PATH)
if(DARWIN)
get_target_property(IS_BUNDLE ${target_exe} MACOSX_BUNDLE)
@@ -12,16 +24,22 @@ macro(ll_deploy_sharedlibs_command target_exe search_dirs dst_path)
set(OUTPUT_PATH ${OUTPUT_LOCATION}.app/Contents/MacOS)
set(OUTPUT_LOCATION ${OUTPUT_PATH}/${TARGET_FILE})
endif(IS_BUNDLE)
- else(DARWIN)
- message(FATAL_ERROR "Only darwin currently supported!")
endif(DARWIN)
+
+ if(WINDOWS)
+ set(REAL_SEARCH_DIRS ${search_dirs} "$ENV{SystemRoot}/system32")
+ endif(WINDOWS)
+
+ if(LINUX)
+ message(FATAL_ERROR "LINUX Unsupported!?!")
+ endif(LINUX)
add_custom_command(
TARGET ${target_exe} POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS
"-DBIN_NAME=\"${OUTPUT_LOCATION}\""
- "-DSEARCH_DIRS=\"${search_dirs}\""
+ "-DSEARCH_DIRS=\"${REAL_SEARCH_DIRS}\""
"-DDST_PATH=\"${OUTPUT_PATH}/${dst_path}\""
"-P"
"${CMAKE_SOURCE_DIR}/cmake/DeploySharedLibs.cmake"