For Qt GUI, added code to build windows fceux.ico icon into application.

This commit is contained in:
mjbudd77 2021-05-30 20:52:42 -04:00
parent ced185df89
commit 7c0413b5ac
3 changed files with 6 additions and 1 deletions

BIN
icons/fceux.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

1
icons/fceux.rc Normal file
View File

@ -0,0 +1 @@
IDI_ICON1 ICON "fceux.ico"

View File

@ -35,6 +35,7 @@ if(WIN32)
set( OPENGL_LDFLAGS OpenGL::GL ) set( OPENGL_LDFLAGS OpenGL::GL )
set( SDL2_LDFLAGS ${SDL_INSTALL_PREFIX}/SDL2/lib/x64/SDL2.lib ) set( SDL2_LDFLAGS ${SDL_INSTALL_PREFIX}/SDL2/lib/x64/SDL2.lib )
set( SYS_LIBS wsock32 ws2_32 vfw32 ) set( SYS_LIBS wsock32 ws2_32 vfw32 )
set(APP_ICON_RESOURCES_WINDOWS ${CMAKE_SOURCE_DIR}/icons/fceux.rc )
else(WIN32) else(WIN32)
# Non Windows System # Non Windows System
# UNIX (Linux or Mac OSX) # UNIX (Linux or Mac OSX)
@ -517,9 +518,12 @@ set_source_files_properties( ${APP_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION "Res
add_executable( ${APP_NAME} MACOSX_BUNDLE ${APP_ICON} ${SOURCES} ../resources.qrc add_executable( ${APP_NAME} MACOSX_BUNDLE ${APP_ICON} ${SOURCES} ../resources.qrc
${CMAKE_CURRENT_BINARY_DIR}/fceux_git_info.cpp) ${CMAKE_CURRENT_BINARY_DIR}/fceux_git_info.cpp)
elseif (WIN32)
add_executable( ${APP_NAME} ${SOURCES} ../resources.qrc
${CMAKE_CURRENT_BINARY_DIR}/fceux_git_info.cpp
${APP_ICON_RESOURCES_WINDOWS} )
else() else()
add_executable( ${APP_NAME} ${SOURCES} ../resources.qrc add_executable( ${APP_NAME} ${SOURCES} ../resources.qrc
${CMAKE_CURRENT_BINARY_DIR}/fceux_git_info.cpp) ${CMAKE_CURRENT_BINARY_DIR}/fceux_git_info.cpp)
endif() endif()