Add openapi description
This commit is contained in:
@@ -2,6 +2,15 @@ cmake_minimum_required(VERSION 2.8...3.30)
|
||||
|
||||
project(vitastor)
|
||||
|
||||
set(OPENAPI_JSON_H "${CMAKE_CURRENT_BINARY_DIR}/openapi.json.h")
|
||||
add_custom_command(
|
||||
OUTPUT ${OPENAPI_JSON_H}
|
||||
COMMAND ${CMAKE_COMMAND} -E echo const char* openapi_description = R\\\"json\\\( > ${OPENAPI_JSON_H}
|
||||
COMMAND ${CMAKE_COMMAND} -E cat ${CMAKE_CURRENT_SOURCE_DIR}/openapi.json >> ${OPENAPI_JSON_H}
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "\\)json\\\"\\;" >> ${OPENAPI_JSON_H}
|
||||
DEPENDS openapi.json
|
||||
)
|
||||
|
||||
# libvitastor_cli.a
|
||||
add_library(vitastor_cli STATIC
|
||||
cli_common.cpp
|
||||
@@ -28,8 +37,10 @@ add_library(vitastor_cli STATIC
|
||||
cli_pool_modify.cpp
|
||||
cli_pool_rm.cpp
|
||||
cli_serve.cpp
|
||||
${OPENAPI_JSON_H}
|
||||
)
|
||||
target_compile_options(vitastor_cli PUBLIC -fPIC)
|
||||
target_include_directories(vitastor_cli PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
# vitastor-cli
|
||||
add_executable(vitastor-cli
|
||||
|
||||
Reference in New Issue
Block a user