1 set(CXX_SOURCES "systemlib.cpp")
3 add_library(hphp_system STATIC ${CXX_SOURCES})
4 if (ENABLE_ASYNC_MYSQL)
5 add_dependencies(hphp_system fbmysqlclient)
7 add_dependencies(hphp_system hphp_util)
9 auto_sources(files "*.h" "${CMAKE_CURRENT_SOURCE_DIR}")
10 HHVM_PUBLIC_HEADERS(system ${files})
12 add_dependencies(hphp_runtime_static hphp_system)
13 add_dependencies(hphp_runtime_ext hphp_system)
14 add_dependencies(hphp_analysis hphp_system)
16 FILE(STRINGS "php.txt" SYSTEMLIB_CLASSES)
18 set(SYSTEMLIB_SRCS_STR)
19 foreach(cls ${SYSTEMLIB_CLASSES})
20 STRING(REGEX REPLACE "[ \t]*#.*" "" cls "${cls}")
21 if (NOT "${cls}" STREQUAL "")
22 list(APPEND SYSTEMLIB_SRCS "../../${cls}")
23 set(SYSTEMLIB_SRCS_STR "${SYSTEMLIB_SRCS_STR} ${cls}")
28 OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/systemlib.php
29 DEPENDS "php.txt" ${SYSTEMLIB_SRCS}
30 COMMAND "INSTALL_DIR=${CMAKE_CURRENT_BINARY_DIR}"
31 "FBCODE_DIR=${CMAKE_CURRENT_SOURCE_DIR}/../.."
32 "${CMAKE_CURRENT_SOURCE_DIR}/make_systemlib.sh"
33 "--install_dir=${CMAKE_CURRENT_BINARY_DIR}"
34 "--fbcode_dir=${CMAKE_CURRENT_SOURCE_DIR}/.."
35 "${SYSTEMLIB_SRCS_STR}"
36 COMMENT "Generating systemlib.php")
40 DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/systemlib.php)