File: GetDependencies.cmake.in

package info (click to toggle)
freedv 1.3.1-3
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 2,440 kB
  • sloc: cpp: 8,723; ansic: 3,564; python: 42; makefile: 10; sh: 7
file content (37 lines) | stat: -rw-r--r-- 1,536 bytes parent folder | download
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
35
36
37
# As this script is run in a new cmake instance, it does not have access to
# the existing cache variables. Pass them in via the configure_file command.
set(CMAKE_BINARY_DIR @CMAKE_BINARY_DIR@)
set(CMAKE_SOURCE_DIR @CMAKE_SOURCE_DIR@)
set(UNIX @UNIX@)
set(WIN32 @WIN32@)
set(CMAKE_CROSSCOMPILING @CMAKE_CROSSCOMPILING@)
set(CMAKE_FIND_LIBRARY_SUFFIXES @CMAKE_FIND_LIBRARY_SUFFIXES@)
set(CMAKE_FIND_LIBRARY_PREFIXES @CMAKE_FIND_LIBRARY_PREFIXES@)
set(CMAKE_SYSTEM_LIBRARY_PATH @CMAKE_SYSTEM_LIBRARY_PATH@)
set(CMAKE_FIND_ROOT_PATH @CMAKE_FIND_ROOT_PATH@)

set(FREEDV_EXE ${CMAKE_BINARY_DIR}/src/freedv.exe)

include(GetPrerequisites)
get_prerequisites("${FREEDV_EXE}" _deps 1 0 "" "")
foreach(_runtime ${_deps})
    message("Looking for ${_runtime}")
    find_library(RUNTIME_${_runtime} ${_runtime})
    message("${RUNTIME_${_runtime}}")
    if(RUNTIME_${_runtime})
        message("Looking for dependencies of ${_runtime}")
        get_prerequisites("${RUNTIME_${_runtime}}" _deps2 1 0 "" "")
        foreach(_runtime2 ${_deps2})
            find_library(RUNTIME_${_runtime2} ${_runtime2})
            message("${RUNTIME_${_runtime2}}")
            if(RUNTIME_${_runtime2})
                file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin"
                TYPE EXECUTABLE FILES "${RUNTIME_${_runtime2}}")
            endif()
        endforeach()
    endif()
    if(RUNTIME_${_runtime})
        file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin"
        TYPE EXECUTABLE FILES "${RUNTIME_${_runtime}}")
    endif()
endforeach()