Skip to content

Commit

Permalink
Add app icon for windows (#142)
Browse files Browse the repository at this point in the history
Signed-off-by: Raul Sánchez-Mateos <[email protected]>
  • Loading branch information
rsanchez15 committed Dec 23, 2021
1 parent 5ffca3e commit 2517aa3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ add_definitions(${Qt5Widgets_DEFINITIONS} ${QtQml_DEFINITIONS} ${Qt5Quick_DEFINI
# Thus, if this file is required in subdirectories, this 4 instructions below must be added in the same
# CMakeList of the executable (Use different name for QT_RESOURCES variable)

# Set the app icon resource file for windows
set(APP_ICON_RESOURCE_WINDOWS ${CMAKE_CURRENT_SOURCE_DIR}/resources/fastdds_monitor.rc)

# Set the qml.qrc file containing the QML and other resources of the application
qt5_add_resources(QT_RESOURCES ${PROJECT_SOURCE_DIR}/qml.qrc)

Expand Down Expand Up @@ -281,7 +284,7 @@ ${PROJECT_BINARY_DIR}/include/${PROJECT_NAME}/config.h)

# Avoid launch command prompt when running the executable (.exe) from file explorer
if(MSVC OR MSVC_IDE)
add_executable(${PROJECT_NAME} WIN32 ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${QT_RESOURCES})
add_executable(${PROJECT_NAME} WIN32 ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${QT_RESOURCES} ${APP_ICON_RESOURCE_WINDOWS})
else()
add_executable(${PROJECT_NAME} ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${QT_RESOURCES})
endif()
Expand Down
1 change: 1 addition & 0 deletions resources/fastdds_monitor.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
eprosima_logo ICON "images/eprosima_logo.ico"

0 comments on commit 2517aa3

Please sign in to comment.