qt5base-lts/cmake/QtGenerateVersionScript.cmake
Alexey Edelev 5a5ad8c002 Add "content file" mode for the qt_internal_add_linker_version_script
Add the support of pre-cooked content for the LD version script. The
content can be generated without using the perl script at configure
or build time.

Change-Id: I1316e114a1d5550b2fdcf3482a51f336fb311a29
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-08-09 15:59:08 +02:00

16 lines
381 B
CMake

cmake_minimum_required(VERSION 3.16)
if(EXISTS "${PRIVATE_CONTENT_FILE}")
file(READ "${PRIVATE_CONTENT_FILE}" PRIVATE_CONTENT)
endif()
if(NOT EXISTS "${IN_FILE}")
message(FATAL_ERROR "Input file ${IN_FILE} doesn't exists")
endif()
if(OUT_FILE STREQUAL "")
message(FATAL_ERROR "Output file is not specified")
endif()
configure_file("${IN_FILE}" "${OUT_FILE}" @ONLY)