Skip to content

Commit

Permalink
Windows binary includes icon
Browse files Browse the repository at this point in the history
Using [ICON resource](https://msdn.microsoft.com/en-us/library/windows/desktop/aa381018%28v=vs.85%29.aspx) to embed `icon-light.ico` as executable icon for Windows binaries.
  • Loading branch information
ooxi committed Jan 27, 2016
1 parent fa4c7de commit c253a9c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 10 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,15 @@ add_definitions(-DVIOLETLAND_VERSION="${VIOLETLAND_VERSION}")



# Windows resources
set(VIOLET_RESOURCE_DIR rc)

set(VIOLET_RESOURCES
# rc/
${VIOLET_RESOURCE_DIR}/icon.rc
)


# Sources, ordered by
#
# 1) first files, than directories
Expand Down Expand Up @@ -186,7 +195,7 @@ endif()

# Build executable
include_directories(${VIOLET_INCLUDE_DIRS})
add_executable(violetland ${VIOLET_SOURCES})
add_executable(violetland ${VIOLET_RESOURCES} ${VIOLET_SOURCES})
target_link_libraries(violetland ${VIOLET_LIBRARIES})


Expand Down
2 changes: 2 additions & 0 deletions rc/icon.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
id ICON "../icon-light.ico"

0 comments on commit c253a9c

Please sign in to comment.