|
|
|
@ -1,3 +1,43 @@
|
|
|
|
|
# Apps and tools
|
|
|
|
|
option(BUILD_OPENMW "build OpenMW" ON)
|
|
|
|
|
option(BUILD_OPENMW_MP "build OpenMW-MP" ON)
|
|
|
|
|
option(BUILD_MASTER "build tes3mp master server" OFF)
|
|
|
|
|
option(BUILD_BSATOOL "build BSA extractor" ON)
|
|
|
|
|
option(BUILD_ESMTOOL "build ESM inspector" ON)
|
|
|
|
|
option(BUILD_LAUNCHER "build Launcher" ON)
|
|
|
|
|
option(BUILD_BROWSER "build tes3mp Server Browser" ON)
|
|
|
|
|
option(BUILD_MWINIIMPORTER "build MWiniImporter" ON)
|
|
|
|
|
option(BUILD_ESSIMPORTER "build ESS (Morrowind save game) importer" ON)
|
|
|
|
|
option(BUILD_OPENCS "build OpenMW Construction Set" ON)
|
|
|
|
|
option(BUILD_WIZARD "build Installation Wizard" ON)
|
|
|
|
|
option(BUILD_WITH_CODE_COVERAGE "Enable code coverage with gconv" OFF)
|
|
|
|
|
option(BUILD_UNITTESTS "Enable Unittests with Google C++ Unittest" OFF)
|
|
|
|
|
option(BUILD_NIFTEST "build nif file tester" OFF)
|
|
|
|
|
option(BUILD_MYGUI_PLUGIN "build MyGUI plugin for OpenMW resources, to use with MyGUI tools" ON)
|
|
|
|
|
option(BUILD_DOCS "build documentation." OFF )
|
|
|
|
|
|
|
|
|
|
if (NOT BUILD_LAUNCHER AND NOT BUILD_BROWSER AND NOT BUILD_OPENCS AND NOT BUILD_WIZARD)
|
|
|
|
|
set(USE_QT FALSE)
|
|
|
|
|
else()
|
|
|
|
|
set(USE_QT TRUE)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if (USE_QT)
|
|
|
|
|
set(DESIRED_QT_VERSION 4 CACHE STRING "The QT version OpenMW should use (4 or 5)")
|
|
|
|
|
set_property(CACHE DESIRED_QT_VERSION PROPERTY STRINGS 4 5)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if (APPLE)
|
|
|
|
|
# OS X build process relies on this fix: https://github.com/Kitware/CMake/commit/3df5147043d83aa09acd5c9ce31d5c602efb99db
|
|
|
|
|
cmake_minimum_required(VERSION 3.1.0)
|
|
|
|
|
elseif (USE_QT AND DESIRED_QT_VERSION MATCHES 5)
|
|
|
|
|
# 2.8.11+ is required to make Qt5 happy and allow linking QtMain on Windows.
|
|
|
|
|
cmake_minimum_required(VERSION 2.8.11)
|
|
|
|
|
else()
|
|
|
|
|
# We probably support older versions than this.
|
|
|
|
|
cmake_minimum_required(VERSION 2.6)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
project(OpenMW)
|
|
|
|
|
|
|
|
|
|
# If the user doesn't supply a CMAKE_BUILD_TYPE via command line, choose one for them.
|
|
|
|
@ -59,24 +99,6 @@ option(QT_STATIC "Link static build of QT into the binaries" FALSE)
|
|
|
|
|
|
|
|
|
|
option(OPENMW_UNITY_BUILD "Use fewer compilation units to speed up compile time" FALSE)
|
|
|
|
|
|
|
|
|
|
# Apps and tools
|
|
|
|
|
option(BUILD_OPENMW "build OpenMW" ON)
|
|
|
|
|
option(BUILD_OPENMW_MP "build OpenMW-MP" ON)
|
|
|
|
|
option(BUILD_MASTER "build tes3mp master server" OFF)
|
|
|
|
|
option(BUILD_BSATOOL "build BSA extractor" ON)
|
|
|
|
|
option(BUILD_ESMTOOL "build ESM inspector" ON)
|
|
|
|
|
option(BUILD_LAUNCHER "build Launcher" ON)
|
|
|
|
|
option(BUILD_BROWSER "build tes3mp Server Browser" ON)
|
|
|
|
|
option(BUILD_MWINIIMPORTER "build MWiniImporter" ON)
|
|
|
|
|
option(BUILD_ESSIMPORTER "build ESS (Morrowind save game) importer" ON)
|
|
|
|
|
option(BUILD_OPENCS "build OpenMW Construction Set" ON)
|
|
|
|
|
option(BUILD_WIZARD "build Installation Wizard" ON)
|
|
|
|
|
option(BUILD_WITH_CODE_COVERAGE "Enable code coverage with gconv" OFF)
|
|
|
|
|
option(BUILD_UNITTESTS "Enable Unittests with Google C++ Unittest" OFF)
|
|
|
|
|
option(BUILD_NIFTEST "build nif file tester" OFF)
|
|
|
|
|
option(BUILD_MYGUI_PLUGIN "build MyGUI plugin for OpenMW resources, to use with MyGUI tools" ON)
|
|
|
|
|
option(BUILD_DOCS "build documentation." OFF )
|
|
|
|
|
|
|
|
|
|
# what is necessary to build documentation
|
|
|
|
|
IF( BUILD_DOCS )
|
|
|
|
|
# Builds the documentation.
|
|
|
|
@ -126,16 +148,8 @@ endif()
|
|
|
|
|
find_package(RakNet REQUIRED)
|
|
|
|
|
include_directories(${RakNet_INCLUDES})
|
|
|
|
|
|
|
|
|
|
if (NOT BUILD_LAUNCHER AND NOT BUILD_BROWSER AND NOT BUILD_OPENCS AND NOT BUILD_WIZARD)
|
|
|
|
|
set(USE_QT FALSE)
|
|
|
|
|
else()
|
|
|
|
|
set(USE_QT TRUE)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
# Dependencies
|
|
|
|
|
if (USE_QT)
|
|
|
|
|
set(DESIRED_QT_VERSION 5 CACHE STRING "The QT version OpenMW should use (4 or 5)")
|
|
|
|
|
set_property(CACHE DESIRED_QT_VERSION PROPERTY STRINGS 4 5)
|
|
|
|
|
message(STATUS "Using Qt${DESIRED_QT_VERSION}")
|
|
|
|
|
|
|
|
|
|
if (DESIRED_QT_VERSION MATCHES 4)
|
|
|
|
@ -150,17 +164,6 @@ if (USE_QT)
|
|
|
|
|
endif()
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if (APPLE)
|
|
|
|
|
# OS X build process relies on this fix: https://github.com/Kitware/CMake/commit/3df5147043d83aa09acd5c9ce31d5c602efb99db
|
|
|
|
|
cmake_minimum_required(VERSION 3.1.0)
|
|
|
|
|
elseif (USE_QT AND DESIRED_QT_VERSION MATCHES 5)
|
|
|
|
|
# 2.8.11+ is required to make Qt5 happy and allow linking QtMain on Windows.
|
|
|
|
|
cmake_minimum_required(VERSION 2.8.11)
|
|
|
|
|
else()
|
|
|
|
|
# We probably support older versions than this.
|
|
|
|
|
cmake_minimum_required(VERSION 2.6)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
IF(BUILD_OPENMW OR BUILD_OPENCS)
|
|
|
|
|
# Sound setup
|
|
|
|
|
find_package(FFmpeg REQUIRED COMPONENTS AVCODEC AVFORMAT AVUTIL SWSCALE SWRESAMPLE)
|
|
|
|
|