-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cmake] Add windows resource file for application icon and metadata
- Loading branch information
1 parent
9ed238a
commit 7090fac
Showing
6 changed files
with
81 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
set(APP_MANUFACTURER_NAME "Inexor collective") | ||
set(APP_DESCRIPTION "Inexor vulkan-renderer") | ||
set(APP_NAME "Inexor engine") | ||
set(APP_LICENSE "MIT License") | ||
set(APP_ORIGINAL_NAME "Inexor vulkan renderer example") | ||
set(APP_VERSION_MAJOR 1) | ||
set(APP_VERSION_MINOR 0) | ||
set(APP_VERSION_PATCH 0) | ||
|
||
# Replace variables in resource file with CMake values | ||
configure_file( | ||
win_resource_file.rc.in ${CMAKE_BINARY_DIR}/include/inexor/vulkan-renderer/win_resource_file.rc | ||
) | ||
|
||
configure_file( | ||
resource.hpp.in ${CMAKE_BINARY_DIR}/include/inexor/vulkan-renderer/resource.hpp | ||
) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Specify icon from resource file as icon of executable | ||
#define IDI_ICON1 105 | ||
|
||
#ifdef APSTUDIO_INVOKED | ||
#ifndef APSTUDIO_READONLY_SYMBOLS | ||
#define _APS_NEXT_RESOURCE_VALUE 106 | ||
#define _APS_NEXT_COMMAND_VALUE 40001 | ||
#define _APS_NEXT_CONTROL_VALUE 1001 | ||
#define _APS_NEXT_SYMED_VALUE 101 | ||
#endif | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#include "resource.hpp" | ||
|
||
#define APSTUDIO_READONLY_SYMBOLS | ||
#include "winres.h" | ||
#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 | ||
FILEFLAGSMASK 0x3fL | ||
#ifdef _DEBUG | ||
FILEFLAGS 0x1L | ||
#else | ||
FILEFLAGS 0x0L | ||
#endif | ||
FILEOS 0x40004L | ||
FILETYPE 0x1L | ||
FILESUBTYPE 0x0L | ||
BEGIN | ||
BLOCK "StringFileInfo" | ||
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}" | ||
END | ||
END | ||
BLOCK "VarFileInfo" | ||
BEGIN | ||
VALUE "Translation", 0x407, 1200 | ||
END | ||
END | ||
|
||
// Use Inexor logo as icon for executable | ||
IDI_ICON1 ICON "${PROJECT_SOURCE_DIR}\\platform\\windows\\inexor_icon_256px.ico" |