|
|
|
@ -100,25 +100,29 @@ endif()
|
|
|
|
|
cmake_minimum_required(VERSION 2.6)
|
|
|
|
|
|
|
|
|
|
# Sound setup
|
|
|
|
|
set(FFmpeg_FIND_COMPONENTS AVCODEC AVFORMAT AVUTIL SWSCALE SWRESAMPLE AVRESAMPLE)
|
|
|
|
|
unset(FFMPEG_LIBRARIES CACHE)
|
|
|
|
|
find_package(FFmpeg)
|
|
|
|
|
|
|
|
|
|
find_package(FFmpeg REQUIRED)
|
|
|
|
|
|
|
|
|
|
set (FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${SWSCALE_LIBRARY})
|
|
|
|
|
|
|
|
|
|
if ( NOT AVCODEC_FOUND OR NOT AVFORMAT_FOUND OR NOT AVUTIL_FOUND OR NOT SWSCALE_FOUND )
|
|
|
|
|
message(FATAL_ERROR "FFmpeg component required, but not found!")
|
|
|
|
|
endif()
|
|
|
|
|
set(SOUND_INPUT_INCLUDES ${FFMPEG_INCLUDE_DIRS})
|
|
|
|
|
set(SOUND_INPUT_LIBRARY ${FFMPEG_LIBRARIES} ${SWSCALE_LIBRARIES})
|
|
|
|
|
if( SWRESAMPLE_FOUND )
|
|
|
|
|
add_definitions(-DHAVE_LIBSWRESAMPLE)
|
|
|
|
|
set(SOUND_INPUT_LIBRARY ${FFMPEG_LIBRARIES} ${SWRESAMPLE_LIBRARIES})
|
|
|
|
|
set (FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${SWRESAMPLE_LIBRARIES})
|
|
|
|
|
else()
|
|
|
|
|
if( AVRESAMPLE_FOUND )
|
|
|
|
|
set(SOUND_INPUT_LIBRARY ${FFMPEG_LIBRARIES} ${AVRESAMPLE_LIBRARIES})
|
|
|
|
|
set (FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${AVRESAMPLE_LIBRARIES})
|
|
|
|
|
else()
|
|
|
|
|
message(FATAL_ERROR "Install either libswresample (FFmpeg) or libavresample (Libav).")
|
|
|
|
|
endif()
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
set(SOUND_INPUT_LIBRARY ${FFMPEG_LIBRARIES})
|
|
|
|
|
|
|
|
|
|
# TinyXML
|
|
|
|
|
option(USE_SYSTEM_TINYXML "Use system TinyXML library instead of internal." OFF)
|
|
|
|
|
if(USE_SYSTEM_TINYXML)
|
|
|
|
@ -150,6 +154,20 @@ endif()
|
|
|
|
|
|
|
|
|
|
# Dependencies
|
|
|
|
|
|
|
|
|
|
set(DESIRED_QT_VERSION 4 CACHE STRING "The QT version OpenMW should use (4 or 5)")
|
|
|
|
|
message(STATUS "Using Qt${DESIRED_QT_VERSION}")
|
|
|
|
|
|
|
|
|
|
if (DESIRED_QT_VERSION MATCHES 4)
|
|
|
|
|
find_package(Qt4 REQUIRED COMPONENTS QtCore QtGui QtNetwork QtOpenGL)
|
|
|
|
|
else()
|
|
|
|
|
find_package(Qt5Widgets REQUIRED)
|
|
|
|
|
find_package(Qt5Core REQUIRED)
|
|
|
|
|
find_package(Qt5Network REQUIRED)
|
|
|
|
|
find_package(Qt5OpenGL REQUIRED)
|
|
|
|
|
# Instruct CMake to run moc automatically when needed.
|
|
|
|
|
#set(CMAKE_AUTOMOC ON)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
# Fix for not visible pthreads functions for linker with glibc 2.15
|
|
|
|
|
if (UNIX AND NOT APPLE)
|
|
|
|
|
find_package (Threads)
|
|
|
|
@ -170,7 +188,7 @@ if (HAVE_UNORDERED_MAP)
|
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
set(BOOST_COMPONENTS system filesystem program_options)
|
|
|
|
|
set(BOOST_COMPONENTS system filesystem program_options thread)
|
|
|
|
|
if(WIN32)
|
|
|
|
|
set(BOOST_COMPONENTS ${BOOST_COMPONENTS} locale)
|
|
|
|
|
endif(WIN32)
|
|
|
|
|