Qt: Properly preprocess Windows RC file

This commit is contained in:
Jeffrey Pfau 2015-03-16 00:35:09 -07:00
parent 29c198c852
commit 20aae1202a
3 changed files with 11 additions and 9 deletions

View File

@ -110,6 +110,7 @@ find_feature(USE_MAGICK "MagickWand")
# Platform support
if(WIN32)
set(WIN32_VERSION "${LIB_VERSION_MAJOR},${LIB_VERSION_MINOR},${LIB_VERSION_PATCH}")
add_definitions(-D_WIN32_WINNT=0x0600)
list(APPEND OS_LIB ws2_32)
file(GLOB OS_SRC ${CMAKE_SOURCE_DIR}/src/platform/windows/*.c)

View File

@ -1,10 +1,10 @@
IDI_ICON1 ICON DISCARDABLE "mgba.ico"
IDI_ICON1 ICON DISCARDABLE "${CMAKE_SOURCE_DIR}/res/mgba.ico"
#include <windows.h>
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,2,0,0
PRODUCTVERSION 0,2,0,0
FILEVERSION ${WIN32_VERSION},0
PRODUCTVERSION ${WIN32_VERSION},0
BEGIN
BLOCK "StringFileInfo"
BEGIN
@ -12,12 +12,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "endrift"
VALUE "FileDescription", "mGBA Game Boy Advance emulator"
VALUE "FileVersion", "0.2.0.0"
VALUE "InternalName", BINARY_NAME
VALUE "FileVersion", "${LIB_VERSION_STRING}.0"
VALUE "InternalName", "${BINARY_NAME}"
VALUE "LegalCopyright", "(c) 2013 - 2015 Jeffrey Pfau"
VALUE "OriginalFilename", BINARY_NAME
VALUE "ProductName", PROJECT_NAME
VALUE "ProductVersion", PROJECT_VERSION
VALUE "OriginalFilename", "${BINARY_NAME}"
VALUE "ProductName", "${PROJECT_NAME}"
VALUE "ProductVersion", "${BINARY_NAME}"
END
END

View File

@ -106,7 +106,8 @@ set_source_files_properties(${CMAKE_SOURCE_DIR}/res/mgba.icns PROPERTIES MACOSX_
qt5_add_resources(RESOURCES resources.qrc)
if(WIN32)
list(APPEND RESOURCES ${CMAKE_SOURCE_DIR}/res/mgba.rc)
configure_file(${CMAKE_SOURCE_DIR}/res/mgba.rc.in ${CMAKE_BINARY_DIR}/res/mgba.rc)
list(APPEND RESOURCES ${CMAKE_BINARY_DIR}/res/mgba.rc)
endif()
add_executable(${BINARY_NAME}-qt WIN32 MACOSX_BUNDLE main.cpp ${CMAKE_SOURCE_DIR}/res/mgba.icns ${SOURCE_FILES} ${PLATFORM_SRC} ${UI_FILES} ${AUDIO_SRC} ${RESOURCES})
set_target_properties(${BINARY_NAME}-qt PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/res/info.plist.in COMPILE_DEFINITIONS "${FEATURE_DEFINES}")