mirror of
https://github.com/raspberrypi/pico-sdk.git
synced 2025-04-16 23:43:15 +00:00
Set default GATT path to CMAKE_CURRENT_LIST_DIR if not specified (#2385)
This ensures the GATT_PATH variable is set to the calling directory when just a filename is provided with no path Fixes #2366
This commit is contained in:
parent
c88bd53a68
commit
701c1933af
@ -308,6 +308,9 @@ if (EXISTS ${PICO_BTSTACK_PATH}/${BTSTACK_TEST_PATH})
|
||||
find_package (Python3 REQUIRED COMPONENTS Interpreter)
|
||||
get_filename_component(GATT_NAME "${GATT_FILE}" NAME_WE)
|
||||
get_filename_component(GATT_PATH "${GATT_FILE}" PATH)
|
||||
if (NOT GATT_PATH)
|
||||
set(GATT_PATH "${CMAKE_CURRENT_LIST_DIR}")
|
||||
endif()
|
||||
set(TARGET_GATT "${TARGET_LIB}_gatt_header")
|
||||
set(GATT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated/${TARGET_GATT}")
|
||||
set(GATT_HEADER "${GATT_BINARY_DIR}/${GATT_NAME}.h")
|
||||
|
Loading…
x
Reference in New Issue
Block a user