Skip to content

Commit

Permalink
macOS|CMake: Deploy all dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Sep 1, 2019
1 parent 7b1bc9f commit 7da29eb
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
5 changes: 4 additions & 1 deletion doomsday/build/scripts/build_deps.py
Expand Up @@ -70,7 +70,10 @@
}
if os.path.exists(CFG_PATH):
cfg = json.load(open(CFG_PATH, 'rt'))
print(cfg)

print("Configuration:")
for key in cfg:
print(" %-15s %s" % (key + ':', cfg[key]))

show_help = (len(sys.argv) == 1)
do_build = False
Expand Down
24 changes: 15 additions & 9 deletions doomsday/cmake/Macros.cmake
Expand Up @@ -705,9 +705,10 @@ function (deng_install_bundle_deps target)
set (_fwDir "${_outName}.app/Contents/Frameworks")
foreach (_dep ${_deps})
if (TARGET ${_dep})
if (_dep MATCHES "Deng::(.*)")
if (_dep MATCHES "(.*)::(.*)")
install (FILES $<TARGET_FILE:${_dep}> DESTINATION ${_fwDir})
else ()
#message (STATUS "CHECKING ${_dep}")
get_property (libs TARGET ${_dep} PROPERTY INTERFACE_LINK_LIBRARIES)
set (_fixInst YES)
if (NOT libs)
Expand All @@ -718,14 +719,19 @@ function (deng_install_bundle_deps target)
if (IS_DIRECTORY ${_tlib})
install (DIRECTORY ${_tlib} DESTINATION ${_fwDir})
else ()
install (FILES ${_tlib} DESTINATION ${_fwDir})
get_filename_component (_tlibname ${_tlib} NAME)
if (_fixInst)
install (CODE "
set (CMAKE_MODULE_PATH ${DE_SOURCE_DIR}/cmake)
set (CMAKE_INSTALL_NAME_TOOL ${CMAKE_INSTALL_NAME_TOOL})
include (Macros)
fix_bundled_install_names (\${CMAKE_INSTALL_PREFIX}/${_fwDir}/${_tlibname} ${_tlibname})")
if (EXISTS ${_tlib} OR _tlib MATCHES "^\\\$<")
#message (STATUS "INSTALLING: ${_tlib}")
install (FILES ${_tlib} DESTINATION ${_fwDir})
get_filename_component (_tlibname ${_tlib} NAME)
if (_fixInst)
install (CODE "
set (CMAKE_MODULE_PATH ${DE_SOURCE_DIR}/cmake)
set (CMAKE_INSTALL_NAME_TOOL ${CMAKE_INSTALL_NAME_TOOL})
include (Macros)
fix_bundled_install_names (\${CMAKE_INSTALL_PREFIX}/${_fwDir}/${_tlibname} ${_tlibname})")
endif ()
else ()
#message (STATUS "NOT installing: ${_tlib}")
endif ()
endif ()
endforeach (_tlib)
Expand Down

0 comments on commit 7da29eb

Please sign in to comment.