FidelityFX-FSR2/common.cmake
2023-03-03 19:34:56 +00:00

26 lines
845 B
CMake

#
# enables multithreading compilation
#
#
# includes cauldron's helper cmakes
#
include(${CMAKE_CURRENT_SOURCE_DIR}/../../libs/cauldron/common.cmake)
#
# Add manifest so the app uses the right DPI settings
#
function(addManifest PROJECT_NAME)
IF (MSVC)
IF (CMAKE_MAJOR_VERSION LESS 3)
MESSAGE(WARNING "CMake version 3.0 or newer is required use build variable TARGET_FILE")
ELSE()
ADD_CUSTOM_COMMAND(
TARGET ${PROJECT_NAME}
POST_BUILD
COMMAND "mt.exe" -manifest \"${CMAKE_CURRENT_SOURCE_DIR}\\dpiawarescaling.manifest\" -inputresource:\"$<TARGET_FILE:${PROJECT_NAME}>\"\;\#1 -outputresource:\"$<TARGET_FILE:${PROJECT_NAME}>\"\;\#1
COMMENT "Adding display aware manifest..."
)
ENDIF()
ENDIF(MSVC)
endfunction()