Skip to content

Commit

Permalink
Set application icon on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
yhsb2k committed Sep 16, 2023
1 parent ccfee05 commit fc123bb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ add_subdirectory(terminal)
set(BOOST_INCLUDE_LIBRARIES asio program_options)
add_subdirectory(third_party/boost)

add_executable(${CMAKE_PROJECT_NAME} main.cpp cli_options.cpp)
add_executable(${CMAKE_PROJECT_NAME}
main.cpp
cli_options.cpp
$<$<PLATFORM_ID:Windows>:icon.rc>
)

target_link_options(${CMAKE_PROJECT_NAME} PRIVATE
$<$<CXX_COMPILER_ID:GNU>:-static-libgcc;-static-libstdc++;$<$<PLATFORM_ID:Windows>:-static>>
Expand Down Expand Up @@ -43,5 +47,7 @@ else()
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMAND_ERROR_IS_FATAL ANY)"
)
install(FILES ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.AppImage DESTINATION .)
install(FILES ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.AppImage DESTINATION .
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
endif()
2 changes: 1 addition & 1 deletion app.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ Type=Application
Name=minicom2
Comment=Serial port communication
Exec=minicom2 %F
Terminal=false
Terminal=true
Categories=Utility;
Icon=icon
Binary file added icon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions icon.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
IDI_ICON1 ICON DISCARDABLE "icon.ico"

0 comments on commit fc123bb

Please sign in to comment.