Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 159 lines (128 sloc) 4.423 kb
c9f9a6e @karolherbst added option to enable/disable c-ares support on unix
karolherbst authored
1 ###############################################################################
2 #
3 # you can pass some options to cmake via -D<option>[=<value>]
4 #
fe2bb3d @karolherbst put all options in a cmake module
karolherbst authored
5 # name default description
c9f9a6e @karolherbst added option to enable/disable c-ares support on unix
karolherbst authored
6 #
7 # global options:
0699952 @karolherbst prepare for #130
karolherbst authored
8 # OFFICIAL_BUILD OFF for official build only
6bc613a @karolherbst revert renaming desura to desurium in README
karolherbst authored
9 # BRANDING depends on ehich branding should be used?
10 # OFFICIAL_BUILD
0699952 @karolherbst prepare for #130
karolherbst authored
11 # DEBUG OFF will add debug symbols and other
12 # debugging stuff
93c22e5 @karolherbst BuildCEF see #107
karolherbst authored
13 # BUILD_CEF OFF build cef
c9f9a6e @karolherbst added option to enable/disable c-ares support on unix
karolherbst authored
14 #
15 # unix-only options:
0699952 @karolherbst prepare for #130
karolherbst authored
16 # DEBUG_EXTERNAL OFF same as DEBUG, but for externap deps
fe2bb3d @karolherbst put all options in a cmake module
karolherbst authored
17 # WITH_ARES ON build CURL with ares support (c-ares REQUIRED)
c9f9a6e @karolherbst added option to enable/disable c-ares support on unix
karolherbst authored
18 #
19 # windows-only options:
20 #
21 ###############################################################################
22
af143c0 @karolherbst move third_party to root
karolherbst authored
23 # TODO: silent output for externel dependencies
17e1c51 @Jookia Desurium -> Desura (outside of branding)
Jookia authored
24 # TODO: get libs automatically for externel builds, maybe make desura a external build itself?
af143c0 @karolherbst move third_party to root
karolherbst authored
25
17e1c51 @Jookia Desurium -> Desura (outside of branding)
Jookia authored
26 project(Desura)
448b4d9 @karolherbst moving to top directory
karolherbst authored
27 cmake_minimum_required(VERSION 2.8)
28
af143c0 @karolherbst move third_party to root
karolherbst authored
29 ###############################################################################
30 # some globale variables
31 ###############################################################################
32
214e573 @karolherbst build up good cmake environment step 1
karolherbst authored
33 set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
5aa406f @karolherbst improve cmake step 2
karolherbst authored
34 set(CMAKE_PLATFORM_PATH "${CMAKE_SOURCE_DIR}/cmake/platform")
b4ba665 @karolherbst no insource build for cURL
karolherbst authored
35 set(CMAKE_EXTERNAL_BINARY_DIR "${CMAKE_BINARY_DIR}/external")
af143c0 @karolherbst move third_party to root
karolherbst authored
36 set(CMAKE_THIRD_PARTY_DIR "${CMAKE_SOURCE_DIR}/third_party")
e7de4c9 @karolherbst v8: fix 32bit compile on 64bit windows
karolherbst authored
37 set(CMAKE_SCRIPT_PATH "${CMAKE_SOURCE_DIR}/cmake/scripts")
dbdcf11 fixes #158
karol authored
38 set(CMAKE_PATCH_DIR "${CMAKE_SOURCE_DIR}/cmake/patches")
448b4d9 @karolherbst moving to top directory
karolherbst authored
39
e6c6475 @karolherbst few improvements for UNIX build
karolherbst authored
40 if(DEBUG)
41 set(CMAKE_BUILD_TYPE Debug)
42 else()
43 set(CMAKE_BUILD_TYPE Release)
a84e66e @karolherbst added two cmake macros
karolherbst authored
44 endif()
45
af143c0 @karolherbst move third_party to root
karolherbst authored
46 ###############################################################################
47 # some includes
48 ###############################################################################
49
50 include(ExternalProject)
fe2bb3d @karolherbst put all options in a cmake module
karolherbst authored
51 include(CheckOptions)
2bac5d9 @karolherbst reimplement 32/64 bit checks
karolherbst authored
52 include(macros)
a84e66e @karolherbst added two cmake macros
karolherbst authored
53 include(parsearguments)
214e573 @karolherbst build up good cmake environment step 1
karolherbst authored
54 include(CheckCompiler)
cd836d3 @karolherbst create SetInstallPaths.cmake
karolherbst authored
55 include(SetInstallPaths)
5997d46 @karolherbst check cpu count in cef
karolherbst authored
56 include(ProcessorCount)
403fc8c @karolherbst install all the data files
karolherbst authored
57
af143c0 @karolherbst move third_party to root
karolherbst authored
58 ###############################################################################
59 # find all packages which are needed
60 ###############################################################################
61
62 if(NOT WIN32)
63 set(REQUIRED_ON_UNIX REQUIRED)
64 endif()
65
2f2fa72 @karolherbst boost: build on windows
karolherbst authored
66 if(NOT WIN32)
67 find_package(Boost COMPONENTS date_time filesystem thread system REQUIRED)
68 endif()
af143c0 @karolherbst move third_party to root
karolherbst authored
69 find_package(BZip2)
70
71 if(NOT WITH_ARES)
72 find_package(CURL)
73 endif()
74
75 # we patch google breakpad, so we will build it on our own
76 # find_package(GoogleBreakpad REQUIRED)
77 if(NOT WIN32)
78 find_package(GTK2 REQUIRED)
79 endif()
80 if(NOT WIN32)
81 find_package(OpenSSL REQUIRED)
82 endif()
83 find_package(Sqlite)
84 find_package(TinyXML)
85 find_package(v8 ${REQUIRED_ON_UNIX})
86 # we patch wxWidgets so we will build it on our own
87 # find_package(wxWidgets 2.9 REQUIRED)
88
93c22e5 @karolherbst BuildCEF see #107
karolherbst authored
89 if(WIN32 OR BUILD_CEF)
af143c0 @karolherbst move third_party to root
karolherbst authored
90 find_package(PythonInterp REQUIRED)
93c22e5 @karolherbst BuildCEF see #107
karolherbst authored
91 endif()
92
93 if(WIN32)
af143c0 @karolherbst move third_party to root
karolherbst authored
94 find_package(PythonLibs REQUIRED)
95 endif()
96
97 ###############################################################################
98 # build some externel projects
99 ###############################################################################
100
101 if(NOT wxWidgets_FOUND)
102 include(BuildwxWidgets)
103 endif()
104
2f2fa72 @karolherbst boost: build on windows
karolherbst authored
105 if(NOT Boost_FOUND)
106 include(BuildBoost)
107 endif()
108
af143c0 @karolherbst move third_party to root
karolherbst authored
109 if(NOT BREAKPAD_EXCEPTION_HANDLER_FOUND)
110 include(BuildGoogleBreakpad)
111 endif()
112
113 if(NOT CURL_FOUND)
114 include(BuildCURL)
115 endif()
116
117 if(NOT V8_FOUND)
118 include(Buildv8)
119 endif()
120
93c22e5 @karolherbst BuildCEF see #107
karolherbst authored
121 if(BUILD_CEF)
122 include(BuildCEF)
123 endif()
124
af143c0 @karolherbst move third_party to root
karolherbst authored
125
126 ###############################################################################
127 # build third_party
128 ###############################################################################
129
130 if(NOT BZIP2_FOUND)
131 add_subdirectory(third_party/bzip2)
132 endif()
133
134 add_subdirectory(third_party/cef) # for headers only, build via ExternalProject
135 add_subdirectory(third_party/courgette) # for headers only, build via ExternalProject
136
137 if(NOT TINYXML_FOUND)
138 add_subdirectory(third_party/tinyxml)
139 endif()
140
141 if(NOT SQLITE_FOUND)
142 add_subdirectory(third_party/sqlite)
143 endif()
144 add_subdirectory(third_party/sqlite3x)
145
2f2fa72 @karolherbst boost: build on windows
karolherbst authored
146 if(NOT Boost_FOUND)
147 add_dependencies(sqlite3x boost)
148 endif()
149
93c22e5 @karolherbst BuildCEF see #107
karolherbst authored
150 if(BUILD_CEF)
151 add_dependencies(cef wxWidget-2-9)
152 endif()
153
af143c0 @karolherbst move third_party to root
karolherbst authored
154 ###############################################################################
17e1c51 @Jookia Desurium -> Desura (outside of branding)
Jookia authored
155 # build desura
af143c0 @karolherbst move third_party to root
karolherbst authored
156 ###############################################################################
448b4d9 @karolherbst moving to top directory
karolherbst authored
157 add_subdirectory(src)
403fc8c @karolherbst install all the data files
karolherbst authored
158 add_subdirectory(build_out)
Something went wrong with that request. Please try again.