summaryrefslogtreecommitdiff
path: root/extmod/extmod.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'extmod/extmod.cmake')
-rw-r--r--extmod/extmod.cmake16
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