diff options
author | Volker Schroer <3470424+dl1ksv@users.noreply.github.com> | 2020-10-22 14:51:45 +0200 |
---|---|---|
committer | mormj <34754695+mormj@users.noreply.github.com> | 2020-10-28 13:45:58 -0400 |
commit | 30aa9bf5dc0a1032356a655830815fc541810d23 (patch) | |
tree | 42f8fb4852a45d6c66457aad402255c8086b6053 /cmake | |
parent | 85dd61cbd2eede24a91039dd50f97670d5f3bac7 (diff) |
Make additional includes and defines available in the bind process
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/Modules/GrPybind.cmake | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cmake/Modules/GrPybind.cmake b/cmake/Modules/GrPybind.cmake index 91aeac5a16..e782d69861 100644 --- a/cmake/Modules/GrPybind.cmake +++ b/cmake/Modules/GrPybind.cmake @@ -209,7 +209,9 @@ foreach(file ${files}) message(STATUS "Regenerating Bindings in-place for " ${header_filename}) file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/${file}.regen_status) - # Automatically regenerate the bindings + # Automatically regenerate the bindings + string(REPLACE ";" "," extra_include_list "${extra_includes}") #Convert ';' separated extra_includes to ',' separated list format + string(REPLACE ";" "," defines "${define_symbols}") #Convert ';' separated define_symbols to ',' separated list format add_custom_command( OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}}/${file} COMMAND "${PYTHON_EXECUTABLE}" @@ -222,7 +224,8 @@ foreach(file ${files}) "--status" ${CMAKE_CURRENT_BINARY_DIR}/${file}.regen_status "--flag_automatic" ${flag_auto} "--flag_pygccxml" ${flag_pygccxml} - # "--include" "$<INSTALL_INTERFACE:include>" #FIXME: Make the pygccxml generation use the source tree headers + "--defines" ${defines} #Add preprocessor defines + "--include" ${extra_include_list} #Some oots may require additional includes COMMENT "Automatic generation of pybind11 bindings for " ${header_full_path}) add_custom_target(${file}_regen_bindings ALL DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}}/${file}) list(APPEND regen_targets ${file}_regen_bindings) |