2 # +----------------------------------------------------------------------+
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 # +----------------------------------------------------------------------+
18 if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/facebook")
19 # I'm sorry, but facebook's internal repo has the top level dir stored inside
20 # of hphp/, so we need to pull that one in first if it exists
21 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7 FATAL_ERROR)
22 set(HPHP_HOME ${CMAKE_CURRENT_SOURCE_DIR}/..)
23 set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/facebook/CMake"
24 "${CMAKE_CURRENT_SOURCE_DIR}/public_tld/CMake"
33 FIND_PATH(LIBC_INCLUDE_PATH stdlib.h)
35 # Detect the architecture-specific include directory
36 IF("${CMAKE_LIBRARY_ARCHITECTURE}" STREQUAL "")
37 # For CentOS/Red Hat where they store it directly in /usr/include
38 SET(ARCH_INCLUDE_PATH "${LIBC_INCLUDE_PATH}/bits")
40 FIND_PATH(ARCH_INCLUDE_PATH ${CMAKE_LIBRARY_ARCHITECTURE})
41 SET(ARCH_INCLUDE_PATH "${ARCH_INCLUDE_PATH}/${CMAKE_LIBRARY_ARCHITECTURE}")
44 set_property(DIRECTORY
45 PROPERTY COTIRE_PREFIX_HEADER_IGNORE_PATH
46 "${LIBC_INCLUDE_PATH}/stdlib.h"
47 "${LIBC_INCLUDE_PATH}/string.h"
48 "${LIBC_INCLUDE_PATH}/ansidecl.h"
49 "${LIBC_INCLUDE_PATH}/bfd.h"
50 "${LIBC_INCLUDE_PATH}/libelf.h"
51 "${LIBC_INCLUDE_PATH}/elf.h"
52 "${LIBC_INCLUDE_PATH}/gelf.h"
53 "${ARCH_INCLUDE_PATH}"
54 "${CCLIENT_INCLUDE_PATH}"
55 "${JEMALLOC_INCLUDE_DIR}/jemalloc"
56 "${ONIGURUMA_INCLUDE_DIR}/onigposix.h"
57 "${ONIGURUMA_INCLUDE_DIR}/oniguruma.h"
58 "${LIBPNG_INCLUDE_DIRS}/png.h"
59 "${LDAP_INCLUDE_DIR}/ldap.h"
61 "${CMAKE_BINARY_DIR}")
64 add_definitions("-DHHVM")
65 add_definitions("-DUSE_CMAKE")
67 add_subdirectory(tools/bootstrap)
69 add_subdirectory(compiler)
70 add_subdirectory(hack)
71 add_subdirectory(hhbbc)
73 add_subdirectory(parser)
75 add_subdirectory(runtime)
76 add_subdirectory(runtime/ext)
77 add_subdirectory(runtime/ext_hhvm)
78 if (ENABLE_ZEND_COMPAT)
79 add_subdirectory(runtime/ext_zend_compat)
81 add_subdirectory(system)
82 add_subdirectory(util)
83 add_subdirectory(vixl)
84 add_subdirectory(zend)
86 add_subdirectory(hhvm)
88 option(TEST_BIN "Create the HHVM test binary" OFF)
90 add_subdirectory(test)
94 add_subdirectory(tools/hphpize)