speed-dreams-code/cmake/fixbundle.cmake.in
beaglejoe 4fc9a3df18 Fix packaging for Mac OS
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@6907 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 99d6f1dfb512e73616b26cdc2a50b35aa28fc3f2
Former-commit-id: 617f4348b3bd800a8332ce2cb3c15255dc4b1595
2020-04-11 23:39:40 +00:00

51 lines
1.8 KiB
CMake

#==============================================================================
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#==============================================================================
INCLUDE(BundleUtilities)
SET(BU_CHMOD_BUNDLE_ITEMS ON)
SET(bundle "@_bundle@")
#SET(loadables @SD_MODULE_LIST_ITEMS@)
#SET(robots @SD_ROBOT_LIST_ITEMS@)
#SET(osg_plugins @SD_OSG_PLUGIN_LIST_ITEMS@)
SET(plugins "@_loadables@")
SET(_prefix_path @CMAKE_PREFIX_PATH@)
# TODO - APPLE specific ?
SET(search_dirs )
IF(_prefix_path)
LIST(APPEND search_dirs "${_prefix_path}")
ENDIF(_prefix_path)
LIST(APPEND search_dirs "@CMAKE_BINARY_DIR@/@CMAKE_INSTALL_PREFIX@")
LIST(APPEND search_dirs "@CMAKE_INSTALL_PREFIX@/Frameworks")
LIST(APPEND search_dirs "@CMAKE_INSTALL_PREFIX@/MacOS")
LIST(APPEND search_dirs "@CMAKE_INSTALL_PREFIX@/lib64/games/@PROJECT_NAME@/lib")
LIST(APPEND search_dirs "@CMAKE_INSTALL_PREFIX@/games/Plugins/@OSG_PLUGIN_DIR@")
FIXUP_BUNDLE("${bundle}" "${plugins}" "${search_dirs}")
message(STATUS bundle = "${bundle}")
message(STATUS plugins = "${plugins}")
message(STATUS search_dirs = "${search_dirs}")
message(STATUS _prefix_path = "${_prefix_path}")