diff options
| author | Damien George <damien@micropython.org> | 2024-03-08 22:43:52 +1100 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2024-03-16 12:19:12 +1100 |
| commit | cd8eea2ae99542257a33b29c9dfdc02b63fc1bd6 (patch) | |
| tree | ae413d9d6f48dc7589bb197879c465ecbf1ff075 /extmod/extmod.cmake | |
| parent | 305707b281bc64aacb154e0165bd0a9ca3fedfe8 (diff) | |
all: Update extmod, ports, examples to build with new berkeley-db lib.
This provides a MicroPython-specific berkeley-db configuration in
extmod/berkeley-db/berkeley_db_config_port.h, and cleans up the include
path for this library.
Fixes issue #13092.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'extmod/extmod.cmake')
| -rw-r--r-- | extmod/extmod.cmake | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/extmod/extmod.cmake b/extmod/extmod.cmake index 957580d15..60f1a23ad 100644 --- a/extmod/extmod.cmake +++ b/extmod/extmod.cmake @@ -132,27 +132,27 @@ if(MICROPY_PY_BTREE) ) target_include_directories(micropy_extmod_btree PRIVATE - ${MICROPY_LIB_BERKELEY_DIR}/PORT/include + ${MICROPY_LIB_BERKELEY_DIR}/include ) + if(NOT BERKELEY_DB_CONFIG_FILE) + set(BERKELEY_DB_CONFIG_FILE "${MICROPY_DIR}/extmod/berkeley-db/berkeley_db_config_port.h") + endif() + target_compile_definitions(micropy_extmod_btree PRIVATE - __DBINTERFACE_PRIVATE=1 - mpool_error=printf - abort=abort_ - "virt_fd_t=void*" + BERKELEY_DB_CONFIG_FILE="${BERKELEY_DB_CONFIG_FILE}" ) # The include directories and compile definitions below are needed to build # modbtree.c and should be added to the main MicroPython target. list(APPEND MICROPY_INC_CORE - "${MICROPY_LIB_BERKELEY_DIR}/PORT/include" + "${MICROPY_LIB_BERKELEY_DIR}/include" ) list(APPEND MICROPY_DEF_CORE MICROPY_PY_BTREE=1 - __DBINTERFACE_PRIVATE=1 - "virt_fd_t=void*" + BERKELEY_DB_CONFIG_FILE="${BERKELEY_DB_CONFIG_FILE}" ) list(APPEND MICROPY_SOURCE_EXTMOD |
