Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add icon to MacOS builds, Updated README to mention MacOS support #379

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Temporary Items

# Build dir
build-*
build

# Binaries
bin/*
Expand Down
5 changes: 4 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Supported functions:

System requirements for running "Candle":
-------------------
* Windows/Linux x86
* Windows/Linux x86/MacOS ??
* CPU with SSE2 instruction set support
* Graphics card with OpenGL 2.0 support
* 120 MB free storage space
Expand All @@ -19,6 +19,9 @@ Build requirements:
------------------
Qt 5.4.2 with MinGW/GCC compiler

Additionally for MacOS:
CMake

Downloads:
----------
Experimental versions:
Expand Down
9 changes: 8 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,14 @@ qt5_add_resources(SHADER_RSC
)

if(APPLE)
add_executable(Candle MACOSX_BUNDLE ${SRC_FILES} ${SHADER_RSC})
# If we switch to automatic PList generation
set(MACOSX_BUNDLE_ICON_FILE candle.icns)


set(MACOSX_BUNDLE_ICON_LOCATION ${PROJECT_SOURCE_DIR}/candle.icns)
set_source_files_properties(${MACOSX_BUNDLE_ICON_LOCATION} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")

add_executable(Candle MACOSX_BUNDLE ${SRC_FILES} ${SHADER_RSC} ${MACOSX_BUNDLE_ICON_LOCATION})
set_target_properties(Candle PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${PROJECT_SOURCE_DIR}/Info.plist)
else()
add_executable(Candle ${SRC_FILES} ${SHADER_RSC})
Expand Down
18 changes: 10 additions & 8 deletions src/Info.plist
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="0.9">
<dict>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSHighResolutionCapable</key>
<string>True</string>
</dict>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIconFile</key>
<string>candle</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSHighResolutionCapable</key>
<string>True</string>
</dict>
</plist>
Binary file added src/candle.icns
Binary file not shown.