From dfbb15c868ee797606d77c2ba51f1be60479093e Mon Sep 17 00:00:00 2001 From: Anders Langlands Date: Fri, 15 Dec 2023 21:11:00 +1100 Subject: [PATCH] add COMPILE_ARGS option to bbl_generate_binding --- bbl/cmake/babble-functions.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bbl/cmake/babble-functions.cmake b/bbl/cmake/babble-functions.cmake index 88149fb..5c03db9 100644 --- a/bbl/cmake/babble-functions.cmake +++ b/bbl/cmake/babble-functions.cmake @@ -83,7 +83,11 @@ function(BBL_GENERATE_BINDING PROJECT_NAME GENFILE NAMESPACE) set(OUTPUT_PROJECT_PATH ${CMAKE_BINARY_DIR}/${PROJECT_NAME}) set(OUTPUT_DUMMY ${OUTPUT_PROJECT_PATH}/bbl-dummy-cpp) - add_library(${TARGET_NAME} STATIC ${GENFILE} ${OUTPUT_DUMMY}) + set(list_args COMPILE_ARGS) + cmake_parse_arguments(arg "${flags}" "${args}" "${list_args}" ${ARGN}) + + + add_library(${TARGET_NAME} SHARED ${GENFILE} ${OUTPUT_DUMMY}) target_include_directories(${TARGET_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) set(genfile_path ${CMAKE_CURRENT_SOURCE_DIR}/${GENFILE}) @@ -103,6 +107,7 @@ function(BBL_GENERATE_BINDING PROJECT_NAME GENFILE NAMESPACE) "-I$,;-I>" "$,;>" "$,;>" + ${arg_COMPILE_ARGS} -- ${PROJECT_NAME} ${OUTPUT_PROJECT_PATH}