Add icon to exe file as resource.
It's hard to test for me because currently I can compile it only on virtual machine and it takes long time. But it should work.
This commit is contained in:
parent
78df1bf371
commit
4584464798
@ -173,6 +173,9 @@ endif()
|
||||
# TODO: remove this switch
|
||||
add_definitions(-DHAVE_OGGVORBIS)
|
||||
|
||||
if(WIN32)
|
||||
configure_file("${STK_SOURCE_DIR}/windows_installer/icon_rc.template" "${PROJECT_BINARY_DIR}/tmp/icon.rc")
|
||||
endif()
|
||||
|
||||
# Provides list of source and header files (STK_SOURCES and STK_HEADERS)
|
||||
include(sources.cmake)
|
||||
@ -228,7 +231,7 @@ else()
|
||||
endif()
|
||||
|
||||
# Build the final executable
|
||||
add_executable(supertuxkart ${STK_SOURCES} ${STK_HEADERS})
|
||||
add_executable(supertuxkart ${STK_SOURCES} ${STK_RESOURCES} ${STK_HEADERS})
|
||||
target_link_libraries(supertuxkart ${PTHREAD_LIBRARY})
|
||||
endif()
|
||||
|
||||
@ -369,7 +372,6 @@ install(FILES ${PROJECT_BINARY_DIR}/supertuxkart.desktop DESTINATION share/appli
|
||||
install(FILES data/supertuxkart_32.png data/supertuxkart_128.png DESTINATION share/pixmaps)
|
||||
install(FILES data/supertuxkart.appdata DESTINATION share/appdata)
|
||||
|
||||
|
||||
set(PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||
configure_file(data/supertuxkart_desktop.template supertuxkart.desktop)
|
||||
add_dependencies(supertuxkart supertuxkart.desktop)
|
||||
|
@ -3,3 +3,4 @@
|
||||
file(GLOB_RECURSE STK_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "src/*.hpp")
|
||||
file(GLOB_RECURSE STK_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "src/*.cpp")
|
||||
file(GLOB_RECURSE STK_SHADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "data/shaders/*")
|
||||
file(GLOB_RECURSE STK_RESOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${PROJECT_BINARY_DIR}/tmp/*.rc")
|
||||
|
1
src/windows_installer/icon_rc.template
Normal file
1
src/windows_installer/icon_rc.template
Normal file
@ -0,0 +1 @@
|
||||
100 ICON "@PROJECT_SOURCE_DIR@/src/windows_installer/icon.ico"
|
Loading…
Reference in New Issue
Block a user