File: InstallMacOS.cmake

package info (click to toggle)
kicad 9.0.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 770,320 kB
  • sloc: cpp: 961,692; ansic: 121,001; xml: 66,428; python: 18,387; sh: 1,010; awk: 301; asm: 292; makefile: 227; javascript: 167; perl: 10
file content (34 lines) | stat: -rw-r--r-- 1,043 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# 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()