mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-12-17 13:32:22 +00:00
Add application icon
This commit is contained in:
parent
64d9cfbd9b
commit
25610a6249
4 changed files with 14 additions and 1 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -397,3 +397,6 @@ FodyWeavers.xsd
|
|||
|
||||
# JetBrains Rider
|
||||
*.sln.iml
|
||||
|
||||
# Don't ignore resources
|
||||
!UnleashedRecomp/res/[Ww][Ii][Nn]32/
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ file(INSTALL
|
|||
RENAME "${TARGET_NAME}.toml"
|
||||
)
|
||||
|
||||
# Generate icon bitmap header for SDL surface.
|
||||
BIN2H(SOURCE_FILE "res/icon.bmp" HEADER_FILE "res/icon.h" ARRAY_TYPE "unsigned char" VARIABLE_NAME "g_icon")
|
||||
|
||||
set(SWA_PRECOMPILED_HEADERS
|
||||
|
|
@ -74,7 +75,15 @@ set(SWA_CXX_SOURCES
|
|||
${SWA_UI_CXX_SOURCES}
|
||||
)
|
||||
|
||||
add_executable(UnleashedRecomp ${SWA_CXX_SOURCES})
|
||||
if (WIN32)
|
||||
# Set up Win32 resources for application icon.
|
||||
set(ICON_PATH "${PROJECT_SOURCE_DIR}/res/win32/icon.ico")
|
||||
configure_file("res/win32/res.rc" "${CMAKE_BINARY_DIR}/res.rc" @ONLY)
|
||||
add_executable(UnleashedRecomp ${SWA_CXX_SOURCES} "${CMAKE_BINARY_DIR}/res.rc")
|
||||
else()
|
||||
add_executable(UnleashedRecomp ${SWA_CXX_SOURCES})
|
||||
endif()
|
||||
|
||||
set_target_properties(UnleashedRecomp PROPERTIES OUTPUT_NAME ${TARGET_NAME})
|
||||
|
||||
find_package(d3d12-memory-allocator CONFIG REQUIRED)
|
||||
|
|
|
|||
BIN
UnleashedRecomp/res/win32/icon.ico
Normal file
BIN
UnleashedRecomp/res/win32/icon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 110 KiB |
1
UnleashedRecomp/res/win32/res.rc
Normal file
1
UnleashedRecomp/res/win32/res.rc
Normal file
|
|
@ -0,0 +1 @@
|
|||
IDI_ICON1 ICON "@ICON_PATH@"
|
||||
Loading…
Add table
Reference in a new issue