|
|
|
@ -155,10 +155,11 @@ else()
|
|
|
|
|
cmake_minimum_required(VERSION 2.6)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
# Sound setup
|
|
|
|
|
find_package(FFmpeg REQUIRED COMPONENTS AVCODEC AVFORMAT AVUTIL SWSCALE SWRESAMPLE)
|
|
|
|
|
# Required for building the FFmpeg headers
|
|
|
|
|
add_definitions(-D__STDC_CONSTANT_MACROS)
|
|
|
|
|
IF(BUILD_OPENMW OR BUILD_OPENCS)
|
|
|
|
|
# Sound setup
|
|
|
|
|
find_package(FFmpeg REQUIRED COMPONENTS AVCODEC AVFORMAT AVUTIL SWSCALE SWRESAMPLE)
|
|
|
|
|
# Required for building the FFmpeg headers
|
|
|
|
|
add_definitions(-D__STDC_CONSTANT_MACROS)
|
|
|
|
|
|
|
|
|
|
# TinyXML
|
|
|
|
|
option(USE_SYSTEM_TINYXML "Use system TinyXML library instead of internal." OFF)
|
|
|
|
@ -167,6 +168,7 @@ if (USE_SYSTEM_TINYXML)
|
|
|
|
|
add_definitions (-DTIXML_USE_STL)
|
|
|
|
|
include_directories(SYSTEM ${TinyXML_INCLUDE_DIRS})
|
|
|
|
|
endif()
|
|
|
|
|
ENDIF(BUILD_OPENMW OR BUILD_OPENCS)
|
|
|
|
|
|
|
|
|
|
# Platform specific
|
|
|
|
|
if (WIN32)
|
|
|
|
@ -216,11 +218,12 @@ IF(BOOST_STATIC)
|
|
|
|
|
set(Boost_USE_STATIC_LIBS ON)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
find_package(OpenSceneGraph 3.3.4 REQUIRED osgDB osgViewer osgText osgGA osgAnimation osgParticle osgUtil osgFX)
|
|
|
|
|
IF(BUILD_OPENMW OR BUILD_OPENCS)
|
|
|
|
|
find_package(OpenSceneGraph 3.3.4 REQUIRED osgDB osgViewer osgText osgGA osgAnimation osgParticle osgUtil osgFX)
|
|
|
|
|
|
|
|
|
|
include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS})
|
|
|
|
|
include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS})
|
|
|
|
|
|
|
|
|
|
if(OSG_STATIC)
|
|
|
|
|
if(OSG_STATIC)
|
|
|
|
|
macro(use_static_osg_plugin_library PLUGIN_NAME)
|
|
|
|
|
set(PLUGIN_NAME_DBG ${PLUGIN_NAME}d ${PLUGIN_NAME}D ${PLUGIN_NAME}_d ${PLUGIN_NAME}_D ${PLUGIN_NAME}_debug ${PLUGIN_NAME})
|
|
|
|
|
|
|
|
|
@ -266,9 +269,9 @@ if(OSG_STATIC)
|
|
|
|
|
foreach(DEPENDENCY ${PLUGIN_DEPS_LIST})
|
|
|
|
|
use_static_osg_plugin_dep(${DEPENDENCY})
|
|
|
|
|
endforeach()
|
|
|
|
|
endif()
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if(QT_STATIC)
|
|
|
|
|
if(QT_STATIC)
|
|
|
|
|
if(WIN32)
|
|
|
|
|
if(DESIRED_QT_VERSION MATCHES 4)
|
|
|
|
|
# QtCore needs WSAAsyncSelect from Ws2_32.lib
|
|
|
|
@ -276,17 +279,19 @@ if(QT_STATIC)
|
|
|
|
|
message("QT_QTCORE_LIBRARY: ${QT_QTCORE_LIBRARY}")
|
|
|
|
|
endif()
|
|
|
|
|
endif()
|
|
|
|
|
endif()
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
find_package(MyGUI REQUIRED)
|
|
|
|
|
if (${MYGUI_VERSION} VERSION_LESS "3.2.1")
|
|
|
|
|
find_package(MyGUI REQUIRED)
|
|
|
|
|
if (${MYGUI_VERSION} VERSION_LESS "3.2.1")
|
|
|
|
|
message(FATAL_ERROR "OpenMW requires MyGUI 3.2.1 or later, please install the latest version from http://mygui.info")
|
|
|
|
|
endif()
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
find_package(SDL2 REQUIRED)
|
|
|
|
|
find_package(OpenAL REQUIRED)
|
|
|
|
|
find_package(Bullet 283 REQUIRED COMPONENTS BulletCollision LinearMath)
|
|
|
|
|
ENDIF(BUILD_OPENMW OR BUILD_OPENCS)
|
|
|
|
|
|
|
|
|
|
find_package(Boost REQUIRED COMPONENTS ${BOOST_COMPONENTS})
|
|
|
|
|
find_package(SDL2 REQUIRED)
|
|
|
|
|
find_package(OpenAL REQUIRED)
|
|
|
|
|
find_package(Bullet 283 REQUIRED COMPONENTS BulletCollision LinearMath)
|
|
|
|
|
|
|
|
|
|
include_directories("."
|
|
|
|
|
SYSTEM
|
|
|
|
@ -556,11 +561,13 @@ if(WIN32)
|
|
|
|
|
endif(WIN32)
|
|
|
|
|
|
|
|
|
|
# Extern
|
|
|
|
|
IF(BUILD_OPENMW OR BUILD_OPENCS)
|
|
|
|
|
add_subdirectory (extern/osg-ffmpeg-videoplayer)
|
|
|
|
|
add_subdirectory (extern/oics)
|
|
|
|
|
if (USE_QT)
|
|
|
|
|
add_subdirectory (extern/osgQt)
|
|
|
|
|
endif()
|
|
|
|
|
ENDIF(BUILD_OPENMW OR BUILD_OPENCS)
|
|
|
|
|
|
|
|
|
|
# Components
|
|
|
|
|
add_subdirectory (components)
|
|
|
|
|