File: install_imported.cmake.in

package info (click to toggle)
sight 25.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 42,180 kB
  • sloc: cpp: 289,476; xml: 17,257; ansic: 9,878; python: 1,379; sh: 144; makefile: 33
file content (33 lines) | stat: -rw-r--r-- 1,238 bytes parent folder | download | duplicates (2)
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
set(RC_DIRS "@IMPORTED_RC_DIRS@" )
if(RC_DIRS)
    foreach(RC_DIR ${RC_DIRS})
        string(REGEX MATCH "(.*),(.*)" FOLDER ${RC_DIR})
        file(INSTALL DESTINATION "@CMAKE_INSTALL_PREFIX@/share/${CMAKE_MATCH_1}" TYPE DIRECTORY FILES ${CMAKE_MATCH_2})
    endforeach()
endif()

set(LIBS "@IMPORTED_LIBS@" )
if(LIBS)
    file(INSTALL DESTINATION "@CMAKE_INSTALL_PREFIX@/@SIGHT_MODULE_LIB_PREFIX@" TYPE DIRECTORY FILES ${LIBS})
    if(UNIX)
        # Recreate symlinks... Instead we could use COPY with FOLLOW_SYMLINK_CHAIN but we would have no install log
        foreach(LIB ${LIBS})
            get_filename_component(LIB_NAME ${LIB} NAME)
            string(REGEX REPLACE "(.*so.[0-9]+\\.[0-9])+\\..*" "\\1" LIB_NAME_MAJOR ${LIB_NAME})

            file(CREATE_LINK 
                ${LIB_NAME}
                @CMAKE_INSTALL_PREFIX@/@SIGHT_MODULE_LIB_PREFIX@/${LIB_NAME_MAJOR}
                SYMBOLIC
            )

            string(REGEX REPLACE "(.*so).[0-9]+\\.[0-9]+\\..*" "\\1" LIB_NAME_RAW ${LIB_NAME})

            file(CREATE_LINK 
                ${LIB_NAME}
                @CMAKE_INSTALL_PREFIX@/@SIGHT_MODULE_LIB_PREFIX@/${LIB_NAME_RAW}
                SYMBOLIC
            )
        endforeach()
    endif()
endif()