7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2024-11-21 22:35:00 +00:00
kicad/cmake/InstallSteps/InstallMacOS.cmake
Jon Evans d371bb06ae New macOS installation scripts
Replaces BundleUtilities that got broken by recent updates
and is basically unmaintained by cmake.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15376
2023-09-19 17:23:30 -04:00

34 lines
1.0 KiB
CMake

# Copies the runtime dependencies for a given target into the bundle
function( install_runtime_deps exe libs dest )
# set(CMAKE_MESSAGE_LOG_LEVEL DEBUG)
message( DEBUG "install_runtime_deps ${exe}\n libs: ${libs}\n dest: ${dest}" )
file( GET_RUNTIME_DEPENDENCIES
LIBRARIES ${libs}
EXECUTABLES ${exe}
RESOLVED_DEPENDENCIES_VAR _r_deps
UNRESOLVED_DEPENDENCIES_VAR _u_deps
POST_EXCLUDE_FILES Python
)
if( "${dest}" STREQUAL "" )
set( dest "${OSX_BUNDLE_INSTALL_LIB_DIR}" )
message( DEBUG ".... Updated dest to ${dest}" )
endif()
foreach( _file ${_r_deps} )
message( DEBUG ".... install dep ${_file}" )
file(INSTALL
DESTINATION "${dest}"
TYPE SHARED_LIBRARY
FOLLOW_SYMLINK_CHAIN
FILES "${_file}"
)
endforeach()
# list(LENGTH _u_deps _u_length)
# if("${_u_length}" GREATER 0)
# message(WARNING "Unresolved dependencies detected! ${_u_deps}")
# endif()
endfunction()