From ca19ea1ce8535428d7cc969302c61bfda735c353 Mon Sep 17 00:00:00 2001 From: Nadia Holmquist Pedersen Date: Sun, 6 Nov 2022 02:53:51 +0100 Subject: Windows resource/manifest fixes * Report correct Windows architecture for the build in the manifest * Output processed .rc/.manifest in the CMake binary dir to prevent potential issues with the files conflicting if cross compiling melonDS on the same Windows machine * Make the original file name actually make sense --- src/frontend/qt_sdl/CMakeLists.txt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/frontend/qt_sdl/CMakeLists.txt b/src/frontend/qt_sdl/CMakeLists.txt index 6b964f3..96686b5 100644 --- a/src/frontend/qt_sdl/CMakeLists.txt +++ b/src/frontend/qt_sdl/CMakeLists.txt @@ -157,8 +157,18 @@ if (UNIX) elseif (WIN32) option(PORTABLE "Make a portable build that looks for its configuration in the current directory" ON) - configure_file("${CMAKE_SOURCE_DIR}/res/melon.rc.in" "${CMAKE_SOURCE_DIR}/melon.rc") - target_sources(melonDS PUBLIC "${CMAKE_SOURCE_DIR}/melon.rc") + configure_file("${CMAKE_SOURCE_DIR}/res/melon.rc.in" "${CMAKE_BINARY_DIR}/res/melon.rc") + target_sources(melonDS PUBLIC "${CMAKE_BINARY_DIR}/res/melon.rc") + + if (${ARCHITECTURE} STREQUAL x86_64) + set(WIN32_ARCHITECTURE amd64) + elseif (${ARCHITECTURE} STREQUAL x86) + set(WIN32_ARCHITECTURE x86) + elseif (${ARCHITECTURE} MATCHES "ARM(64)?") + string(TOLOWER "${ARCHITECTURE}" WIN32_ARCHITECTURE) + endif() + + configure_file("${CMAKE_SOURCE_DIR}/res/xp.manifest.in" "${CMAKE_BINARY_DIR}/res/xp.manifest") target_link_libraries(melonDS PRIVATE ws2_32 iphlpapi) set_target_properties(melonDS PROPERTIES LINK_FLAGS_DEBUG "-mconsole") -- cgit v1.2.3