set(STORAGE_VERSION_MAJOR 1)
set(STORAGE_VERSION_MINOR 0)
set(STORAGE_VERSION_PATCH 0)
set(STORAGE_VERSION "${STORAGE_VERSION_MAJOR}.${STORAGE_VERSION_MINOR}.${STORAGE_VERSION_PATCH}")

configure_file(
    ${CMAKE_CURRENT_SOURCE_DIR}/version.h.in
    ${CMAKE_CURRENT_BINARY_DIR}/include/storage/version.h
    @ONLY
)

set(STORAGE_SRC
        src/storage.cpp
)

add_library(storage SHARED ${STORAGE_SRC})
set_target_properties(storage PROPERTIES
        VERSION ${STORAGE_VERSION}
        SOVERSION ${STORAGE_VERSION_MAJOR}
)

target_include_directories(storage
        PUBLIC
        ${CMAKE_CURRENT_SOURCE_DIR}/include
        ${CMAKE_CURRENT_BINARY_DIR}/include
)
