mst06/cmake/macros/ReplaceHardcodedPrefix.cmake
David Korth aa4019b94d Mst: Added saveXML() to save the string table in XML format.
Added an internal copy of TinyXML2 for Windows builds.
Based on the rom-properties build.

main.cpp: Replace the file extension on the source file with .xml and
use that as the destination filename.
2019-05-11 15:27:42 -04:00

15 lines
449 B
CMake

# Replace hard-coded prefixes.
# Parameters:
# - _var: Variable containing the path with the prefix to replcae.
# - _prefix: Prefix to replace.
MACRO(REPLACE_HARDCODED_PREFIX _var _prefix)
IF(NOT "${_prefix}" STREQUAL "${CMAKE_INSTALL_PREFIX}")
STRING(LENGTH "${_prefix}" prefix_LEN)
IF(${_var})
STRING(SUBSTRING "${${_var}}" ${prefix_LEN} -1 prefix_SUB)
SET(${_var} "${CMAKE_INSTALL_PREFIX}${prefix_SUB}")
ENDIF()
ENDIF()
ENDMACRO()