# # ORXONOX - the hottest 3D action shooter ever to exist # > www.orxonox.net < # # 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, write to the Free Software Foundation, # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # # Author: # Alexander Hedges # Description: # Copies the libs into to all the app bundles of the target destinations. # # Specify dependency locations SET(DEP_INCLUDE_DIR ${DEPENDENCY_PACKAGE_DIR}/include) SET(DEP_LIBRARY_DIR ${DEPENDENCY_PACKAGE_DIR}/lib) SET(DEP_BINARY_DIR ${DEPENDENCY_PACKAGE_DIR}/bin) SET(DEP_FRAMEWORK_DIR ${DEPENDENCY_PACKAGE_DIR}/Library/Frameworks) # Copy libs to all app folders foreach(target IN ITEMS ${CMAKE_CONFIGURATION_TYPES}) file(GLOB_RECURSE dep_frameworks FOLLOW_SYMLINKS "${DEP_FRAMEWORK_DIR}/*") file(GLOB_RECURSE dep_libraries FOLLOW_SYMLINKS "${DEP_LIBRARY_DIR}/*") foreach(p IN LISTS dep_frameworks) STRING(REGEX REPLACE "${DEP_FRAMEWORK_DIR}" "" rel_p ${p}) configure_file(${p} "${CMAKE_BINARY_DIR}/bin/${target}/Orxonox.app/Contents/Frameworks/${rel_p}" COPYONLY) endforeach() foreach(p IN LISTS dep_libraries) STRING(REGEX REPLACE "${DEP_LIBRARY_DIR}" "" rel_p ${p}) configure_file(${p} "${CMAKE_BINARY_DIR}/bin/${target}/Orxonox.app/Contents/Frameworks/${rel_p}" COPYONLY) endforeach() file(GLOB_RECURSE dep_plugins FOLLOW_SYMLINKS "${DEP_BINARY_DIR}/*") foreach(p IN LISTS dep_plugins) STRING(REGEX REPLACE "${DEP_BINARY_DIR}" "" rel_p ${p}) configure_file(${p} "${CMAKE_BINARY_DIR}/bin/${target}/Orxonox.app/Contents/Plugins/${rel_p}" COPYONLY) endforeach() endforeach()