mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-12 18:05:28 +00:00
24 lines
780 B
CMake
24 lines
780 B
CMake
|
# SPDX-License-Identifier: BSL-1.0
|
||
|
|
||
|
# Get input from main CMake script
|
||
|
set(MANIFEST_INPUT @MANIFEST_INPUT@)
|
||
|
set(MANIFEST_RELATIVE_DIR @MANIFEST_RELATIVE_DIR@)
|
||
|
set(RUNTIME_RELATIVE_PATH @RUNTIME_RELATIVE_PATH@)
|
||
|
|
||
|
# Remove trailing slash
|
||
|
string(REGEX REPLACE "/$" "" MANIFEST_RELATIVE_DIR "${MANIFEST_RELATIVE_DIR}")
|
||
|
|
||
|
set(RUNTIME_PATH ${CMAKE_INSTALL_PREFIX}/${RUNTIME_RELATIVE_PATH})
|
||
|
|
||
|
if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT)
|
||
|
|
||
|
# Create manifest
|
||
|
configure_file(${MANIFEST_INPUT} ${CMAKE_CURRENT_LIST_DIR}/@RUNTIME_TARGET@.json)
|
||
|
|
||
|
# Install it
|
||
|
file(INSTALL
|
||
|
DESTINATION "${CMAKE_INSTALL_PREFIX}/${MANIFEST_RELATIVE_DIR}"
|
||
|
TYPE FILE
|
||
|
FILES "${CMAKE_CURRENT_LIST_DIR}/@RUNTIME_TARGET@.json")
|
||
|
endif()
|