diff --git a/share/juci.png b/share/juci.png new file mode 100644 index 0000000..1080061 Binary files /dev/null and b/share/juci.png differ diff --git a/share/set_icon_macos.py b/share/set_icon_macos.py new file mode 100644 index 0000000..3a55a5e --- /dev/null +++ b/share/set_icon_macos.py @@ -0,0 +1,4 @@ +import Cocoa +import sys + +Cocoa.NSWorkspace.sharedWorkspace().setIcon_forFile_options_(Cocoa.NSImage.alloc().initWithContentsOfFile_(sys.argv[1].decode('utf-8')), sys.argv[2].decode('utf-8'), 0) or sys.exit("Unable to set file icon") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 38846d4..e6e309f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -76,6 +76,10 @@ else() ) endif() +if(APPLE) + install(CODE "execute_process(COMMAND /usr/bin/python ${CMAKE_SOURCE_DIR}/share/set_icon_macos.py ${CMAKE_SOURCE_DIR}/share/juci.png ${CMAKE_INSTALL_PREFIX}/bin/juci)") +endif() + # add a target to generate API documentation with Doxygen find_package(Plantuml) find_package(Doxygen)