mst06/cmake/macros/WindowsFunctions.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

29 lines
1.0 KiB
CMake

###### Windows-specific CMake functions. ######
# Set Windows subsystem when building with MSVC.
FUNCTION(SET_WINDOWS_SUBSYSTEM _target _subsystem)
IF(WIN32 AND MSVC)
GET_TARGET_PROPERTY(TARGET_LINK_FLAGS ${_target} LINK_FLAGS)
IF(TARGET_LINK_FLAGS)
SET(TARGET_LINK_FLAGS "${TARGET_LINK_FLAGS} ${RP_LINKER_FLAGS_${_subsystem}_EXE}")
ELSE()
SET(TARGET_LINK_FLAGS "${RP_LINKER_FLAGS_${_subsystem}_EXE}")
ENDIF()
SET_TARGET_PROPERTIES(${_target} PROPERTIES LINK_FLAGS "${TARGET_LINK_FLAGS}")
ENDIF(WIN32 AND MSVC)
ENDFUNCTION()
# Disable automatic manifest generation when building with MSVC.
# Only use this if you have a custom manifest specified in the resource script.
FUNCTION(SET_WINDOWS_NO_MANIFEST _target)
IF(WIN32 AND MSVC)
GET_TARGET_PROPERTY(TARGET_LINK_FLAGS ${_target} LINK_FLAGS)
IF(TARGET_LINK_FLAGS)
SET(TARGET_LINK_FLAGS "${TARGET_LINK_FLAGS} /MANIFEST:NO")
ELSE()
SET(TARGET_LINK_FLAGS "/MANIFEST:NO")
ENDIF()
SET_TARGET_PROPERTIES(${_target} PROPERTIES LINK_FLAGS "${TARGET_LINK_FLAGS}")
ENDIF(WIN32 AND MSVC)
ENDFUNCTION()