#------------------------------------------------------------------- # This file is part of the CMake build system for SKYX # # The contents of this file are placed in the public domain. Feel # free to make use of it in any way you like. #------------------------------------------------------------------- ####################################################################### # ANDROID : redef find_host_package if find_host_package is defined ####################################################################### if(NOT COMMAND find_host_package) macro(find_host_package) find_package(${ARGN}) endmacro() endif() if(NOT COMMAND find_host_program) macro(find_host_program) find_program(${ARGN}) endmacro() endif() ####################################################################### # Find all necessary and optional SKYX dependencies ####################################################################### # SKYX_DEPENDENCIES_DIR can be used to specify a single base # folder where the required dependencies may be found. set(SKYX_DEPENDENCIES_DIR "" CACHE PATH "Path to prebuilt SKYX dependencies") set(SKYX_DEP_SEARCH_PATH ${SKYX_DEPENDENCIES_DIR} ${ENV_SKYX_DEPENDENCIES_DIR} ) message(STATUS "Search path: ${SKYX_DEP_SEARCH_PATH}") # Set hardcoded path guesses for various platforms if (UNIX) set(SKYX_DEP_SEARCH_PATH ${SKYX_DEP_SEARCH_PATH} /usr/local) endif () # give guesses as hints to the find_package calls set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${SKYX_DEP_SEARCH_PATH}) set(CMAKE_FRAMEWORK_PATH ${CMAKE_FRAMEWORK_PATH} ${SKYX_DEP_SEARCH_PATH}) ####################################################################### # Core dependencies ####################################################################### # Find Ogre 3D if(NOT OGRE_FOUND) find_host_package(OGRE) macro_log_feature(OGRE_FOUND "OGRE" "3D library needed for the OgreGraphics plugin" "http://" TRUE "" "") endif() ##################################################################### # Tools dependencies ##################################################################### # Find Doxygen if (NOT DOXYGEN_FOUND) find_package(Doxygen) macro_log_feature(DOXYGEN_FOUND "Doxygen" "Tool for building API documentation" "http://doxygen.org" FALSE "" "") endif() ##################################################################### # All dependencies were checked ##################################################################### # Display results, terminate if anything required is missing MACRO_DISPLAY_FEATURE_LOG() # Add library and include paths from the dependencies include_directories( ${OGRE_INCLUDE_DIRS} ) link_directories( ${OGRE_LIBRARY_DIRS} )