Apple Bundle Fix : Move Bundle Declarations

The "MACOSX_BUNDLE..." declarations must occur before
ADD_SUBDIRECTORY(plugins) in order for the child CMake to inherit the
properties from the parent.

This is needed for scripts/create_apple_dmg.sh to inherit
"MACOS_BUNDLE_BUNDLE_VERSION", etc.
This commit is contained in:
Tres Finocchiaro
2014-05-05 09:43:19 -04:00
parent 83e8a9e1b9
commit 478cef528a

View File

@@ -387,7 +387,15 @@ ELSE(WIN32)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -DPIC")
ENDIF(WIN32)
# set up apple vars before traversing into data/scripts
SET(MACOSX_BUNDLE_ICON_FILE "lmms.icns")
SET(MACOSX_BUNDLE_GUI_IDENTIFIER "LMMS")
SET(MACOSX_BUNDLE_LONG_VERSION_STRING "${VERSION}")
SET(MACOSX_BUNDLE_BUNDLE_NAME "LMMS")
SET(MACOSX_BUNDLE_SHORT_VERSION_STRING "${VERSION}")
SET(MACOSX_BUNDLE_BUNDLE_VERSION "${VERSION}")
SET(MACOSX_BUNDLE_COPYRIGHT "Tobias Doerffel, 2008-2010")
SET(MACOSX_BUNDLE_MIMETYPE "application/x-lmms-project")
# make sub-directories
ADD_SUBDIRECTORY(plugins)
@@ -663,16 +671,6 @@ SET(MACOSX_BUNDLE_SHORT_VERSION_STRING "${VERSION}")
SET(MACOSX_BUNDLE_BUNDLE_VERSION "${VERSION}")
SET(MACOSX_BUNDLE_COPYRIGHT "Tobias Doerffel, 2008-2010")
SET(MACOSX_BUNDLE_MIMETYPE "application/x-lmms-project")
IF(LMMS_BUILD_APPLE)
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/data/lmms.plist.in" "${CMAKE_INSTALL_PREFIX}/Info.plist")
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/data/scripts/create_apple_bundle.sh.in" "${CMAKE_CURRENT_BINARY_DIR}/create_apple_bundle.sh" @ONLY)
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/data/scripts/create_apple_dmg.sh.in" "${CMAKE_CURRENT_BINARY_DIR}/create_apple_dmg.sh" @ONLY)
# Add execute permissions to bundle script
SET(CHMOD_CMD "chmod")
SET(CHMOD_ARG1 "u+x")
SET(CHMOD_ARG2 "${CMAKE_CURRENT_BINARY_DIR}/create_apple_bundle.sh")
EXECUTE_PROCESS(COMMAND ${CHMOD_CMD} ${CHMOD_ARG1} ${CHMOD_ARG2})
ENDIF(LMMS_BUILD_APPLE)
SET(CPACK_SOURCE_GENERATOR "TBZ2")
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "lmms-${VERSION}")