all repos — mgba @ 20aae1202a22ecda2313f77c141f3a288c23500f

mGBA Game Boy Advance Emulator

Qt: Properly preprocess Windows RC file
Jeffrey Pfau jeffrey@endrift.com
Mon, 16 Mar 2015 00:35:09 -0700
commit

20aae1202a22ecda2313f77c141f3a288c23500f

parent

29c198c8522d55b678ebd7782f8c265195a16bed

4 files changed, 31 insertions(+), 29 deletions(-)

jump to
M CMakeLists.txtCMakeLists.txt

@@ -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)
D res/mgba.rc

@@ -1,28 +0,0 @@

-IDI_ICON1 ICON DISCARDABLE "mgba.ico" - -#include <windows.h> - -VS_VERSION_INFO VERSIONINFO -FILEVERSION 0,2,0,0 -PRODUCTVERSION 0,2,0,0 -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904E4" - BEGIN - VALUE "CompanyName", "endrift" - VALUE "FileDescription", "mGBA Game Boy Advance emulator" - VALUE "FileVersion", "0.2.0.0" - VALUE "InternalName", BINARY_NAME - VALUE "LegalCopyright", "(c) 2013 - 2015 Jeffrey Pfau" - VALUE "OriginalFilename", BINARY_NAME - VALUE "ProductName", PROJECT_NAME - VALUE "ProductVersion", PROJECT_VERSION - END - END - - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1252 - END -END
A res/mgba.rc.in

@@ -0,0 +1,28 @@

+IDI_ICON1 ICON DISCARDABLE "${CMAKE_SOURCE_DIR}/res/mgba.ico" + +#include <windows.h> + +VS_VERSION_INFO VERSIONINFO +FILEVERSION ${WIN32_VERSION},0 +PRODUCTVERSION ${WIN32_VERSION},0 +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" + BEGIN + VALUE "CompanyName", "endrift" + VALUE "FileDescription", "mGBA Game Boy Advance emulator" + 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", "${BINARY_NAME}" + END + END + + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END +END
M src/platform/qt/CMakeLists.txtsrc/platform/qt/CMakeLists.txt

@@ -106,7 +106,8 @@ set_source_files_properties(${CMAKE_SOURCE_DIR}/res/mgba.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources)

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}")