# CMakeList.txt : CMake project for dlang.plugin.sdk, include source and define
# project specific logic here.
#

# Add source to this project's executable.
include_directories(dlang/)
add_library (dlang.sqlite SHARED
	"entry.cpp"
  "dlang/src/compiler.cpp"
  "dlang/src/lexer.cpp"
  "dlang/src/parser.cpp"
  "dlang/src/vm.cpp"
)

if (CMAKE_VERSION VERSION_GREATER 3.12)
  set_property(TARGET dlang.sqlite PROPERTY CXX_STANDARD 20)
endif()

include(FetchContent)

FetchContent_Declare(
    sqlite3
    GIT_REPOSITORY https://github.com/sjinks/sqlite3-cmake.git
    GIT_TAG        v3.49.1
)
FetchContent_MakeAvailable(sqlite3)

target_link_libraries(dlang.sqlite PRIVATE
    SQLite::SQLite3
)

# TODO: Add tests and install targets if needed.
