OSX poking.

This commit is contained in:
Shyotl
2014-12-28 00:20:30 -06:00
parent 86240966b6
commit 2d2513369a

View File

@@ -1,17 +1,13 @@
# ll_deploy_sharedlibs_command
# target_exe: the cmake target of the executable for which the shared libs will be deployed.
macro(ll_deploy_sharedlibs_command target_exe)
SET(TARGET_LOCATION $<TARGET_FILE:${target_exe}>)
get_filename_component(OUTPUT_PATH ${TARGET_LOCATION} PATH)
SET(OUTPUT_PATH $<TARGET_FILE:${target_exe}>)
if(DARWIN)
SET_TEST_PATH(SEARCH_DIRS)
get_target_property(IS_BUNDLE ${target_exe} MACOSX_BUNDLE)
if(IS_BUNDLE)
# If its a bundle the exe is not in the target location, this should find it.
get_filename_component(TARGET_FILE ${TARGET_LOCATION} NAME)
set(OUTPUT_PATH ${TARGET_LOCATION}.app/Contents/MacOS)
set(TARGET_LOCATION ${OUTPUT_PATH}/${TARGET_FILE})
set(OUTPUT_PATH ${OUTPUT_PATH}/../Resources)
endif(IS_BUNDLE)
elseif(WINDOWS)
@@ -26,7 +22,7 @@ macro(ll_deploy_sharedlibs_command target_exe)
TARGET ${target_exe} POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS
"-DBIN_NAME=\"${TARGET_LOCATION}\""
"-DBIN_NAME=\"$<TARGET_FILE:${target_exe}>\""
"-DSEARCH_DIRS=\"${SEARCH_DIRS}\""
"-DDST_PATH=\"${OUTPUT_PATH}\""
"-P"