|
|
@ -1,6 +1,8 @@ |
|
|
|
project(Plasma) |
|
|
|
project(Plasma) |
|
|
|
cmake_minimum_required(VERSION 2.8.11.2) |
|
|
|
cmake_minimum_required(VERSION 2.8.11.2) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
include(FeatureSummary) |
|
|
|
|
|
|
|
|
|
|
|
if(POLICY CMP0054) |
|
|
|
if(POLICY CMP0054) |
|
|
|
cmake_policy(SET CMP0054 NEW) |
|
|
|
cmake_policy(SET CMP0054 NEW) |
|
|
|
endif() |
|
|
|
endif() |
|
|
@ -41,25 +43,128 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") |
|
|
|
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${Plasma_BINARY_DIR}/bin) |
|
|
|
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${Plasma_BINARY_DIR}/bin) |
|
|
|
|
|
|
|
|
|
|
|
# Find all 3rd-party libraries that are required |
|
|
|
# Find all 3rd-party libraries that are required |
|
|
|
set(Python_ADDITIONAL_VERSIONS 2.7) |
|
|
|
|
|
|
|
find_package(OpenSSL REQUIRED) |
|
|
|
find_package(OpenSSL REQUIRED) |
|
|
|
|
|
|
|
set_package_properties(OpenSSL PROPERTIES |
|
|
|
|
|
|
|
URL "https://www.openssl.org/" |
|
|
|
|
|
|
|
DESCRIPTION "OpenSSL libraries for SSL/TLS" |
|
|
|
|
|
|
|
TYPE REQUIRED |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
find_package(OpenAL REQUIRED) |
|
|
|
find_package(OpenAL REQUIRED) |
|
|
|
|
|
|
|
set_package_properties(OpenAL PROPERTIES |
|
|
|
|
|
|
|
URL "http://www.openal.org/" |
|
|
|
|
|
|
|
DESCRIPTION "3D audio and EAX library" |
|
|
|
|
|
|
|
TYPE REQUIRED |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
set(Python_ADDITIONAL_VERSIONS 2.7) |
|
|
|
find_package(PythonLibs REQUIRED) |
|
|
|
find_package(PythonLibs REQUIRED) |
|
|
|
|
|
|
|
set_package_properties(PythonLibs PROPERTIES |
|
|
|
|
|
|
|
URL "http://www.python.org" |
|
|
|
|
|
|
|
DESCRIPTION "Python Scripting language C bindings" |
|
|
|
|
|
|
|
TYPE REQUIRED |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
find_package(EXPAT REQUIRED) |
|
|
|
find_package(EXPAT REQUIRED) |
|
|
|
|
|
|
|
set_package_properties(EXPAT PROPERTIES |
|
|
|
|
|
|
|
URL "http://expat.sourceforge.net/" |
|
|
|
|
|
|
|
DESCRIPTION "Expat XML Parser for C" |
|
|
|
|
|
|
|
TYPE REQUIRED |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
find_package(ZLIB REQUIRED) |
|
|
|
find_package(ZLIB REQUIRED) |
|
|
|
|
|
|
|
set_package_properties(ZLIB PROPERTIES |
|
|
|
|
|
|
|
URL "http://www.zlib.net" |
|
|
|
|
|
|
|
DESCRIPTION "Fast (de)compression library" |
|
|
|
|
|
|
|
TYPE REQUIRED |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
find_package(JPEG REQUIRED) |
|
|
|
find_package(JPEG REQUIRED) |
|
|
|
|
|
|
|
set_package_properties(JPEG PROPERTIES |
|
|
|
|
|
|
|
URL "http://libjpeg-turbo.virtualgl.org/" |
|
|
|
|
|
|
|
DESCRIPTION "JPEG encoding and decoding library. libjpeg-turbo is recommended for better performance" |
|
|
|
|
|
|
|
TYPE REQUIRED |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
find_package(PNG REQUIRED) |
|
|
|
find_package(PNG REQUIRED) |
|
|
|
find_package(Ogg REQUIRED) #TODO: Not required if we aren't building the client |
|
|
|
set_package_properties(PNG PROPERTIES |
|
|
|
find_package(Vorbis REQUIRED) #TODO: Not required if we aren't building the client |
|
|
|
URL "http://www.libpng.org/pub/png/libpng.html" |
|
|
|
find_package(Speex REQUIRED) #TODO: Not required if we aren't building the client |
|
|
|
DESCRIPTION "Efficient lossless image library" |
|
|
|
|
|
|
|
TYPE REQUIRED |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#TODO: Not required if we aren't building the client |
|
|
|
|
|
|
|
find_package(Ogg REQUIRED) |
|
|
|
|
|
|
|
set_package_properties(Ogg PROPERTIES |
|
|
|
|
|
|
|
URL "https://xiph.org/ogg/" |
|
|
|
|
|
|
|
DESCRIPTION "Ogg multimedia container library for various audio and video codecs" |
|
|
|
|
|
|
|
TYPE REQUIRED |
|
|
|
|
|
|
|
PURPOSE "Required for audio support in the client" |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#TODO: Not required if we aren't building the client |
|
|
|
|
|
|
|
find_package(Vorbis REQUIRED) |
|
|
|
|
|
|
|
set_package_properties(Vorbis PROPERTIES |
|
|
|
|
|
|
|
URL "https://xiph.org/vorbis/" |
|
|
|
|
|
|
|
DESCRIPTION "Free and open audio codec for mid-to-high quality audio" |
|
|
|
|
|
|
|
TYPE REQUIRED |
|
|
|
|
|
|
|
PURPOSE "Required for audio support in the client" |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#TODO: Not required if we aren't building the client |
|
|
|
|
|
|
|
find_package(Speex REQUIRED) |
|
|
|
|
|
|
|
set_package_properties(Speex PROPERTIES |
|
|
|
|
|
|
|
URL "http://www.speex.org/" |
|
|
|
|
|
|
|
DESCRIPTION "Free and open audio codec specifically designed for speech" |
|
|
|
|
|
|
|
TYPE REQUIRED |
|
|
|
|
|
|
|
PURPOSE "Required for in-game voice chat in the client" |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
find_package(VPX) |
|
|
|
find_package(VPX) |
|
|
|
|
|
|
|
set_package_properties(VPX PROPERTIES |
|
|
|
|
|
|
|
URL "http://www.webmproject.org/" |
|
|
|
|
|
|
|
DESCRIPTION "VP8 and VP9 video codec" |
|
|
|
|
|
|
|
TYPE OPTIONAL |
|
|
|
|
|
|
|
PURPOSE "Required for in-game video playback support" |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
find_package(Opus) |
|
|
|
find_package(Opus) |
|
|
|
|
|
|
|
set_package_properties(Opus PROPERTIES |
|
|
|
|
|
|
|
URL "https://www.opus-codec.org/" |
|
|
|
|
|
|
|
DESCRIPTION "Versatile free and open audio codec" |
|
|
|
|
|
|
|
TYPE OPTIONAL |
|
|
|
|
|
|
|
PURPOSE "Required for in-game video playback support" |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
find_package(CURL REQUIRED) |
|
|
|
find_package(CURL REQUIRED) |
|
|
|
|
|
|
|
set_package_properties(CURL PROPERTIES |
|
|
|
|
|
|
|
URL "http://curl.haxx.se/libcurl/" |
|
|
|
|
|
|
|
DESCRIPTION "Multi-protocol file transfer library" |
|
|
|
|
|
|
|
TYPE REQUIRED |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
find_package(Freetype) |
|
|
|
find_package(Freetype) |
|
|
|
|
|
|
|
set_package_properties(Freetype PROPERTIES |
|
|
|
|
|
|
|
URL "http://www.freetype.org/" |
|
|
|
|
|
|
|
DESCRIPTION "Library for rendering fonts" |
|
|
|
|
|
|
|
TYPE OPTIONAL |
|
|
|
|
|
|
|
PURPOSE "Required in order to build the plFontConverter tool" |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
if(WIN32) |
|
|
|
if(WIN32) |
|
|
|
find_package(PhysX REQUIRED) #TODO: Not required if we aren't building the client |
|
|
|
#TODO: Not required if we aren't building the client |
|
|
|
|
|
|
|
find_package(PhysX REQUIRED) |
|
|
|
|
|
|
|
set_package_properties(PhysX PROPERTIES |
|
|
|
|
|
|
|
URL "https://developer.nvidia.com/physx-sdk" |
|
|
|
|
|
|
|
DESCRIPTION "Library for hardware-accelerated physics simulation for gaming" |
|
|
|
|
|
|
|
TYPE REQUIRED |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
find_package(DirectX REQUIRED) |
|
|
|
find_package(DirectX REQUIRED) |
|
|
|
|
|
|
|
set_package_properties(DirectX PROPERTIES |
|
|
|
|
|
|
|
DESCRIPTION "Framework for hardware-accelerated 3D graphics on Microsoft platforms" |
|
|
|
|
|
|
|
TYPE REQUIRED |
|
|
|
|
|
|
|
) |
|
|
|
endif(WIN32) |
|
|
|
endif(WIN32) |
|
|
|
|
|
|
|
|
|
|
|
if(VPX_FOUND AND Opus_FOUND) |
|
|
|
if(VPX_FOUND AND Opus_FOUND) |
|
|
@ -115,28 +220,44 @@ option(PLASMA_BUILD_RESOURCE_DAT "Do we want to build resource.dat?" ON) |
|
|
|
option(PLASMA_BUILD_LAUNCHER "Do we want to build plUruLauncher?" ON) |
|
|
|
option(PLASMA_BUILD_LAUNCHER "Do we want to build plUruLauncher?" ON) |
|
|
|
option(PLASMA_BUILD_TOOLS "Do we want to build the Plasma tools?" ON) |
|
|
|
option(PLASMA_BUILD_TOOLS "Do we want to build the Plasma tools?" ON) |
|
|
|
option(PLASMA_BUILD_TESTS "Do we want to build the unit tests?" OFF) |
|
|
|
option(PLASMA_BUILD_TESTS "Do we want to build the unit tests?" OFF) |
|
|
|
if(WIN32) |
|
|
|
|
|
|
|
option(3dsm_BUILD_PLUGIN "Do we want to build the 3ds Max plugin?" OFF) |
|
|
|
|
|
|
|
else() |
|
|
|
|
|
|
|
set(3dsm_BUILD_PLUGIN OFF) |
|
|
|
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(PLASMA_BUILD_TOOLS) |
|
|
|
if(PLASMA_BUILD_TOOLS) |
|
|
|
# Custom dummy target for compiling all tools |
|
|
|
# Custom dummy target for compiling all tools |
|
|
|
add_custom_target(tools) |
|
|
|
add_custom_target(tools) |
|
|
|
endif() |
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
|
|
if(3dsm_BUILD_PLUGIN) |
|
|
|
if(WIN32) |
|
|
|
find_package(MaxSDK REQUIRED) |
|
|
|
find_package(MaxSDK) |
|
|
|
add_definitions(-DBUILDING_MAXPLUGIN) |
|
|
|
set_package_properties(MaxSDK PROPERTIES |
|
|
|
endif(3dsm_BUILD_PLUGIN) |
|
|
|
URL "http://www.autodesk.com/" |
|
|
|
|
|
|
|
DESCRIPTION "SDK for integrating with the 3DS Max modelling software" |
|
|
|
|
|
|
|
TYPE OPTIONAL |
|
|
|
|
|
|
|
PURPOSE "Required for building the Plasma plugins for 3DS Max" |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
option(3dsm_BUILD_PLUGIN "Do we want to build the 3ds Max plugin?" OFF) |
|
|
|
|
|
|
|
if (3dsm_BUILD_PLUGIN AND 3dsm_FOUND) |
|
|
|
|
|
|
|
add_definitions(-DBUILDING_MAXPLUGIN) |
|
|
|
|
|
|
|
endif() |
|
|
|
|
|
|
|
else() |
|
|
|
|
|
|
|
set(3dsm_BUILD_PLUGIN OFF) |
|
|
|
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(WIN32) |
|
|
|
|
|
|
|
find_package(VLD) |
|
|
|
|
|
|
|
set_package_properties(VLD PROPERTIES |
|
|
|
|
|
|
|
URL "https://vld.codeplex.com/" |
|
|
|
|
|
|
|
DESCRIPTION "Visual Leak Debugger for software compiled with Microsoft Visual C++" |
|
|
|
|
|
|
|
TYPE OPTIONAL |
|
|
|
|
|
|
|
PURPOSE "Useful for detecting memory leaks (MSVC only)" |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
option(USE_VLD "Build and link with Visual Leak Detector (MSVC only)" OFF) |
|
|
|
option(USE_VLD "Build and link with Visual Leak Detector" OFF) |
|
|
|
if(USE_VLD) |
|
|
|
if(USE_VLD AND VLD_FOUND) |
|
|
|
add_definitions(-DUSE_VLD) |
|
|
|
add_definitions(-DUSE_VLD) |
|
|
|
find_package(VLD REQUIRED) |
|
|
|
include_directories(${VLD_INCLUDE_DIR}) |
|
|
|
include_directories(${VLD_INCLUDE_DIR}) |
|
|
|
endif(USE_VLD) |
|
|
|
endif(USE_VLD) |
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
|
|
include(TestBigEndian) |
|
|
|
include(TestBigEndian) |
|
|
|
test_big_endian(BIG_ENDIAN) |
|
|
|
test_big_endian(BIG_ENDIAN) |
|
|
@ -162,3 +283,5 @@ if(PLASMA_BUILD_TESTS) |
|
|
|
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}) |
|
|
|
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}) |
|
|
|
add_subdirectory(Sources/Tests EXCLUDE_FROM_ALL) |
|
|
|
add_subdirectory(Sources/Tests EXCLUDE_FROM_ALL) |
|
|
|
endif(PLASMA_BUILD_TESTS) |
|
|
|
endif(PLASMA_BUILD_TESTS) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) |
|
|
|