Cleaned up some MacOS install code
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@6917 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 6f7cfc3762c9d2e361b0cf102c7ee0668d834007 Former-commit-id: aecd11944b7c6cb9d5a7b55a07d3251b6bafd65d
This commit is contained in:
parent
fc3c6b8a79
commit
ca0b4e3e42
2 changed files with 30 additions and 36 deletions
|
@ -18,34 +18,10 @@
|
|||
INCLUDE(BundleUtilities)
|
||||
SET(BU_CHMOD_BUNDLE_ITEMS ON)
|
||||
|
||||
SET(bundle "@_bundle@")
|
||||
SET(bundle "@SD_FU_BUNDLE@")
|
||||
|
||||
SET(plugins "@SD_FU_PLUGINS@")
|
||||
|
||||
#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_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@")
|
||||
|
||||
SET(search_dirs "@SD_FU_SEARCHDIRS@")
|
||||
|
||||
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}")
|
||||
|
||||
|
|
|
@ -41,45 +41,63 @@ IF(OPTION_OSGGRAPH)
|
|||
FOREACH(pi ${OSG_PLUGINS})
|
||||
INSTALL(FILES ${pi} DESTINATION ./games/PlugIns/${OSG_PLUGIN_DIR})
|
||||
GET_FILENAME_COMPONENT(fname ${pi} NAME)
|
||||
SET_PROPERTY(GLOBAL APPEND PROPERTY SD_OSG_PLUGIN_LIST "/games/PlugIns/${OSG_PLUGIN_DIR}/${fname}")
|
||||
SET_PROPERTY(GLOBAL APPEND PROPERTY SD_OSG_PLUGIN_LIST "games/PlugIns/${OSG_PLUGIN_DIR}/${fname}")
|
||||
ENDFOREACH()
|
||||
|
||||
ENDIF((APPLE) AND ("${CMAKE_INSTALL_PREFIX}" MATCHES "\\.app$"))
|
||||
ENDIF(OPTION_OSGGRAPH)
|
||||
#==============================================================================
|
||||
|
||||
Message(STATUS "Todo - Check handling of SD_OSG_PLUGIN_LIST_ITEMS in fixbundle.cmake.in")
|
||||
IF((APPLE) AND ("${CMAKE_INSTALL_PREFIX}" MATCHES "\\.app$"))
|
||||
GET_PROPERTY(SD_MODULE_LIST_ITEMS GLOBAL PROPERTY SD_MODULE_LIST)
|
||||
GET_PROPERTY(SD_ROBOT_LIST_ITEMS GLOBAL PROPERTY SD_ROBOT_LIST)
|
||||
GET_PROPERTY(SD_OSG_PLUGIN_LIST_ITEMS GLOBAL PROPERTY SD_OSG_PLUGIN_LIST)
|
||||
#GET_PROPERTY(SD_EXE_LIST_ITEMS GLOBAL PROPERTY SD_EXE_LIST)
|
||||
|
||||
SET (_bundle "${CMAKE_INSTALL_PREFIX}/${SD_BINDIR}/${PROJECT_NAME}${CMAKE_EXECUTABLE_SUFFIX}")
|
||||
|
||||
# Loop through the GLOBAL lists and build up the 'extra libs' for FIXUP_BUNDLE()
|
||||
SET(_loadables )
|
||||
|
||||
foreach(_MODULE ${SD_MODULE_LIST_ITEMS})
|
||||
LIST(APPEND _loadables "${CMAKE_INSTALL_PREFIX}/${_MODULE}")
|
||||
LIST(APPEND _loadables "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_PREFIX}/${_MODULE}")
|
||||
endforeach()
|
||||
|
||||
foreach(_ROBOT ${SD_ROBOT_LIST_ITEMS})
|
||||
LIST(APPEND _loadables "${CMAKE_INSTALL_PREFIX}/${_ROBOT}")
|
||||
LIST(APPEND _loadables "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_PREFIX}/${_ROBOT}")
|
||||
endforeach()
|
||||
|
||||
foreach(_PLUGIN ${SD_OSG_PLUGIN_LIST_ITEMS})
|
||||
#message(STATUS "${_PLUGIN}")
|
||||
LIST(APPEND _loadables "${CMAKE_INSTALL_PREFIX}/${_PLUGIN}")
|
||||
LIST(APPEND _loadables "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_PREFIX}/${_PLUGIN}")
|
||||
endforeach()
|
||||
|
||||
#================
|
||||
# TODO figure out if this is needed...
|
||||
MESSAGE(STATUS "TODO: Hard coded loadable libraries...")
|
||||
IF(NOT OPTION_OFFICIAL_ONLY)
|
||||
LIST(APPEND _loadables "${CMAKE_INSTALL_PREFIX}/lib64/games/${_TARGET_NAME}/lib/libephemeris.dylib")
|
||||
LIST(APPEND _loadables "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_PREFIX}/lib64/games/${PROJECT_NAME}/lib/libephemeris.dylib")
|
||||
ENDIF(NOT OPTION_OFFICIAL_ONLY)
|
||||
LIST(APPEND _loadables "${CMAKE_INSTALL_PREFIX}/lib64/games/${_TARGET_NAME}/lib/liblearning.dylib")
|
||||
LIST(APPEND _loadables "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_PREFIX}/lib64/games/${PROJECT_NAME}/lib/liblearning.dylib")
|
||||
#================
|
||||
|
||||
# Build up the 'dirs' collection for FIXUP_BUNDLE() to use for finding dependencies
|
||||
SET(_search_dirs )
|
||||
IF(CMAKE_PREFIX_PATH)
|
||||
LIST(APPEND _search_dirs "${CMAKE_PREFIX_PATH}")
|
||||
ENDIF(CMAKE_PREFIX_PATH)
|
||||
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}")
|
||||
|
||||
|
||||
|
||||
# Build up the 'app' path for FIXUP_BUNDLE()
|
||||
SET(SD_FU_BUNDLE "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_PREFIX}/${SD_BINDIR}/${PROJECT_NAME}${CMAKE_EXECUTABLE_SUFFIX}")
|
||||
|
||||
SET(SD_FU_PLUGINS ${_loadables})
|
||||
|
||||
SET(SD_FU_SEARCHDIRS ${_search_dirs})
|
||||
|
||||
|
||||
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/cmake/fixbundle.cmake.in
|
||||
${CMAKE_BINARY_DIR}/fixbundle.cmake @ONLY)
|
||||
|
|
Loading…
Reference in a new issue