Set executable icon

On Windows, the executable icon is important since it is also inherited
by CPACK_NSIS_INSTALLED_ICON_NAME [1] and CPACK_PACKAGE_EXECUTABLES. [2]

[1]: https://cmake.org/cmake/help/latest/cpack_gen/nsis.html#variable:CPACK_NSIS_INSTALLED_ICON_NAME
[2]: https://cmake.org/cmake/help/latest/module/CPack.html#variable:CPACK_PACKAGE_EXECUTABLES
This commit is contained in:
Xavier Del Campo Romero 2025-01-11 13:54:51 +01:00
parent 1ead0ca79f
commit 76b83654e0
Signed by: xavi
GPG key ID: 84FF3612A9BF43F2
2 changed files with 7 additions and 0 deletions

View file

@ -0,0 +1 @@
IDI_ICON1 ICON DISCARDABLE "${SD_DATADIR_ABS}/data/icons/icon.ico"

View file

@ -9,6 +9,12 @@ IF(MSVC)
SET(_SOURCES ${_SOURCES} main.rc resource.h ../../data/data/icons/icon.ico)
ENDIF(MSVC)
IF(SD_HAS_DATADIR AND NOT SD_ASSUME_DATADIR)
configure_file(${CMAKE_SOURCE_DIR}/cmake/${PROJECT_NAME}.rc.in.cmake
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.rc)
SET(_SOURCES ${_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.rc)
ENDIF()
ADD_INTERFACE_INCLUDEDIR()
ADD_SDLIB_INCLUDEDIR(tgf tgfclient tgfdata math portability)