Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 434 lines (355 sloc) 12.779 kB
c3f1ab2 Changes reqiured to open source HipHop
Scott MacVicar authored
1 #
2 # +----------------------------------------------------------------------+
3 # | HipHop for PHP |
4 # +----------------------------------------------------------------------+
5 # | Copyright (c) 2010 Facebook, Inc. (http://www.facebook.com) |
6 # | Copyright (c) 1997-2010 The PHP Group |
7 # +----------------------------------------------------------------------+
8 # | This source file is subject to version 3.01 of the PHP license, |
9 # | that is bundled with this package in the file LICENSE, and is |
10 # | available through the world-wide-web at the following url: |
11 # | http://www.php.net/license/3_01.txt |
12 # | If you did not receive a copy of the PHP license and are unable to |
13 # | obtain it through the world-wide-web, please send a note to |
14 # | license@php.net so we can mail you a copy immediately. |
15 # +----------------------------------------------------------------------+
16 #
17
2814e26 @scottmac Improve C-Client building on external systems by detecting SSL and PA…
scottmac authored
18 include(CheckFunctionExists)
19
c3f1ab2 Changes reqiured to open source HipHop
Scott MacVicar authored
20 # boost checks
21
22 find_package(Boost 1.37.0 COMPONENTS system;program_options;filesystem REQUIRED)
857e604 @scottmac Check when we have Boost 1.42 and throw an error
scottmac authored
23 if (BOOST_VERSION EQUAL 104200)
24 # Boost bug #3942 prevents us using 1.42
25 message(FATAL_ERROR "Boost 1.42 is not compatible with HipHop")
26 endif()
27
c3f1ab2 Changes reqiured to open source HipHop
Scott MacVicar authored
28 include_directories(${Boost_INCLUDE_DIRS})
29 link_directories(${Boost_LIBRARY_DIRS})
30
7b3e14f @sgolemon Add check for inotify.h and (optional) libinotify.so
sgolemon authored
31 # inotify checks
32 find_package(Libinotify)
33 if (LIBINOTIFY_INCLUDE_DIR)
34 include_directories(${LIBINOTIFY_INCLUDE_DIR})
35 endif()
36
b7aa3cf @sgolemon Add CMake rule to find new dependency libunwind
sgolemon authored
37 # unwind checks
38 find_package(Libunwind REQUIRED)
39 include_directories(${LIBUNWIND_INCLUDE_DIR})
40
41 # iconv checks
3fff845 @sgolemon Use ICONV_CONST define in ext_iconv for second parameter casting
sgolemon authored
42 find_package(Libiconv REQUIRED)
43 include_directories(${LIBICONV_INCLUDE_DIR})
44 if (LIBICONV_CONST)
45 message(STATUS "Using const for input to iconv() call")
46 add_definitions("-DICONV_CONST=const")
47 endif()
48
c3f1ab2 Changes reqiured to open source HipHop
Scott MacVicar authored
49 # mysql checks
50 find_package(MySQL REQUIRED)
51 include_directories(${MYSQL_INCLUDE_DIR})
52 link_directories(${MYSQL_LIB_DIR})
9d3392f @scottmac Skip tcmalloc in debug builds and fix socket detection with MySQL
scottmac authored
53 MYSQL_SOCKET_SEARCH()
54 if (MYSQL_UNIX_SOCK_ADDR)
55 add_definitions(-DPHP_MYSQL_UNIX_SOCK_ADDR="${MYSQL_UNIX_SOCK_ADDR}")
56 endif()
c3f1ab2 Changes reqiured to open source HipHop
Scott MacVicar authored
57
e4f9ac3 @scottmac Add memcache library finding code, work towards the new extension
scottmac authored
58 # libmemcached checks
59 find_package(Libmemcached REQUIRED)
650183e @scottmac Make the libmemcached version detection better, make errors fatal so …
scottmac authored
60 if (LIBMEMCACHED_VERSION VERSION_LESS "0.39")
e3778d0 @scottmac Clean up CMake code, fixed a few bugs in libmemcached detection.
scottmac authored
61 unset(LIBMEMCACHED_INCLUDE_DIR CACHE)
f80554c @scottmac Unset memcache version cache variable in CMake too
scottmac authored
62 unset(LIBMEMCACHED_LIBRARY CACHE)
63 unset(LIBMEMCACHED_VERSION CACHE)
650183e @scottmac Make the libmemcached version detection better, make errors fatal so …
scottmac authored
64 message(FATAL_ERROR "libmemcache is too old, found ${LIBMEMCACHED_VERSION} and we need 0.39")
65 endif ()
3bde108 @scottmac Fix include directory path
scottmac authored
66 include_directories(${LIBMEMCACHED_INCLUDE_DIR})
e4f9ac3 @scottmac Add memcache library finding code, work towards the new extension
scottmac authored
67
c3f1ab2 Changes reqiured to open source HipHop
Scott MacVicar authored
68 # pcre checks
69 find_package(PCRE REQUIRED)
e4f9ac3 @scottmac Add memcache library finding code, work towards the new extension
scottmac authored
70 include_directories(${PCRE_INCLUDE_DIRS})
c3f1ab2 Changes reqiured to open source HipHop
Scott MacVicar authored
71
72 # libevent checks
73 find_package(LibEvent REQUIRED)
74 include_directories(${LIBEVENT_INCLUDE_DIR})
75
76 set(CMAKE_REQUIRED_LIBRARIES "${LIBEVENT_LIB}")
77 CHECK_FUNCTION_EXISTS("evhttp_bind_socket_with_fd" HAVE_CUSTOM_LIBEVENT)
78 if (NOT HAVE_CUSTOM_LIBEVENT)
3614784 @scottmac Stop caching variables when we find its not the library we're looking…
scottmac authored
79 unset(HAVE_CUSTOM_LIBEVENT CACHE)
80 unset(LIBEVENT_INCLUDE_DIR CACHE)
81 unset(LIBEVENT_LIB CACHE)
82 unset(LibEvent_FOUND CACHE)
e3778d0 @scottmac Clean up CMake code, fixed a few bugs in libmemcached detection.
scottmac authored
83 message(FATAL_ERROR "Custom libevent is required with HipHop patches")
c3f1ab2 Changes reqiured to open source HipHop
Scott MacVicar authored
84 endif ()
85 set(CMAKE_REQUIRED_LIBRARIES)
86
87 # GD checks
88 find_package(GD REQUIRED)
89
90 if (WANT_FB_LIBMCC)
91 add_definitions(-DHPHP_WITH_LIBMCC)
92 message(FATAL_ERROR Need to add libmcc and libch for linking)
93 else ()
94 # nothing for now
95 endif()
96
97 # CURL checks
98 find_package(CURL REQUIRED)
99 include_directories(${CURL_INCLUDE_DIR})
100
101 set(CMAKE_REQUIRED_LIBRARIES "${CURL_LIBRARIES}")
f62a1b2 @joelpob Use libcurl 7.28.0's curl_multi_wait() or fallback when curl_multi_se…
joelpob authored
102 CHECK_FUNCTION_EXISTS("curl_multi_select" HAVE_CURL_MULTI_SELECT)
103 CHECK_FUNCTION_EXISTS("curl_multi_wait" HAVE_CURL_MULTI_WAIT)
104 if (HAVE_CURL_MULTI_SELECT)
105 add_definitions("-DHAVE_CURL_MULTI_SELECT")
106 endif()
107 if (HAVE_CURL_MULTI_WAIT)
108 add_definitions("-DHAVE_CURL_MULTI_WAIT")
109 endif()
c3f1ab2 Changes reqiured to open source HipHop
Scott MacVicar authored
110 set(CMAKE_REQUIRED_LIBRARIES)
111
112 # LibXML2 checks
113 find_package(LibXml2 REQUIRED)
114 include_directories(${LIBXML2_INCLUDE_DIR})
115 add_definitions(${LIBXML2_DEFINITIONS})
116
6d729a6 @scottmac Add expat dependency
scottmac authored
117 find_package(EXPAT REQUIRED)
118 include_directories(${EXPAT_INCLUDE_DIRS})
119
c3f1ab2 Changes reqiured to open source HipHop
Scott MacVicar authored
120 # SQLite3 + timelib are bundled in HPHP sources
121 include_directories("${HPHP_HOME}/src/third_party/libsqlite3")
122 include_directories("${HPHP_HOME}/src/third_party/timelib")
123 include_directories("${HPHP_HOME}/src/third_party/libafdt/src")
c1b6dbc @scottmac Fix CMake files to detect tbb in the standard place and to put mbfl i…
scottmac authored
124 include_directories("${HPHP_HOME}/src/third_party/libmbfl")
125 include_directories("${HPHP_HOME}/src/third_party/libmbfl/mbfl")
126 include_directories("${HPHP_HOME}/src/third_party/libmbfl/filter")
c3f1ab2 Changes reqiured to open source HipHop
Scott MacVicar authored
127
d160caa @scottmac Make XHP an external library, useful for using clang and coverity whi…
scottmac authored
128 FIND_LIBRARY(XHP_LIB xhp)
129 FIND_PATH(XHP_INCLUDE_DIR xhp_preprocess.hpp)
130
131 if (XHP_LIB AND XHP_INCLUDE_DIR)
132 include_directories(${XHP_INCLUDE_DIR})
133 set(SKIP_BUNDLED_XHP ON)
134 else()
135 include_directories("${HPHP_HOME}/src/third_party/xhp/xhp")
136 endif()
137
c3f1ab2 Changes reqiured to open source HipHop
Scott MacVicar authored
138 # ICU
139 find_package(ICU REQUIRED)
140 if (ICU_FOUND)
141 if (ICU_VERSION VERSION_LESS "4.2")
3614784 @scottmac Stop caching variables when we find its not the library we're looking…
scottmac authored
142 unset(ICU_FOUND CACHE)
143 unset(ICU_INCLUDE_DIRS CACHE)
144 unset(ICU_LIBRARIES CACHE)
e3778d0 @scottmac Clean up CMake code, fixed a few bugs in libmemcached detection.
scottmac authored
145 message(FATAL_ERROR "ICU is too old, found ${ICU_VERSION} and we need 4.2")
146 endif ()
c3f1ab2 Changes reqiured to open source HipHop
Scott MacVicar authored
147 include_directories(${ICU_INCLUDE_DIRS})
148 endif (ICU_FOUND)
149
150 # (google heap OR cpu profiler) AND libunwind
b2228f4 @scottmac Find Onigruma propery and tidy up a little of the other library detec…
scottmac authored
151 FIND_LIBRARY(UNWIND_LIB unwind)
c3f1ab2 Changes reqiured to open source HipHop
Scott MacVicar authored
152
add89e4 @lcastelli Add detection of jemalloc in cmake
lcastelli authored
153 # jemalloc/tmalloc and profiler
352fb3b @lcastelli Add cmake options to enable the heap/cpu profilers
lcastelli authored
154 if (USE_GOOGLE_HEAP_PROFILER OR USE_GOOGLE_CPU_PROFILER)
155 FIND_LIBRARY(GOOGLE_PROFILER_LIB profiler)
156 if (GOOGLE_PROFILER_LIB)
157 message(STATUS "Found Google profiler: ${GOOGLE_PROFILER_LIB}")
158 if (USE_GOOGLE_CPU_PROFILER)
159 set(GOOGLE_CPU_PROFILER_ENABLED 1)
160 endif()
161 else()
162 message(STATUS "Can't find Google profiler")
163 endif()
164 endif()
165
166 if (USE_GOOGLE_HEAP_PROFILER AND GOOGLE_PROFILER_LIB)
167 FIND_LIBRARY(GOOGLE_TCMALLOC_FULL_LIB tcmalloc)
168 if (GOOGLE_TCMALLOC_FULL_LIB)
169 message(STATUS "Found full tcmalloc: ${GOOGLE_TCMALLOC_FULL_LIB}")
170 set(GOOGLE_HEAP_PROFILER_ENABLED 1)
171 set(GOOGLE_TCMALLOC_ENABLED 1)
172 else()
173 message(STATUS "Can't find full tcmalloc - heap profiling is disabled")
174 endif()
175 endif()
098f3ff Enable optional tcmalloc support
Scott MacVicar authored
176
add89e4 @lcastelli Add detection of jemalloc in cmake
lcastelli authored
177 if (USE_JEMALLOC AND NOT GOOGLE_TCMALLOC_ENABLED
178 AND NOT CMAKE_BUILD_TYPE STREQUAL Debug)
179 FIND_LIBRARY(JEMALLOC_LIB jemalloc)
180 if (JEMALLOC_LIB)
b4a54e9 @joelpob Fix to cmake scripts
joelpob authored
181 message(STATUS "Found jemalloc: ${JEMALLOC_LIB}")
182 set(JEMALLOC_ENABLED 1)
add89e4 @lcastelli Add detection of jemalloc in cmake
lcastelli authored
183 endif()
184 endif()
185
186 if (USE_TCMALLOC AND NOT JEMALLOC_ENABLED AND NOT GOOGLE_TCMALLOC_ENABLED
187 AND NOT CMAKE_BUILD_TYPE STREQUAL Debug)
352fb3b @lcastelli Add cmake options to enable the heap/cpu profilers
lcastelli authored
188 FIND_LIBRARY(GOOGLE_TCMALLOC_MIN_LIB tcmalloc_minimal)
189 if (GOOGLE_TCMALLOC_MIN_LIB)
190 message(STATUS "Found minimal tcmalloc: ${GOOGLE_TCMALLOC_MIN_LIB}")
191 set(GOOGLE_TCMALLOC_ENABLED 1)
098f3ff Enable optional tcmalloc support
Scott MacVicar authored
192 else()
352fb3b @lcastelli Add cmake options to enable the heap/cpu profilers
lcastelli authored
193 message(STATUS "Can't find minimal tcmalloc")
098f3ff Enable optional tcmalloc support
Scott MacVicar authored
194 endif()
195 endif()
c3f1ab2 Changes reqiured to open source HipHop
Scott MacVicar authored
196
add89e4 @lcastelli Add detection of jemalloc in cmake
lcastelli authored
197 if (JEMALLOC_ENABLED)
198 add_definitions(-DUSE_JEMALLOC=1)
199 else()
200 add_definitions(-DNO_JEMALLOC=1)
201 endif()
352fb3b @lcastelli Add cmake options to enable the heap/cpu profilers
lcastelli authored
202 if (GOOGLE_TCMALLOC_ENABLED)
203 add_definitions(-DGOOGLE_TCMALLOC=1)
204 else()
205 add_definitions(-DNO_TCMALLOC=1)
206 endif()
207 if (GOOGLE_HEAP_PROFILER_ENABLED)
208 add_definitions(-DGOOGLE_HEAP_PROFILER=1)
209 endif()
210 if (GOOGLE_CPU_PROFILER_ENABLED)
211 add_definitions(-DGOOGLE_CPU_PROFILER=1)
212 endif()
213
c3f1ab2 Changes reqiured to open source HipHop
Scott MacVicar authored
214 # tbb libs
215 find_package(TBB REQUIRED)
994d166 @sgolemon Bump libtbb version requirement to 3.0 (Interface 5005) minimum
sgolemon authored
216 if (${TBB_INTERFACE_VERSION} LESS 5005)
d3b1145 @scottmac Check TBB interface version, 2.1 within Ubuntu is fine but not 2.1 wi…
scottmac authored
217 unset(TBB_FOUND CACHE)
218 unset(TBB_INCLUDE_DIRS CACHE)
219 unset(TBB_LIBRARIES CACHE)
994d166 @sgolemon Bump libtbb version requirement to 3.0 (Interface 5005) minimum
sgolemon authored
220 message(FATAL_ERROR "TBB is too old, please install at least 3.0(5005), preferably 4.0(6000) or higher")
d3b1145 @scottmac Check TBB interface version, 2.1 within Ubuntu is fine but not 2.1 wi…
scottmac authored
221 endif()
c3f1ab2 Changes reqiured to open source HipHop
Scott MacVicar authored
222 include_directories(${TBB_INCLUDE_DIRS})
223 link_directories(${TBB_LIBRARY_DIRS})
224
225 # mcrypt libs
226 find_package(Mcrypt REQUIRED)
227 include_directories(${Mcrypt_INCLUDE_DIR})
228
229 # OpenSSL libs
230 find_package(OpenSSL REQUIRED)
231 include_directories(${OPENSSL_INCLUDE_DIR})
232
233 # ZLIB
234 find_package(ZLIB REQUIRED)
235 include_directories(${ZLIB_INCLUDE_DIR})
236
d940a23 @scottmac Add bzip2 library definitions to CMake
scottmac authored
237 find_package(BZip2 REQUIRED)
238 include_directories(${BZIP2_INCLUDE_DIR})
239 add_definitions(${BZIP2_DEFINITIONS})
240
b3ae589 Added Ldap support to CMake, this was missed for some reason
Scott MacVicar authored
241 # oniguruma
b2228f4 @scottmac Find Onigruma propery and tidy up a little of the other library detec…
scottmac authored
242 find_package(ONIGURUMA REQUIRED)
243 include_directories(${ONIGURUMA_INCLUDE_DIRS})
c3f1ab2 Changes reqiured to open source HipHop
Scott MacVicar authored
244
b3ae589 Added Ldap support to CMake, this was missed for some reason
Scott MacVicar authored
245 # LDAP
246 find_package(Ldap REQUIRED)
247 include_directories(${LDAP_INCLUDE_DIR})
248
3ac2055 @scottmac Add imap support, requires cclient
scottmac authored
249 # ncurses, readline and history
4a8a504 @scottmac Fix up cmake for working on FreeBSD and OSX
scottmac authored
250 #set(CURSES_NEED_NCURSES true)
251 find_package(Ncurses REQUIRED)
252 include_directories(${NCURSES_INCLUDE_PATH})
f939558 @scottmac Add readline code so debugger works
scottmac authored
253
254 find_package(Readline REQUIRED)
255 include_directories(${READLINE_INCLUDE_DIR})
256
3ac2055 @scottmac Add imap support, requires cclient
scottmac authored
257 find_package(CClient REQUIRED)
258 include_directories(${CCLIENT_INCLUDE_PATH})
f939558 @scottmac Add readline code so debugger works
scottmac authored
259
3b48173 @scottmac Initial VM branch -code
scottmac authored
260 find_package(LibDwarf REQUIRED)
261 include_directories(${LIBDWARF_INCLUDE_DIRS})
262
263 find_package(LibElf REQUIRED)
264 include_directories(${LIBELF_INCLUDE_DIRS})
265
f679243 @scottmac Add a version check for c-client to catch the old 2004 stuff
scottmac authored
266 CONTAINS_STRING("${CCLIENT_INCLUDE_PATH}/utf8.h" U8T_DECOMPOSE RECENT_CCLIENT)
267 if (NOT RECENT_CCLIENT)
268 unset(RECENT_CCLIENT CACHE)
269 message(FATAL_ERROR "Your version of c-client is too old, you need 2007")
270 endif()
271
90903da @scottmac Fix cclient code when static library is used
scottmac authored
272 CONTAINS_STRING("${CCLIENT_INCLUDE_PATH}/linkage.h" auth_gss CCLIENT_NEEDS_PAM)
153e534 @scottmac Check linkage.c exists before reading from it. Some platforms such as…
scottmac authored
273
274 if (EXISTS "${CCLIENT_INCLUDE_PATH}/linkage.c")
275 CONTAINS_STRING("${CCLIENT_INCLUDE_PATH}/linkage.c" ssl_onceonlyinit CCLIENT_HAS_SSL)
276 endif()
2814e26 @scottmac Improve C-Client building on external systems by detecting SSL and PA…
scottmac authored
277
278 if (CCLIENT_NEEDS_PAM)
279 find_package(Libpam REQUIRED)
280 include_directories(${PAM_INCLUDE_PATH})
281 else()
282 add_definitions(-DSKIP_IMAP_GSS=1)
283 endif()
284
285 if (NOT CCLIENT_HAS_SSL)
286 add_definitions(-DSKIP_IMAP_SSL=1)
287 endif()
288
4a8a504 @scottmac Fix up cmake for working on FreeBSD and OSX
scottmac authored
289 if (LINUX OR FREEBSD)
0236071 @lcastelli Add support for libxcrypt
lcastelli authored
290 FIND_LIBRARY (CRYPT_LIB NAMES xcrypt crypt)
4a8a504 @scottmac Fix up cmake for working on FreeBSD and OSX
scottmac authored
291 FIND_LIBRARY (RT_LIB rt)
292 elseif (APPLE)
293 FIND_LIBRARY (CRYPT_LIB crypto)
294 FIND_LIBRARY (ICONV_LIB iconv)
295 endif()
7d0a5ce @scottmac Add missing libraries that were causing building with the Google link…
scottmac authored
296
4a8a504 @scottmac Fix up cmake for working on FreeBSD and OSX
scottmac authored
297 if (LINUX)
298 FIND_LIBRARY (CAP_LIB cap)
c3f1ab2 Changes reqiured to open source HipHop
Scott MacVicar authored
299
4a8a504 @scottmac Fix up cmake for working on FreeBSD and OSX
scottmac authored
300 if (NOT CAP_LIB)
301 message(FATAL_ERROR "You need to install libcap")
302 endif()
303 endif()
c3f1ab2 Changes reqiured to open source HipHop
Scott MacVicar authored
304
4a8a504 @scottmac Fix up cmake for working on FreeBSD and OSX
scottmac authored
305 if (LINUX OR APPLE)
306 FIND_LIBRARY (DL_LIB dl)
307 FIND_LIBRARY (RESOLV_LIB resolv)
b5847ad @scottmac Clarify submodules in the git readme and improve standard lib finding
scottmac authored
308 endif()
309
c3f1ab2 Changes reqiured to open source HipHop
Scott MacVicar authored
310 FIND_LIBRARY (BFD_LIB bfd)
311 FIND_LIBRARY (BINUTIL_LIB iberty)
312
e4f9ac3 @scottmac Add memcache library finding code, work towards the new extension
scottmac authored
313 if (NOT BFD_LIB)
e7ce9d5 @scottmac Move flex and bison package finding to the main root and check the ve…
scottmac authored
314 message(FATAL_ERROR "You need to install binutils")
b5847ad @scottmac Clarify submodules in the git readme and improve standard lib finding
scottmac authored
315 endif()
316
e4f9ac3 @scottmac Add memcache library finding code, work towards the new extension
scottmac authored
317 if (NOT BINUTIL_LIB)
e7ce9d5 @scottmac Move flex and bison package finding to the main root and check the ve…
scottmac authored
318 message(FATAL_ERROR "You need to install binutils")
b5847ad @scottmac Clarify submodules in the git readme and improve standard lib finding
scottmac authored
319 endif()
320
4a8a504 @scottmac Fix up cmake for working on FreeBSD and OSX
scottmac authored
321 if (FREEBSD)
322 FIND_LIBRARY (EXECINFO_LIB execinfo)
3de465e @sgolemon Display useful error message when libexecinfo not found on FBSD
sgolemon authored
323 if (NOT EXECINFO_LIB)
324 message(FATAL_ERROR "You need to install libexecinfo")
325 endif()
4a8a504 @scottmac Fix up cmake for working on FreeBSD and OSX
scottmac authored
326 endif()
327
f77f380 Rename folders before update, this probably won't work :)
Scott MacVicar authored
328 #find_package(BISON REQUIRED)
329 #find_package(FLEX REQUIRED)
e7ce9d5 @scottmac Move flex and bison package finding to the main root and check the ve…
scottmac authored
330
f77f380 Rename folders before update, this probably won't work :)
Scott MacVicar authored
331 #if (${FLEX_VERSION} VERSION_LESS 2.5.33)
332 # message(FATAL_ERROR "Flex is too old, found ${FLEX_VERSION} and we need 2.5.33")
333 #endif()
c3f1ab2 Changes reqiured to open source HipHop
Scott MacVicar authored
334
335 include_directories(${HPHP_HOME}/src)
f77f380 Rename folders before update, this probably won't work :)
Scott MacVicar authored
336 include_directories(${HPHP_HOME}/src/system/gen)
c3f1ab2 Changes reqiured to open source HipHop
Scott MacVicar authored
337
338 macro(hphp_link target)
8068747 @lcastelli Move linking with jemalloc (and tcmalloc) first in the list
lcastelli authored
339 if (GOOGLE_HEAP_PROFILER_ENABLED OR GOOGLE_CPU_PROFILER_ENABLED)
340 target_link_libraries(${target} ${GOOGLE_PROFILER_LIB})
341 endif()
342
343 if (JEMALLOC_ENABLED)
344 target_link_libraries(${target} ${JEMALLOC_LIB})
345 endif()
346
347 if (GOOGLE_HEAP_PROFILER_ENABLED)
348 target_link_libraries(${target} ${GOOGLE_TCMALLOC_FULL_LIB})
349 elseif (GOOGLE_TCMALLOC_ENABLED)
350 target_link_libraries(${target} ${GOOGLE_TCMALLOC_MIN_LIB})
351 endif()
352
c3f1ab2 Changes reqiured to open source HipHop
Scott MacVicar authored
353 target_link_libraries(${target} ${Boost_LIBRARIES})
29ce7fa @sgolemon Explicitly link libiconv and libunwind
sgolemon authored
354 target_link_libraries(${target} ${LIBUNWIND_LIBRARY})
c3f1ab2 Changes reqiured to open source HipHop
Scott MacVicar authored
355 target_link_libraries(${target} ${MYSQL_CLIENT_LIBS})
356 target_link_libraries(${target} ${PCRE_LIBRARY})
357 target_link_libraries(${target} ${ICU_LIBRARIES} ${ICU_I18N_LIBRARIES})
358 target_link_libraries(${target} ${LIBEVENT_LIB})
359 target_link_libraries(${target} ${CURL_LIBRARIES})
360
7b3e14f @sgolemon Add check for inotify.h and (optional) libinotify.so
sgolemon authored
361 if (LIBINOTIFY_LIBRARY)
362 target_link_libraries(${target} ${LIBINOTIFY_LIBRARY})
363 endif()
364
29ce7fa @sgolemon Explicitly link libiconv and libunwind
sgolemon authored
365 if (LIBICONV_LIBRARY)
366 target_link_libraries(${target} ${LIBICONV_LIBRARY})
367 endif()
368
369
4a8a504 @scottmac Fix up cmake for working on FreeBSD and OSX
scottmac authored
370 if (LINUX)
c3f1ab2 Changes reqiured to open source HipHop
Scott MacVicar authored
371 target_link_libraries(${target} ${CAP_LIB})
4a8a504 @scottmac Fix up cmake for working on FreeBSD and OSX
scottmac authored
372 endif()
373
374 if (LINUX OR APPLE)
375 target_link_libraries(${target} ${RESOLV_LIB})
376 target_link_libraries(${target} ${DL_LIB})
377 endif()
378
379 if (FREEBSD)
380 target_link_libraries(${target} ${EXECINFO_LIB})
381 endif()
382
c3f1ab2 Changes reqiured to open source HipHop
Scott MacVicar authored
383 target_link_libraries(${target} ${BFD_LIB})
384 target_link_libraries(${target} ${BINUTIL_LIB})
385 target_link_libraries(${target} pthread)
386 target_link_libraries(${target} ${TBB_LIBRARIES})
387 target_link_libraries(${target} ${OPENSSL_LIBRARIES})
388 target_link_libraries(${target} ${ZLIB_LIBRARIES})
d940a23 @scottmac Add bzip2 library definitions to CMake
scottmac authored
389 target_link_libraries(${target} ${BZIP2_LIBRARIES})
c3f1ab2 Changes reqiured to open source HipHop
Scott MacVicar authored
390
b2228f4 @scottmac Find Onigruma propery and tidy up a little of the other library detec…
scottmac authored
391 target_link_libraries(${target} ${LIBXML2_LIBRARIES})
392 target_link_libraries(${target} ${EXPAT_LIBRARY})
393 target_link_libraries(${target} ${ONIGURUMA_LIBRARIES})
394 target_link_libraries(${target} ${Mcrypt_LIB})
395 target_link_libraries(${target} ${GD_LIBRARY})
b3ae589 Added Ldap support to CMake, this was missed for some reason
Scott MacVicar authored
396
397 target_link_libraries(${target} ${LDAP_LIBRARIES})
398 target_link_libraries(${target} ${LBER_LIBRARIES})
399
e3778d0 @scottmac Clean up CMake code, fixed a few bugs in libmemcached detection.
scottmac authored
400 target_link_libraries(${target} ${LIBMEMCACHED_LIBRARY})
e4f9ac3 @scottmac Add memcache library finding code, work towards the new extension
scottmac authored
401
4a8a504 @scottmac Fix up cmake for working on FreeBSD and OSX
scottmac authored
402 if (LINUX OR FREEBSD)
403 target_link_libraries(${target} ${CRYPT_LIB})
404 target_link_libraries(${target} ${RT_LIB})
405 elseif (APPLE)
406 target_link_libraries(${target} ${CRYPTO_LIB})
e3778d0 @scottmac Clean up CMake code, fixed a few bugs in libmemcached detection.
scottmac authored
407 target_link_libraries(${target} ${ICONV_LIB})
4a8a504 @scottmac Fix up cmake for working on FreeBSD and OSX
scottmac authored
408 endif()
7d0a5ce @scottmac Add missing libraries that were causing building with the Google link…
scottmac authored
409
c3f1ab2 Changes reqiured to open source HipHop
Scott MacVicar authored
410 target_link_libraries(${target} timelib)
411 target_link_libraries(${target} sqlite3)
d160caa @scottmac Make XHP an external library, useful for using clang and coverity whi…
scottmac authored
412
413 if (SKIP_BUNDLED_XHP)
414 target_link_libraries(${target} ${XHP_LIB})
415 else()
416 target_link_libraries(${target} xhp)
417 endif()
418
c3f1ab2 Changes reqiured to open source HipHop
Scott MacVicar authored
419 target_link_libraries(${target} afdt)
420 target_link_libraries(${target} mbfl)
f939558 @scottmac Add readline code so debugger works
scottmac authored
421
422 target_link_libraries(${target} ${READLINE_LIBRARY})
4a8a504 @scottmac Fix up cmake for working on FreeBSD and OSX
scottmac authored
423 target_link_libraries(${target} ${NCURSES_LIBRARY})
3ac2055 @scottmac Add imap support, requires cclient
scottmac authored
424 target_link_libraries(${target} ${CCLIENT_LIBRARY})
2814e26 @scottmac Improve C-Client building on external systems by detecting SSL and PA…
scottmac authored
425
426 if (CCLIENT_NEEDS_PAM)
427 target_link_libraries(${target} ${PAM_LIBRARY})
428 endif()
429
3b48173 @scottmac Initial VM branch -code
scottmac authored
430 target_link_libraries(${target} ${LIBDWARF_LIBRARIES})
431 target_link_libraries(${target} ${LIBELF_LIBRARIES})
432
c3f1ab2 Changes reqiured to open source HipHop
Scott MacVicar authored
433 endmacro()
Something went wrong with that request. Please try again.