Merge branch 'qt-windows-rc' of https://github.com/lemondrops/86Box into qt

This commit is contained in:
ts-korhonen
2022-02-04 16:58:26 +02:00
2 changed files with 139 additions and 0 deletions

View File

@@ -114,6 +114,22 @@ add_library(ui STATIC
../qt_resources.qrc
)
if(WIN32)
enable_language(RC)
target_sources(86Box PUBLIC ../win/86Box-qt.rc)
# CMake 3.22 messed this up for clang/clang++
# See https://gitlab.kitware.com/cmake/cmake/-/issues/22611
if(MSVC OR (NOT MINGW AND CMAKE_VERSION VERSION_GREATER_EQUAL 3.22))
# MSVC linker adds its own manifest to the executable, which fails if
# we include ours in 86Box.rc. We therefore need to pass the manifest
# directly as as a source file, so the linker can use that instead.
set_property(SOURCE ../win/86Box-qt.rc PROPERTY COMPILE_DEFINITIONS NO_INCLUDE_MANIFEST)
target_sources(86Box PRIVATE ../win/86Box.manifest)
endif()
endif()
if(WIN32 AND NOT MINGW)
target_sources(plat PRIVATE ../win/win_opendir.c)
endif()