set(MODULE_NAME database)

set(SQLite3_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/src/third_party/sqlite3")
set(SQLite3_SOURCE_FILE "${CMAKE_SOURCE_DIR}/src/third_party/sqlite3/sqlite3.c")

list(APPEND HEADERS 
    Database.h
    DatabaseManager.h
    database_interfaces/SqliteInterface.h
	${SQLite3_SOURCE_FILE})

list(APPEND SOURCES 
    Database.cpp
    DatabaseManager.cpp
    database_interfaces/SqliteInterface.cpp
	${SQLite3_SOURCE_FILE})

add_library(${MODULE_NAME} SHARED ${SOURCES} ${HEADERS})

target_include_directories(${MODULE_NAME} PUBLIC
                          ${CMAKE_CURRENT_SOURCE_DIR}
                          ${CMAKE_CURRENT_SOURCE_DIR}/database_interfaces
                          ${SQLite3_INCLUDE_DIR}
                          )
                          
target_link_libraries(${MODULE_NAME} core)
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER src/base)
set_target_properties( ${MODULE_NAME} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON )
