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