Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cmake] Add windows resource file for application icon and metadata #384

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
[cmake] Fix metadata in Windows resource file
  • Loading branch information
IAmNotHanni committed Jul 30, 2021
commit 42e015e1358f4159a318ee3d794063a3b5673ae0
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ include(conan_setup)

# The marked constants in application.hpp will be replaced with the following values
set(INEXOR_ENGINE_NAME "Inexor Engine")
set(INEXOR_DEV_TEAM_NAME "Inexor Collective")
set(INEXOR_APP_NAME "Inexor Vulkan-renderer example")
set(INEXOR_LICENSE "MIT License")

set(INEXOR_ENGINE_VERSION_MAJOR 0)
set(INEXOR_ENGINE_VERSION_MINOR 1)
Expand Down
1 change: 1 addition & 0 deletions example/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
add_executable(inexor-vulkan-renderer-example
main.cpp
${CMAKE_BINARY_DIR}/include/inexor/vulkan-renderer/win_resource_file.rc
)

set_target_properties(
Expand Down
2 changes: 1 addition & 1 deletion platform/windows/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
configure_file(win_resource_file.rc.in ${CMAKE_BINARY_DIR}/win_resource_file.rc)
configure_file(win_resource_file.rc.in ${CMAKE_BINARY_DIR}/include/inexor/vulkan-renderer/win_resource_file.rc)
20 changes: 10 additions & 10 deletions platform/windows/win_resource_file.rc.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#undef APSTUDIO_READONLY_SYMBOLS

VS_VERSION_INFO VERSIONINFO
FILEVERSION ${APP_VERSION_MAJOR},${APP_VERSION_MINOR},${APP_VERSION_PATCH},0
PRODUCTVERSION ${APP_VERSION_MAJOR},${APP_VERSION_MINOR},${APP_VERSION_PATCH},0
FILEVERSION ${INEXOR_APP_VERSION_MAJOR},${INEXOR_APP_VERSION_MINOR},${INEXOR_APP_VERSION_PATCH},0
PRODUCTVERSION ${INEXOR_ENGINE_VERSION_MAJOR},${INEXOR_ENGINE_VERSION_MINOR},${INEXOR_ENGINE_VERSION_PATCH},0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -20,14 +20,14 @@ BEGIN
BLOCK "040704b0"
BEGIN
// These placeholders will be filled out with the values specified by CMake
VALUE "CompanyName", "${APP_MANUFACTURER_NAME}"
VALUE "FileDescription", "${APP_DESCRIPTION}"
VALUE "FileVersion", "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_PATCH}"
VALUE "InternalName", "${APP_NAME}"
VALUE "LegalCopyright", "${APP_LICENSE}"
VALUE "OriginalFilename", "${APP_ORIGINAL_NAME}"
VALUE "ProductName", "${APP_NAME}"
VALUE "ProductVersion", "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_PATCH}"
VALUE "CompanyName", "${INEXOR_DEV_TEAM_NAME}"
VALUE "FileDescription", "${INEXOR_APP_NAME}"
VALUE "FileVersion", "${INEXOR_APP_VERSION_MAJOR}.${INEXOR_APP_VERSION_MINOR}.${INEXOR_APP_VERSION_PATCH}"
VALUE "InternalName", "${INEXOR_ENGINE_NAME}"
VALUE "LegalCopyright", "${INEXOR_LICENSE}"
VALUE "OriginalFilename", "${INEXOR_APP_NAME}"
VALUE "ProductName", "${INEXOR_APP_NAME}"
VALUE "ProductVersion", "${INEXOR_ENGINE_VERSION_MAJOR}.${INEXOR_ENGINE_VERSION_MINOR}.${INEXOR_ENGINE_VERSION_PATCH}"
END
END
BLOCK "VarFileInfo"
Expand Down