mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 10:45:16 -07:00
feat(win32): embed executable icon
Problem: on windows, the neovim executable (and thus the filetypes associated to open with neovim) has no embedded icon Solution: create a windows resource file pointing to the icon, and add it to the nvim binary target
This commit is contained in:
parent
9216bc927c
commit
cb84cd5d9f
4
runtime/windows_icon.rc
Normal file
4
runtime/windows_icon.rc
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
// NOTE: this resource file *must* be in the same folder as the icon.
|
||||||
|
// Otherwise, absolute paths would need to be used.
|
||||||
|
// see https://learn.microsoft.com/en-us/windows/win32/menurc/icon-resource
|
||||||
|
NEOVIM_ICON ICON "neovim.ico"
|
@ -708,6 +708,12 @@ target_sources(main_lib INTERFACE
|
|||||||
${EXTERNAL_SOURCES}
|
${EXTERNAL_SOURCES}
|
||||||
${EXTERNAL_HEADERS})
|
${EXTERNAL_HEADERS})
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
# add windows resource file pointing to the neovim icon
|
||||||
|
# this makes the icon appear for the neovim exe and associated filetypes
|
||||||
|
target_sources(nvim_bin PRIVATE ${NVIM_RUNTIME_DIR}/windows_icon.rc)
|
||||||
|
endif()
|
||||||
|
|
||||||
target_sources(nlua0 PUBLIC ${NLUA0_SOURCES})
|
target_sources(nlua0 PUBLIC ${NLUA0_SOURCES})
|
||||||
|
|
||||||
target_link_libraries(nvim_bin PRIVATE main_lib PUBLIC libuv)
|
target_link_libraries(nvim_bin PRIVATE main_lib PUBLIC libuv)
|
||||||
|
Loading…
Reference in New Issue
Block a user