set(SQLITE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR})
set(SQLITE_LIBRARIES sqlite3)

add_library(${SQLITE_LIBRARIES}
    sqlite3.h
    sqlite3.c)

target_include_directories(${SQLITE_LIBRARIES} PRIVATE
    ${SQLITE_INCLUDE_DIRS})

target_link_libraries(${SQLITE_LIBRARIES}
    ${CMAKE_DL_LIBS})

set(SQLITE_FOUND TRUE PARENT_SCOPE)
set(SQLITE_INCLUDE_DIRS ${SQLITE_INCLUDE_DIRS} PARENT_SCOPE)
set(SQLITE_LIBRARIES ${SQLITE_LIBRARIES} PARENT_SCOPE)

set(SQLITE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR})
set(SQLITE_LIBRARIES sqlite3)

add_library(${SQLITE_LIBRARIES} STATIC
    sqlite3.h
    sqlite3.c)

target_include_directories(${SQLITE_LIBRARIES} PRIVATE
    ${SQLITE_INCLUDE_DIRS})

target_link_libraries(${SQLITE_LIBRARIES}
    ${CMAKE_DL_LIBS})

set(SQLITE_FOUND TRUE PARENT_SCOPE)
set(SQLITE_INCLUDE_DIRS ${SQLITE_INCLUDE_DIRS} PARENT_SCOPE)
set(SQLITE_LIBRARIES ${SQLITE_LIBRARIES} PARENT_SCOPE)

Build sqlite into PriorityBuffer statically
Build sqlite into PriorityBuffer statically
