Skip to content

Instantly share code, notes, and snippets.

@daohoangson
Created March 29, 2014 02:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daohoangson/9847498 to your computer and use it in GitHub Desktop.
Save daohoangson/9847498 to your computer and use it in GitHub Desktop.
# Functions/Macros for use when building extensions statically
# These functions also exist in CMake/HPHPIZEFunctions.cmake
# Their signatures should be kept consistent, though their behavior
# will differ slightly.
function(HHVM_LINK_LIBRARIES EXTNAME)
list(REMOVE_AT ARGV 0)
foreach (lib ${ARGV})
list(APPEND HRE_LIBRARIES ${lib})
endforeach()
endfunction()
function(HHVM_ADD_INCLUDES EXTNAME)
list(REMOVE_AT ARGV 0)
include_directories(${ARGV})
endfunction()
function(HHVM_EXTENSION EXTNAME)
list(REMOVE_AT ARGV 0)
list(APPEND CXX_SOURCES "${HRE_CURRENT_EXT_PATH}/${ARGV}")
endfunction()
function(HHVM_SYSTEMLIB EXTNAME SOURCE_FILE)
# Ignore it, embed_all_systemlibs will pick this up
# TODO: Make this cleaner so that we don't embed systemlibs
# which aren't going to be used
endfunction()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment