#------------------------------------------------------------------- # This file is part of the CMake build system for Scol # # The contents of this file are placed in the public domain. Feel # free to make use of it in any way you like. #------------------------------------------------------------------- ####################################################################### # Find all necessary and optional Scol dependencies ####################################################################### # Scol_DEPENDENCIES_DIR can be used to specify a single base # folder where the required dependencies may be found. set(Scol_DEPENDENCIES_DIR "" CACHE PATH "Path to prebuilt Scol dependencies") include(ScolFindPkgMacros) include(AppleMacros) # prefer GLVND for OPENGL if(POLICY CMP0072) cmake_policy(SET CMP0072 NEW) endif() # Guess dependencies dir if not setÆ’ if (NOT EXISTS $ENV{SCOL_DEPENDENCIES_PATH}) set(ENV{SCOL_DEPENDENCIES_PATH} "${CMAKE_SOURCE_DIR}/../dependencies") endif() if (NOT EXISTS $ENV{BOOST_ROOT}) set(ENV{BOOST_ROOT} "$ENV{SCOL_DEPENDENCIES_PATH}/boost") endif() set(BOOST_ROOT $ENV{BOOST_ROOT}) getenv_path(SCOL_DEPENDENCIES_PATH) if (ANDROID) set(Scol_DEPENDENCIES_DIR "${ENV_SCOL_DEPENDENCIES_PATH}/sdk/android/${ANDROID_ABI}") elseif(WIN64) set(Scol_DEPENDENCIES_DIR "${ENV_SCOL_DEPENDENCIES_PATH}/sdk/windows/x64") elseif(WIN32) set(Scol_DEPENDENCIES_DIR "${ENV_SCOL_DEPENDENCIES_PATH}/sdk/windows/x86") elseif(APPLE AND NOT APPLE_IOS) set(Scol_DEPENDENCIES_DIR "${ENV_SCOL_DEPENDENCIES_PATH}/sdk/apple/OSX") elseif(APPLE AND APPLE_IOS) set(Scol_DEPENDENCIES_DIR "${ENV_SCOL_DEPENDENCIES_PATH}/sdk/apple/IOS") elseif(EMSCRIPTEN) set(Scol_DEPENDENCIES_DIR} "${ENV_SCOL_DEPENDENCIES_PATH}/sdk/emscripten") elseif(SCOL_INSTALL_PREFIX) set(Scol_DEPENDENCIES_DIR "${ENV_SCOL_DEPENDENCIES_PATH}/sdk/${SCOL_INSTALL_PREFIX}") else() set(Scol_DEPENDENCIES_DIR "${ENV_SCOL_DEPENDENCIES_PATH}/sdk") endif() set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ENV_SCOL_DEPENDENCIES_PATH}/CMake ${ENV_SCOL_DEPENDENCIES_PATH}/CMake/Packages ${Scol_DEPENDENCIES_DIR}/share ${Scol_DEPENDENCIES_DIR}/lib/cmake) message (STATUS "Search paths : ${CMAKE_MODULE_PATH}") set(Scol_DEP_SEARCH_PATH ${Scol_DEPENDENCIES_DIR}) ####################################################################### # 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() if(ANDROID) include("${ENV_SCOL_DEPENDENCIES_PATH}/CMake/toolchain/AndroidNdkModules.cmake") include("${ENV_SCOL_DEPENDENCIES_PATH}/CMake/toolchain/AndroidNdkGdb.cmake") android_ndk_import_module_ndk_helper() endif() message(STATUS "Search path: ${Scol_DEP_SEARCH_PATH}") # Set hardcoded path guesses for various platforms #if (UNIX) # set(Scol_DEP_SEARCH_PATH ${Scol_DEP_SEARCH_PATH} /usr) #endif () # give guesses as hints to the find_host_package calls set(CMAKE_PREFIX_PATH "${Scol_DEP_SEARCH_PATH};${CMAKE_PREFIX_PATH}" ) set(CMAKE_FRAMEWORK_PATH "${Scol_DEP_SEARCH_PATH};${CMAKE_FRAMEWORK_PATH}" ) # Prefer static linking in all cases for boost, needed before other find but search boost after all dependencies to be sure of the components set(Boost_USE_STATIC_LIBS ON) if (ANDROID) set(Boost_USE_STATIC_RUNTIME ON) set(Boost_COMPILER -clang) set(Boost_THREADAPI "pthread") set(Boost_LIBRARY_DIR "$ENV{BOOST_ROOT}/stage/lib/${ANDROID_ABI}" CACHE PATH "Boost library directory" FORCE) set(BOOST_INCLUDEDIR "$ENV{BOOST_ROOT}" CACHE PATH "Boost include directory" FORCE) if (ANDROID_ABI STREQUAL "armeabi-v7a") set (Boost_ARCHITECTURE "-a32") elseif (ANDROID_ABI STREQUAL "arm64-v8a") set (Boost_ARCHITECTURE "-a64") elseif(ANDROID_ABI STREQUAL "x86") set (Boost_ARCHITECTURE "-x32") elseif(ANDROID_ABI STREQUAL "x86_64") set (Boost_ARCHITECTURE "-x64") endif() elseif(APPLE_IOS) set(Boost_USE_STATIC_RUNTIME ON) set(Boost_COMPILER -clang) set(Boost_THREADAPI "pthread") set(Boost_LIBRARY_DIR "$ENV{BOOST_ROOT}/stage/ios/lib" CACHE PATH "Boost library directory" FORCE) elseif(APPLE) set(Boost_USE_STATIC_RUNTIME ON) set(Boost_COMPILER -clang) set(Boost_THREADAPI "pthread") set(Boost_LIBRARY_DIR "$ENV{BOOST_ROOT}/stage/osx/lib" CACHE PATH "Boost library directory" FORCE) #set(Boost_INCLUDE_DIR "$ENV{BOOST_ROOT}" CACHE PATH "Boost include directory" FORCE) elseif(PIZERO) set(Boost_USE_STATIC_RUNTIME ON) set(Boost_COMPILER -gcc) set(Boost_THREADAPI "pthread") set(Boost_LIBRARY_DIR "$ENV{BOOST_ROOT}/stage/RPI/armv6/lib" CACHE PATH "Boost library directory" FORCE) set(BOOST_INCLUDEDIR "$ENV{BOOST_ROOT}" CACHE PATH "Boost include directory" FORCE) elseif(PITHREE) set(Boost_USE_STATIC_RUNTIME ON) set(Boost_COMPILER -gcc) set(Boost_THREADAPI "pthread") set(Boost_LIBRARY_DIR "$ENV{BOOST_ROOT}/stage/RPI/armv8a/lib" CACHE PATH "Boost library directory" FORCE) set(BOOST_INCLUDEDIR "$ENV{BOOST_ROOT}" CACHE PATH "Boost include directory" FORCE) elseif(PIFOUR) set(Boost_USE_STATIC_RUNTIME ON) set(Boost_COMPILER -gcc) set(Boost_THREADAPI "pthread") set(Boost_LIBRARY_DIR "$ENV{BOOST_ROOT}/stage/RPI/armv8a/lib" CACHE PATH "Boost library directory" FORCE) set(BOOST_INCLUDEDIR "$ENV{BOOST_ROOT}" CACHE PATH "Boost include directory" FORCE) elseif(RPI) set(Boost_USE_STATIC_RUNTIME ON) set(Boost_COMPILER -gcc) set(Boost_THREADAPI "pthread") set(Boost_LIBRARY_DIR "$ENV{BOOST_ROOT}/stage/RPI/armv7a/lib" CACHE PATH "Boost library directory" FORCE) set(BOOST_INCLUDEDIR "$ENV{BOOST_ROOT}" CACHE PATH "Boost include directory" FORCE) elseif(LINUX32) set(Boost_USE_STATIC_RUNTIME ON) set(Boost_COMPILER -gcc) set(Boost_THREADAPI "pthread") set(Boost_LIBRARY_DIR "$ENV{BOOST_ROOT}/stage/linux32/lib" CACHE PATH "Boost library directory" FORCE) set(BOOST_INCLUDEDIR "$ENV{BOOST_ROOT}" CACHE PATH "Boost include directory" FORCE) elseif(LINUX64) set(Boost_USE_STATIC_RUNTIME ON) set(Boost_COMPILER -gcc) set(Boost_THREADAPI "pthread") set(Boost_LIBRARY_DIR "$ENV{BOOST_ROOT}/stage/linux64/lib" CACHE PATH "Boost library directory" FORCE) set(BOOST_INCLUDEDIR "$ENV{BOOST_ROOT}" CACHE PATH "Boost include directory" FORCE) elseif(EMSCRIPTEN) #set(Boost_LIB_PREFIX lib) set(Boost_VERBOSE ON) set(Boost_USE_RELEASE_LIBS ON) set(Boost_USE_DEBUG_LIBS OFF) set(Boost_DEBUG ON) set(Boost_LIBRARY_DIR "$ENV{BOOST_ROOT}/stage/em/lib" CACHE PATH "Boost library directory" FORCE) endif() set(SCOL_BOOST_COMPONENTS system thread date_time regex filesystem) find_package(Boost COMPONENTS ${SCOL_BOOST_COMPONENTS} QUIET) if (NOT Boost_FOUND) # Try again with the other type of libs if(Boost_USE_STATIC_LIBS) set(Boost_USE_STATIC_LIBS) else() set(Boost_USE_STATIC_LIBS ON) endif() find_host_package(Boost COMPONENTS ${SCOL_BOOST_COMPONENTS}) endif() macro_log_feature(Boost_FOUND "boost" "Boost (common functions library)" "http://boost.org" FALSE "" "") macro_log_feature(Boost_THREAD_FOUND "boost-thread" "Used for threading support" "http://boost.org" FALSE "" "") macro_log_feature(Boost_DATE_TIME_FOUND "boost-date_time" "Used for threading support" "http://boost.org" FALSE "" "") macro_log_feature(Boost_SYSTEM_FOUND "boost-system" "Used for system support" "http://boost.org" FALSE "" "") macro_log_feature(Boost_REGEX_FOUND "boost-regex" "Used for boost's asio support" "http://boost.org" FALSE "" "") macro_log_feature(Boost_FILESYSTEM_FOUND "boost-filesystem" "Used for files system support" "http://boost.org" FALSE "" "") #macro_log_feature(Boost_LOCALE_FOUND "boost-locale" "Used for locale support" "http://boost.org" FALSE "" "") #Needed for Ogre compatibility if(Scol_STATIC AND Boost_VERSION GREATER 105200) # Use boost threading version 4 for boost 1.53 and above #add_definitions(-DBOOST_THREAD_VERSION=4 -DBOOST_THREAD_PROVIDES_NESTED_LOCKS) endif() #add_definitions(-DBOOST_ALL_NO_LIB) if (MINGW AND Boost_USE_STATIC_LIBS) # mingw needs this to link against static thread libraries add_definitions(-DBOOST_THREAD_USE_LIB) endif() find_package(OpenMP QUIET) ####################################################################### # Debugging tools ####################################################################### # Find Visual Leak Detector if (WIN32) find_host_package(VisualLeakDetector) macro_log_feature(VisualLeakDetector_FOUND "Visual Leak Detector" "Debugging library" "https://kinddragon.github.io/vld/" FALSE "" "") endif() # Find WDK if (WIN32) find_host_package(WDK) macro_log_feature(WDK_FOUND "WDK" "Windows Driver Kit" "http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=11800" FALSE "" "") endif() #Eigen3 find_host_package(Eigen3) macro_log_feature(Eigen3_FOUND "Eigen3" "Eigen3 library" "" FALSE "" "") # Find TBB find_host_package(Tbb) macro_log_feature(TBB_FOUND "Tbb" "TBB library" "" FALSE "" "") # Find OpenCV find_host_package(OpenCV) macro_log_feature(OpenCV_FOUND "OpenCV" "OpenCV image processing library" "http://opencv.willowgarage.com/wiki/" FALSE "" "") if(WIN32) # Find VideoInput find_host_package(VIDEOINPUT) macro_log_feature(VIDEOINPUT_FOUND "VIDEOINPUT" "VIDEOINPUT library" "" FALSE "" "") endif() #if (NOT APPLE_IOS) # Find OpenSSL set (OPENSSL_USE_STATIC_LIBS TRUE) find_host_package(OpenSSL) macro_log_feature(OPENSSL_FOUND "OpenSSL" "OpenSSL library" "http://www.openssl.org/" FALSE "" "") #endif() if (APPLE_IOS OR OSX) # Use Security framework (bundled on Apple devices) for SSL find_apple_system_fwk(SECURITY_FWK Security) macro_log_feature(SECURITY_FWK "Security" "Security framework (SSL for Apple devices)" "" FALSE "" "") endif() if (APPLE_IOS) # Use Video framework for FFMpeg find_apple_system_fwk(VIDEOTOOLBOX_FWK VideoToolbox) macro_log_feature(VIDEOTOOLBOX_FWK "VideoToolbox" "VideoToolbox framework" "" FALSE "" "") endif() # Find Curl find_host_package(CURL) macro_log_feature(CURL_FOUND "Curl" "Curl network library" "http://curl.haxx.se" FALSE "" "") # Find TUIO find_host_package(TUIO) macro_log_feature(TUIO_FOUND "Tuio" "Tuio library" "http://www.tuio.org" FALSE "" "") # Find VRPN find_host_package(VRPN) macro_log_feature(VRPN_FOUND "VRPN" "VRPN library" "http://www.cs.unc.edu/Research/vrpn/" FALSE "" "") if(WIN32) # Find OCULUS find_host_package(OCULUS) macro_log_feature(OCULUS_FOUND "OCULUS" "OCULUS library" "http://www.oculusvr.com/" FALSE "" "") endif() if (NOT ANDROID AND NOT APPLE_IOS) # Find OPENVR find_host_package(OPENVR) macro_log_feature(OPENVR_FOUND "OPENVR" "OPENVR library" "https://github.com/ValveSoftware/openvr" FALSE "" "") if (WIN64) find_host_package(VIVE_HAND_TRACKING) macro_log_feature(VIVE_HAND_TRACKING_FOUND "VIVE_HAND_TRACKING" "VIVE HAND TRACKING library" "https://developer.vive.com/resources/knowledgebase/vive-hand-tracking-sdk/" FALSE "" "") endif (WIN64) endif() # OpenXR find_host_package(OpenXR) macro_log_feature(OpenXR_FOUND "OpenXR" "OpenXR library" "https://github.com/KhronosGroup/OpenXR-SDK" FALSE "" "") if (ANDROID AND ANDROID_ABI STREQUAL "arm64-v8a") find_host_package(OCULUS_MOBILE) macro_log_feature(OCULUS_MOBILE_FOUND "OCULUS Mobile SDK" "OCULUS MOBILE SDK" "https://developer.oculus.com/downloads/package/oculus-mobile-sdk/" FALSE "" "") endif() if(WIN32) # Find TOBII find_host_package(TOBII) macro_log_feature(TOBII_FOUND "TOBII" "TOBII library" "http://developer.tobii.com/" FALSE "" "") endif() if(WIN32) # Find LEAPMOTION find_host_package(LEAPMOTION) macro_log_feature(LEAPMOTION_FOUND "LEAPMOTION" "LEAPMOTION library" "https://developer.leapmotion.com/downloads" FALSE "" "") endif() # Find MYO if(WIN32) find_host_package(MYO) macro_log_feature(MYO_FOUND "MYO" "MYO library" "https://developer.thalmic.com/" FALSE "" "") endif() # Find NEUROSKY if(WIN32) find_host_package(NEUROSKY) macro_log_feature(NEUROSKY_FOUND "NEUROSKY" "NEUROSKY library" "http://developer.neurosky.com/" FALSE "" "") endif() # Find 3DRUDDER if(WIN32) find_host_package(RUDDER3D) macro_log_feature(RUDDER3D_FOUND "RUDDER3D" "RUDDER3D library" "https://www.3drudder.com/" FALSE "" "") endif() # Find EMOTIV if(WIN32) find_host_package(EMOTIV) macro_log_feature(EMOTIV_FOUND "EMOTIV" "EMOTIV library" "https://www.emotiv.com/" FALSE "" "") endif() # Find LibPng find_host_package(PNG) macro_log_feature(PNG_FOUND "Lib png" "Png image format support" "http://www.libpng.org/pub/png/libpng.html" FALSE "" "") # Find LibJpeg find_host_package(JPEG) macro_log_feature(JPEG_FOUND "Lib jpeg" "Jpeg image format support" "http://www.ijg.org/" FALSE "" "") # Find LibHaru find_host_package(LibHaru) macro_log_feature(LibHaru_FOUND "LibHaru" "LibHaru library for PDF" "https://github.com/libharu/libharu" FALSE "" "") ####################################################################### # Zoo engine plugin dependencies ####################################################################### # Find Ms Direct Sound dependency (part of Ms DirectX SDK) if (WIN32) find_host_package(DSound) macro_log_feature(DSound_FOUND "Direct Sound" "Ms Direct Sound for zoo engine sound player" "http://msdn.microsoft.com/en-us/library/windows/desktop/ee416842%28v=vs.85%29.aspx" FALSE "" "") endif() if (NOT ANDROID AND NOT APPLE_IOS AND NOT LINUX) find_host_package(OPENGL) macro_log_feature(OPENGL_FOUND "OpenGL" "OpenGL API" "http://www.opengl.org/" FALSE "" "") find_host_package(Glew) macro_log_feature(Glew_FOUND "Glew" "Glew API" "http://glew.sourceforge.net/credits.html" FALSE "" "") endif() #if (WIN32) # find_host_package(NvidiaCg) # macro_log_feature(NvidiaCg_FOUND "Nvidia Cg" "Nvidia Cg shader programming language" "http://developer.nvidia.com/cg-toolkit" FALSE "" "") #endif (WIN32) ####################################################################### # SO3Engine dependencies ####################################################################### # Find Ogre3D, add first the path where Ogre's CMake files can be found. find_host_package(Freetype) macro_log_feature(FREETYPE_FOUND "Freetype library" "Freetype font library" "" FALSE "" "") if (ANDROID) find_package(ZLIB) else () find_host_package(ZLIB) endif() macro_log_feature(ZLIB_FOUND "zlib" "Simple data compression library" "http://www.zlib.net" FALSE "" "") find_host_package(LIBZIP) macro_log_feature(LIBZIP_FOUND "libZip" "Zip file archive" "http://www.nih.at/libzip" TRUE "" "") set(OGRE_STATIC TRUE) if (ANDROID) find_host_package(OGRE) elseif(WIN32) find_package(OGRE CONFIG) else() find_package(OGRE) endif() macro_log_feature(OGRE_FOUND "Ogre Core library" "Ogre 3D renderer library" "http://www.ogre.org" FALSE "" "") if (NOT ANDROID AND NOT APPLE_IOS AND NOT RPI) # Verify OpenGL if (OGRE_FOUND) if(NOT SO3_USE_GL3) if(OGRE_RenderSystem_GL_FOUND) set(OGRE_LIBRARIES ${OGRE_RenderSystem_GL_LIBRARIES} ${OGRE_LIBRARIES}) set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} ${OGRE_RenderSystem_GL_INCLUDE_DIRS}) elseif(NOT OGRE_RenderSystem_GLES2_FOUND) set(OGRE_FOUND "FALSE") endif() macro_log_feature(OGRE_RenderSystem_GL_FOUND "Ogre OpenGL Render System" "Ogre OpenGL Render System plugin" "http://www.ogre.org" FALSE "" "") else(NOT SO3_USE_GL3) if(OGRE_RenderSystem_GL3Plus_FOUND) set(OGRE_LIBRARIES ${OGRE_RenderSystem_GL3Plus_LIBRARIES} ${OGRE_LIBRARIES}) set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} ${OGRE_RenderSystem_GL3Plus_INCLUDE_DIRS}) endif() macro_log_feature(OGRE_RenderSystem_GL_FOUND "Ogre OpenGL3 Render System" "Ogre OpenGL3 Render System plugin" "http://www.ogre.org" FALSE "" "") endif(NOT SO3_USE_GL3) endif() endif() # Verify Direct3D9 if(WIN32) if(NOT SO3_USE_DX11) if (OGRE_FOUND) if(OGRE_RenderSystem_Direct3D9_FOUND) set(OGRE_LIBRARIES ${OGRE_RenderSystem_Direct3D9_LIBRARIES} ${OGRE_LIBRARIES}) set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} ${OGRE_RenderSystem_Direct3D9_INCLUDE_DIRS}) else(OGRE_RenderSystem_Direct3D9_FOUND) set(OGRE_FOUND "FALSE") endif(OGRE_RenderSystem_Direct3D9_FOUND) endif(OGRE_FOUND) macro_log_feature(OGRE_RenderSystem_Direct3D9_FOUND "Ogre Direct3D 9 Render System" "Ogre Direct3D 9 Render System plugin" "http://www.ogre.org" FALSE "" "") else(NOT SO3_USE_DX11) # Verify Direct3D11 if (OGRE_FOUND) if(OGRE_RenderSystem_Direct3D11_FOUND) set(OGRE_LIBRARIES ${OGRE_RenderSystem_Direct3D11_LIBRARIES} ${OGRE_LIBRARIES}) set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} ${OGRE_RenderSystem_Direct3D11_INCLUDE_DIRS}) else() set(OGRE_FOUND "FALSE") endif() endif() macro_log_feature(OGRE_RenderSystem_Direct3D11_FOUND "Ogre Direct3D 11 Render System" "Ogre Direct3D 11 Render System plugin" "http://www.ogre.org" FALSE "" "") endif(NOT SO3_USE_DX11) endif(WIN32) # Verify Ogre Tiny renderer #if (OGRE_FOUND AND NOT ANDROID) # if(OGRE_RenderSystem_Tiny_FOUND) # set(OGRE_LIBRARIES ${OGRE_RenderSystem_Tiny_LIBRARIES} ${OGRE_LIBRARIES}) # set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} ${OGRE_RenderSystem_Tiny_INCLUDE_DIRS}) # else() # set(OGRE_FOUND "FALSE") # endif() #endif() #macro_log_feature(OGRE_RenderSystem_Tiny_FOUND "Ogre Tiny Render System" "Ogre Tiny Render System plugin" "http://www.ogre.org" FALSE "" "") # Verify Ogre Vulkan renderer if (OGRE_FOUND AND WIN64) if(OGRE_RenderSystem_Vulkan_FOUND) set(OGRE_LIBRARIES ${OGRE_RenderSystem_Vulkan_LIBRARIES} ${OGRE_LIBRARIES}) set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} ${OGRE_RenderSystem_Vulkan_INCLUDE_DIRS}) else() set(OGRE_FOUND "FALSE") endif() if(OGRE_Plugin_GLSLangProgramManager_FOUND) set(OGRE_LIBRARIES ${OGRE_Plugin_GLSLangProgramManager_LIBRARIES} ${OGRE_LIBRARIES}) set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} ${OGRE_GLSLangProgramManager_INCLUDE_DIRS}) else (OGRE_Plugin_GLSLangProgramManager_FOUND) set(OGRE_FOUND "FALSE") endif() macro_log_feature(OGRE_Plugin_GLSLangProgramManager_FOUND "Ogre GLSLANG Program Manager" "Ogre 3D GLSLANG Shader Programs plugin" "http://www.ogre.org" FALSE "" "") macro_log_feature(OGRE_RenderSystem_Vulkan_FOUND "Ogre Vulkan Render System" "Ogre Vulkan Render System plugin" "http://www.ogre.org" FALSE "" "") endif() # Verify Ogre Metal renderer if (APPLE AND OGRE_FOUND) if(OGRE_RenderSystem_Metal_FOUND) set(OGRE_LIBRARIES ${OGRE_RenderSystem_Metal_LIBRARIES} ${OGRE_LIBRARIES}) set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} ${OGRE_RenderSystem_Metal_INCLUDE_DIRS}) endif() message(WARNING "Metal include: ${OGRE_RenderSystem_Metal_INCLUDE_DIRS}") macro_log_feature(OGRE_RenderSystem_Metal_FOUND "Ogre Metal Render System" "Ogre Metal Render System plugin" "http://www.ogre.org" FALSE "" "") endif() if (NOT APPLE AND NOT ANDROID AND NOT RPI AND NOT LINUX) # Verify Cg plugin if (OGRE_FOUND) if(OGRE_Plugin_CgProgramManager_FOUND) set(OGRE_LIBRARIES ${OGRE_Plugin_CgProgramManager_LIBRARIES} ${OGRE_LIBRARIES}) set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} ${OGRE_Plugin_CgProgramManager_INCLUDE_DIRS}) else (OGRE_Plugin_CgProgramManager_FOUND) set(OGRE_FOUND "FALSE") endif() macro_log_feature(OGRE_Plugin_CgProgramManager_FOUND "Ogre Cg Program Manager" "Ogre 3D Cg Shader Programs plugin" "http://www.ogre.org" FALSE "" "") endif() endif() # Verify OpenGLES2 if (OGRE_FOUND) if (SO3_USE_GLES OR ANDROID OR APPLE_IOS OR RPI) if(OGRE_RenderSystem_GLES2_FOUND) set(OGRE_LIBRARIES ${OGRE_RenderSystem_GLES2_LIBRARIES} ${OGRE_LIBRARIES}) set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} ${OGRE_RenderSystem_GLES2_INCLUDE_DIRS}) elseif(NOT OGRE_RenderSystem_GLES2_FOUND) set(OGRE_FOUND "FALSE") endif() macro_log_feature(OGRE_RenderSystem_GLES2_FOUND "Ogre OpenGLES2 Render System" "Ogre OpenGLES2 Render System plugin" "http://www.ogre.org" FALSE "" "") endif() endif() if (OGRE_FOUND) set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} "${OGRE_INCLUDE_DIR}/RenderSystems") endif() # Verify Overlay plugin if (OGRE_FOUND) if(OGRE_Overlay_FOUND) set(OGRE_LIBRARIES ${OGRE_Overlay_LIBRARIES} ${OGRE_LIBRARIES}) set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} ${OGRE_Overlay_INCLUDE_DIRS}) else() set(OGRE_FOUND "FALSE") endif() macro_log_feature(OGRE_Overlay_FOUND "Ogre Overlay Plugin" "Ogre Overlay plugin" "http://www.ogre.org" FALSE "" "") endif() # Verify Octree plugin if (OGRE_FOUND) if(OGRE_Plugin_OctreeSceneManager_FOUND) set(OGRE_LIBRARIES ${OGRE_Plugin_OctreeSceneManager_LIBRARIES} ${OGRE_LIBRARIES}) set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} ${OGRE_Plugin_OctreeSceneManager_INCLUDE_DIRS}) else() set(OGRE_FOUND "FALSE") endif() macro_log_feature(OGRE_Plugin_OctreeSceneManager_FOUND "Ogre Octree SceneManager" "Ogre 3D Octree Scene Manager plugin" "http://www.ogre.org" FALSE "" "") endif() # Verify Paging plugin if (OGRE_FOUND) if(OGRE_Paging_FOUND) set(OGRE_LIBRARIES ${OGRE_Paging_LIBRARIES} ${OGRE_LIBRARIES}) set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} ${OGRE_Paging_INCLUDE_DIRS}) else() set(OGRE_FOUND "FALSE") endif() macro_log_feature(OGRE_Paging_FOUND "Ogre Paging Plugin" "Ogre Paging plugin" "http://www.ogre.org" FALSE "" "") endif() # Verify Terrain plugin if (OGRE_FOUND) if(OGRE_Terrain_FOUND) set(OGRE_LIBRARIES ${OGRE_Terrain_LIBRARIES} ${OGRE_LIBRARIES}) set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} ${OGRE_Terrain_INCLUDE_DIRS}) else() set(OGRE_FOUND "FALSE") endif() macro_log_feature(OGRE_Terrain_FOUND "Ogre Terrain Plugin" "Ogre Terrain plugin" "http://www.ogre.org" FALSE "" "") endif() # Verify MeshLodGenerator plugin if (OGRE_FOUND) if(OGRE_MeshLodGenerator_FOUND) set(OGRE_LIBRARIES ${OGRE_MeshLodGenerator_LIBRARIES} ${OGRE_LIBRARIES}) set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} ${OGRE_MeshLodGenerator_INCLUDE_DIRS}) else() set(OGRE_FOUND "FALSE") endif() macro_log_feature(OGRE_Terrain_FOUND "Ogre MeshLodGenerator Plugin" "Ogre MeshLodGenerator plugin" "http://www.ogre.org" FALSE "" "") endif() # Verify particleFx plugin if (OGRE_FOUND) if(OGRE_Plugin_ParticleFX_FOUND) set(OGRE_LIBRARIES ${OGRE_Plugin_ParticleFX_LIBRARIES} ${OGRE_LIBRARIES}) set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} ${OGRE_Plugin_ParticleFX_INCLUDE_DIRS}) else() set(OGRE_FOUND "FALSE") endif() macro_log_feature(OGRE_Plugin_ParticleFX_FOUND "Ogre Particle FX" "Ogre 3D ParticleFX plugin" "http://www.ogre.org" FALSE "" "") endif() # Verify RTShaderSystem plugin if (OGRE_FOUND) if(OGRE_RTShaderSystem_FOUND) set(OGRE_LIBRARIES ${OGRE_RTShaderSystem_LIBRARIES} ${OGRE_LIBRARIES}) set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} ${OGRE_RTShaderSystem_INCLUDE_DIRS}) else() set(OGRE_FOUND "FALSE") endif() macro_log_feature(OGRE_RTShaderSystem_FOUND "Ogre RT Render System" "Ogre 3D RT Render System" "http://www.ogre.org" FALSE "" "") endif() # Verify STBI Codec if (OGRE_FOUND) if(OGRE_Codec_STBI_FOUND) set(OGRE_LIBRARIES ${OGRE_Codec_STBI_LIBRARIES} ${OGRE_LIBRARIES}) set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} ${OGRE_Codec_STBI_INCLUDE_DIRS}) else() set(OGRE_FOUND "FALSE") endif() macro_log_feature(OGRE_Codec_STBI_FOUND "Ogre STBI Codec" "Ogre STBI Codec" "http://www.ogre.org" FALSE "" "") endif() set(OGRE_LIBRARIES ${OGRE_LIBRARIES} CACHE STRING "OGRE LIBRARIES") set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} CACHE STRING "OGRE INCLUDE DIRS") # Log result macro_log_feature(OGRE_FOUND "Ogre core library and needed plugins" "Ogre 3D renderer library" "http://www.ogre.org" FALSE "" "") # Find SkyX set (SkyX_STATIC ON) find_host_package(SkyX) macro_log_feature(SKYX_FOUND "SKYX" "Sky rendering plugin for Ogre 3D" "http://www.paradise-studios.net" FALSE "" "") # Find Hydrax set (Hydrax_STATIC ON) find_host_package(Hydrax) macro_log_feature(HYDRAX_FOUND "HYDRAX" "Water rendering plugin for Ogre 3D" "http://www.paradise-studios.net" FALSE "" "") if (WIN32) # Find Cef find_host_package(CEF) macro_log_feature(CEF_FOUND "Cef" "Chromium Embedded Framework, renders web browser in 3D" "http://code.google.com/p/chromiumembedded/" FALSE "" "") endif() # Find Newton find_host_package(Newton) macro_log_feature(NEWTON_FOUND "Newton" "Newton physics library" "http://newtondynamics.com/" FALSE "" "") # Find Assimp find_host_package(assimp) macro_log_feature(ASSIMP_FOUND "Assimp" "Open Asset Import Library" "http://assimp.sourceforge.net/" FALSE "" "") ####################################################################### # Bitmap toolkit plugin dependencies ####################################################################### # Find Aruco find_host_package(Aruco) macro_log_feature(Aruco_FOUND "Aruco library" "AR markers detection using Aruco library" "http://www.uco.es/investiga/grupos/ava/node/26" FALSE "" "") # Find FFmpeg find_host_package(FFmpeg) macro_log_feature(FFMPEG_FOUND "FFmpeg library" "Video decoding and playback using FFmpeg" "http://www.ffmpeg.org" FALSE "" "") # Find ARToolKit find_host_package(ARToolKit) macro_log_feature(ARToolKit_FOUND "ARToolKit library" "Augmented reality" "http://www.artoolkit.com" FALSE "" "") ####################################################################### # Audio plugin dependencies ####################################################################### # Find cAudio find_host_package(cAudio) macro_log_feature(cAudio_FOUND "cAudio library" "Sound support using cAudio library (OpenAL wrapper)" "https://github.com/wildicv/cAudio" FALSE "" "") ####################################################################### # Lib Speech dependencies ####################################################################### #find_host_package(pocketsphinx) #macro_log_feature(pocketsphinx_FOUND "pocketsphinx SDK" "Text to speech and voice recognition plugin" "https://cmusphinx.github.io/" FALSE "" "") find_host_package(vosk) macro_log_feature(vosk_FOUND "vosk SDK" "Text to speech and voice recognition plugin" "https://alphacephei.com/vosk/" FALSE "" "") find_host_package(piper) macro_log_feature(piper_FOUND "Piper SDK" "TTS plugin" "https://github.com/rhasspy/piper/" FALSE "" "") if (WIN32) ####################################################################### # Glove5DT plugin dependencies ####################################################################### # Find Glove 5DT sdk dependency find_host_package(Glove5DT) macro_log_feature(Glove5DT_FOUND "[NON-FREE] Glove 5DT SDK" "5DT data glove" "http://www.5dt.com/products/pdataglove5u.html" FALSE "" "") ####################################################################### # Joypad plugin dependencies ####################################################################### # Find Ms Direct Input dependency (part of Ms DirectX SDK) find_host_package(DIRECTINPUT) macro_log_feature(DIRECTINPUT_FOUND "Direct Input" "Joypad support using Ms Direct Input" "http://msdn.microsoft.com/en-us/library/windows/desktop/ee416842%28v=vs.85%29.aspx" FALSE "" "") ####################################################################### # OpenNi plugin dependencies ####################################################################### # Find OpenNi SDK find_host_package(OpenNi) macro_log_feature(OpenNi_FOUND "Open Ni" "Kinect support using OpenNi" "http://www.openni.org/openni-sdk/" FALSE "" "") ####################################################################### # NITE plugin dependencies ####################################################################### # Find NITE SDK find_host_package(NITE) macro_log_feature(NITE_FOUND "NITE" "Kinect support using OpenNi for skeleton tracking" "http://www.primesense.com/solutions/nite-middleware/" FALSE "" "") ####################################################################### # Vuzix plugin dependencies ####################################################################### # Find Vuzix sdk dependency (a dev agreement must have been submited to Vuzix company, so not distributed). find_host_package(Vuzix) macro_log_feature(Vuzix_FOUND "[NON-FREE] Vuzix SDK" "Vuzix HMD tracker" "http://www.vuzix.com/support/developer_program.html" FALSE "" "") ####################################################################### # OptiTrack plugin dependencies ####################################################################### # Find OptiTrack sdk dependency find_host_package(OptiTrack) macro_log_feature(OptiTrack_FOUND "OptiTrack SDK" "Natural Point OptiTrack infrared cameras support" "http://www.naturalpoint.com/optitrack/downloads/developer-tools.html" FALSE "" "") ####################################################################### # Speech/Reco plugin dependencies ####################################################################### # Find Windows SAPI sdk dependency (non free, so not distributed). find_host_package(SAPI) macro_log_feature(SAPI_FOUND "Windows SAPI SDK" "Text to speech and voice recognition plugin" "https://msdn.microsoft.com/en-us/library/ms723627%28v=vs.85%29.aspx" FALSE "" "") ####################################################################### # Respiration belt plugin dependencies ####################################################################### # Find TEA's TUsb sdk dependency (non free, so not distributed). find_host_package(TUsb) macro_log_feature(TUsb_FOUND "[NON-FREE] TEA TUsb SDK" "A respiration belt captor plugin, that supports TEA's wireless captor" "http://www.teaergo.com/index.php?option=com_content&view=article&id=165&Itemid=250&lang=en" FALSE "" "") ####################################################################### # VLC plugin dependencies ####################################################################### # Find VLC sdk dependency (distributed with VideoLan setup). #find_host_package(Vlc) #macro_log_feature(Vlc_FOUND "Vlc SDK" "A video plugin, using Video Lan." "http://www.videolan.org/" FALSE "" "") ####################################################################### # Eye tracking plugin dependencies ####################################################################### # Find SMI IView sdk dependency (non free, so not distributed). find_host_package(IViewX) macro_log_feature(IViewX_FOUND "[NON-FREE] SMI IView X SDK" "Professional eye tracking system" "http://www.smivision.com/" FALSE "" "") ####################################################################### # MMedia plugin dependencies ####################################################################### # Find Quicktime sdk dependency (non free, so not distributed). find_host_package(Quicktime) macro_log_feature(Quicktime_FOUND "[NON-FREE] Quicktime SDK" "Apple Quicktime movie format sdk" "https://developer.apple.com/quicktime/" FALSE "" "") endif (WIN32) ####################################################################### # OS dependencies ####################################################################### # Find X11 if (UNIX AND NOT ANDROID AND NOT APPLE) find_host_package(X11) macro_log_feature(X11_FOUND "X11" "X Window system" "http://www.x.org" TRUE "" "") macro_log_feature(X11_Xt_FOUND "Xt" "X Toolkit" "http://www.x.org" TRUE "" "") find_library(XAW_LIBRARY NAMES Xaw Xaw7 PATHS ${DEP_LIB_SEARCH_DIR} ${X11_LIB_SEARCH_PATH}) macro_log_feature(XAW_LIBRARY "Xaw" "X11 Athena widget set" "http://www.x.org" TRUE "" "") mark_as_advanced(XAW_LIBRARY) endif () ####################################################################### # Tools dependencies ####################################################################### # Find Doxygen find_host_package(Doxygen) macro_log_feature(DOXYGEN_FOUND "Doxygen" "Tool for building API documentation" "http://doxygen.org" FALSE "" "") ####################################################################### # Some dependencies shared accross multiples plugins ####################################################################### if (Scol_BUILD_WITH_SDL) find_host_package(SDL2) macro_log_feature(SDL2_FOUND "SDL2" "SDL libraries" "www.lib-sdl.org" FALSE "" "") else() if (APPLE) # For iOS, we use our own FindQt script to work around bad CMake support. #find_host_package(Qt5 COMPONENTS Widgets Gui REQUIRED) set(QtModule "Widgets") find_host_package(Qt5 REQUIRED) #set(QtModule "Gui") #find_host_package(Qt5 REQUIRED) macro_log_feature(Qt5Widgets_FOUND "Qt5Widgets" "Qt5 Widgets module" "www.qt.io" TRUE "" "") #message(STATUS "Qt5Widgets_STATIC_DEPS: ${Qt5Widgets_STATIC_DEPS}") elseif (WIN32) # optional for windows #find_host_package(Qt5 COMPONENTS Widgets) set(QtModule "Widgets") find_host_package(Qt5) #set(QtModule "Gui") #find_host_package(Qt5 REQUIRED) macro_log_feature(Qt5Widgets_FOUND "Qt5Widgets" "Qt5 Widgets module" "www.qt.io" FALSE "" "") elseif(NOT ANDROID) find_package(Qt5 COMPONENTS Core Gui Widgets Gamepad Sensors) macro_log_feature(Qt5Widgets_FOUND "Qt5Widgets" "Qt5 Widgets module" "www.qt.io" FALSE "" "") #if(RPI) # set(QT_MOC_EXECUTABLE moc CACHE PATH "QT MOC directory" FORCE) #endif() endif() endif() if(Boost_FOUND AND ANDROID) list(REMOVE_DUPLICATES Boost_LIBRARIES) 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(${Boost_INCLUDE_DIRS}) link_directories(${Boost_LIBRARY_DIRS}) if(VisualLeakDetector_FOUND) include_directories(${VisualLeakDetector_INCLUDE_DIRS}) link_directories(${VisualLeakDetector_LIBRARY_DIR}) endif()