Updating submodules
[hiphop-php.git] / CMake / EXTFunctions.cmake
blobf7861804274d5721c30108e08ef80f4c703c53db
1 # Functions/Macros for use when building extensions statically
3 # These functions also exist in CMake/HPHPIZEFunctions.cmake
4 # Their signatures should be kept consistent, though their behavior
5 # will differ slightly.
7 macro(HHVM_LINK_LIBRARIES EXTNAME)
8   foreach (lib ${ARGN})
9     list(APPEND HRE_LIBRARIES ${lib})
10   endforeach()
11 endmacro()
13 function(HHVM_ADD_INCLUDES EXTNAME)
14   include_directories(${ARGN})
15 endfunction()
17 macro(HHVM_EXTENSION EXTNAME)
18   foreach (src ${ARGN})
19     list(APPEND CXX_SOURCES "${HRE_CURRENT_EXT_PATH}/${src}")
20   endforeach()
21 endmacro()
23 macro(HHVM_SYSTEMLIB EXTNAME)
24   foreach (slib ${ARGN})
25     list(APPEND PHP_SOURCES "${HRE_CURRENT_EXT_PATH}/${slib}")
26   endforeach()
27 endmacro()
29 function(HHVM_DEFINE EXTNAME)
30   add_definitions(${ARGN})
31 endfunction()