Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 92 lines (74 sloc) 2.969 kB
f8bc99d @branan Fix line endings and tabs
branan authored
1 project(Plasma)
2 cmake_minimum_required(VERSION 2.8)
3
6b0dbc9 @Hoikas Convert hsConfig defines to cmake -- fixes #93
Hoikas authored
4 # HeadSpin Configuration
5 if(WIN32 AND NOT CYGWIN)
6 add_definitions(-DHS_BUILD_FOR_WIN32)
7 endif(WIN32 AND NOT CYGWIN)
8 if(UNIX)
9 add_definitions(-DHS_BUILD_FOR_UNIX)
10 endif(UNIX)
11 # End HeadSpin Configuration
12
f8bc99d @branan Fix line endings and tabs
branan authored
13 set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
681fcde @Hoikas Output executables and the max plugins to the bin directory because 5…
Hoikas authored
14 SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${Plasma_BINARY_DIR}/bin)
f8bc99d @branan Fix line endings and tabs
branan authored
15
16 # Find all 3rd-party libraries that are required
17 find_package(OpenSSL REQUIRED)
18 find_package(OpenAL REQUIRED)
19 find_package(PythonLibs REQUIRED)
20 find_package(EXPAT REQUIRED)
21 find_package(ZLIB REQUIRED)
8231fea @Deledrius Add libPNG support stubs.
Deledrius authored
22 find_package(PNG REQUIRED)
f8bc99d @branan Fix line endings and tabs
branan authored
23 find_package(Ogg REQUIRED) #TODO: Not required if we aren't building the client
24 find_package(Vorbis REQUIRED) #TODO: Not required if we aren't building the client
25 find_package(Speex REQUIRED) #TODO: Not required if we aren't building the client
345a681 @zrax Use libcurl instead of WinHTTP for plClient's server status message
zrax authored
26 find_package(CURL REQUIRED)
49a0448 @dpogue Semi-hack to CMake to ignore DirectX on Linux.
dpogue authored
27
28 if(WIN32)
29 find_package(PhysX REQUIRED) #TODO: Not required if we aren't building the client
30 find_package(DirectX REQUIRED)
4cb2610 @Mystler Compile plFontConverter if Freetype available
Mystler authored
31 find_package(Freetype)
49a0448 @dpogue Semi-hack to CMake to ignore DirectX on Linux.
dpogue authored
32 endif(WIN32)
33
4e9d2ee @zrax Re-add the angle-brackets on the EFX include >.>
zrax authored
34 find_package(MaxSDK) #TODO: Only find this if we are building PlasmaMax
f8bc99d @branan Fix line endings and tabs
branan authored
35 find_package(Bink) #TODO: Find Bink, but don't require it if plPipeline isn't built...
36 # Or better yet, just eliminate bink altogether
37
345a681 @zrax Use libcurl instead of WinHTTP for plClient's server status message
zrax authored
38 # libCurl isn't smart enough to detect this for us, so we have to configure it ourselves
39 option(CURL_IS_STATIC "Using the static version of libcurl?" ON)
40 if(CURL_IS_STATIC)
41 add_definitions(-DCURL_STATICLIB)
42 endif(CURL_IS_STATIC)
f8bc99d @branan Fix line endings and tabs
branan authored
43
44 option(PLASMA_EXTERNAL_RELEASE "Is this release intended for the general public?" OFF)
45 if(PLASMA_EXTERNAL_RELEASE)
46 add_definitions(-DPLASMA_EXTERNAL_RELEASE)
47 endif(PLASMA_EXTERNAL_RELEASE)
48
49 set(PLASMA_TARGETS "Client"
50 CACHE STRING "Which set of plasma targets to build and use")
51 set_property(CACHE PLASMA_TARGETS PROPERTY STRINGS
52 "Client" "Server" "Patcher" "Ethereal" "NoAvMsgs")
53
6b0dbc9 @Hoikas Convert hsConfig defines to cmake -- fixes #93
Hoikas authored
54 if(PLASMA_TARGETS STREQUAL "Client")
55 add_definitions(-DCLIENT)
56 endif(PLASMA_TARGETS STREQUAL "Client")
57
f8bc99d @branan Fix line endings and tabs
branan authored
58 if(PLASMA_TARGETS STREQUAL "Patcher")
59 add_definitions(-DPATCHER)
60 endif(PLASMA_TARGETS STREQUAL "Patcher")
61
62 if(PLASMA_TARGETS STREQUAL "Server")
63 add_definitions(-DSERVER)
64 endif(PLASMA_TARGETS STREQUAL "Server")
65
66 if(PLASMA_TARGETS STREQUAL "NoAvMsgs")
67 add_definitions(-DNO_AV_MSGS)
68 endif(PLASMA_TARGETS STREQUAL "NoAvMsgs")
69
70 if(PLASMA_TARGETS STREQUAL "Ethereal")
71 add_definitions(-DSTREAM_LOGGER)
72 endif(PLASMA_TARGETS STREQUAL "Ethereal")
73
b8ed40d @zrax Adjust whitespace and case to match the other cmake files
zrax authored
74 include(TestBigEndian)
75 test_big_endian(BIG_ENDIAN)
76 if(BIG_ENDIAN)
77 add_definitions(-DBIG_ENDIAN)
78 else()
79 add_definitions(-DLITTLE_ENDIAN)
80 endif()
bb8fdb9 @philippelatulippe Use cmake's TestBigEndian to set BIG_ENDIAN or LITTLE_ENDIAN.
philippelatulippe authored
81
f8bc99d @branan Fix line endings and tabs
branan authored
82 if(MSVC)
83 add_definitions(-D_CRT_SECURE_NO_WARNINGS)
84 add_definitions(-D_SCL_SECURE_NO_WARNINGS)
85 endif(MSVC)
86
064a401 @zrax Use OpenSSL's bignum library
zrax authored
87 #TODO: Make the OpenSSL includes less promiscuous so this isn't needed
88 include_directories(${OPENSSL_INCLUDE_DIR})
89
f8bc99d @branan Fix line endings and tabs
branan authored
90 add_subdirectory(Sources/Plasma)
8231fea @Deledrius Add libPNG support stubs.
Deledrius authored
91 add_subdirectory(Sources/Tools)
Something went wrong with that request. Please try again.