Skip to content

Commit

Permalink
Set MACOSX_BUNDLE_ICON_FILE to icon.icns and fix copying of file
Browse files Browse the repository at this point in the history
  • Loading branch information
MattClarkson committed May 9, 2013
1 parent c4accfb commit 058528e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions BlueBerry/CMake/FunctionCreateBlueBerryApplication.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,12 @@ endif()
# Add executable icon (Mac)
# -----------------------------------------------------------------------
if(APPLE)
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/icons/icon.icns")
set_target_properties(${_APP_NAME} PROPERTIES MACOSX_BUNDLE_ICON_FILE "${CMAKE_CURRENT_SOURCE_DIR}/icons/icon.icns")
file(COPY ${MACOSX_BUNDLE_ICON_FILE} DESTINATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_APP_NAME}.app/Contents/Resources/")
file(INSTALL ${MACOSX_BUNDLE_ICON_FILE} DESTINATION "${_APP_NAME}.app/Contents/Resources/")
set(icon_name "icon.icns")
set(icon_full_path "${CMAKE_CURRENT_SOURCE_DIR}/icons/${icon_name}")
if(EXISTS "${icon_full_path}")
set_target_properties(${_APP_NAME} PROPERTIES MACOSX_BUNDLE_ICON_FILE "${icon_name}")
file(COPY ${icon_full_path} "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_APP_NAME}.app/Contents/Resources/")
INSTALL (FILES ${icon_full_path} DESTINATION "${_APP_NAME}.app/Contents/Resources/")
endif()
endif()

Expand Down

0 comments on commit 058528e

Please sign in to comment.