mirror of
https://github.com/GerbilSoft/mst06.git
synced 2025-06-18 19:45:32 -04:00

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.
29 lines
1.0 KiB
CMake
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()
|