From 6d37618301efa572017bd2b1ebf7b019b6b483f0 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Sat, 6 Jan 2024 16:56:52 +0000 Subject: [PATCH] Add OpenMW-CS RC file to app rather than static lib Static libraries on Windows can't have embedded resources, so this mean the icon for the CS wasn't used. This could have also been resolved by explicitly requesting the library type as OBJECT rather than letting it default to STATIC (as object libraries aren't a thing on-disk and are just an abstraction in CMake so you can use the same object files in different targets), but this seemed less invasive. I also made it Win32-only as a Windows .rc file is meaningless on Unix, but it shouldn't be MSVC-only as MinGW can consume them. --- apps/opencs/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/opencs/CMakeLists.txt b/apps/opencs/CMakeLists.txt index 70efd06090..610c5157aa 100644 --- a/apps/opencs/CMakeLists.txt +++ b/apps/opencs/CMakeLists.txt @@ -1,5 +1,4 @@ set (OPENCS_SRC - ${CMAKE_SOURCE_DIR}/files/windows/opencs.rc ) opencs_units (. editor) @@ -146,6 +145,9 @@ source_group (openmw-cs FILES main.cpp ${OPENCS_SRC} ${OPENCS_HDR}) if(WIN32) set(QT_USE_QTMAIN TRUE) + set(OPENCS_RC_FILE ${CMAKE_SOURCE_DIR}/files/windows/opencs.rc) +else(WIN32) + set(OPENCS_RC_FILE "") endif(WIN32) if (QT_VERSION_MAJOR VERSION_EQUAL 5) @@ -186,6 +188,7 @@ if(BUILD_OPENCS) ${OPENCS_CFG} ${OPENCS_DEFAULT_FILTERS_FILE} ${OPENCS_OPENMW_CFG} + ${OPENCS_RC_FILE} main.cpp )