#------------------------------------------------------------------- # This file is part of the CMake build system for Hydrax # # 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 HYDRAX dependencies ####################################################################### # HYDRAX_DEPENDENCIES_DIR can be used to specify a single base # folder where the required dependencies may be found. set(HYDRAX_DEPENDENCIES_DIR "" CACHE PATH "Path to prebuilt HYDRAX dependencies") set(HYDRAX_DEP_SEARCH_PATH ${HYDRAX_DEPENDENCIES_DIR} ${ENV_HYDRAX_DEPENDENCIES_DIR} ) message(STATUS "Search path: ${HYDRAX_DEP_SEARCH_PATH}") # Set hardcoded path guesses for various platforms if (UNIX) set(HYDRAX_DEP_SEARCH_PATH ${HYDRAX_DEP_SEARCH_PATH} /usr/local) endif () # give guesses as hints to the find_package calls set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${HYDRAX_DEP_SEARCH_PATH}) set(CMAKE_FRAMEWORK_PATH ${CMAKE_FRAMEWORK_PATH} ${HYDRAX_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} )