forked from lthn/blockchain
adds swagger assets + OpenAPI spec to {pkg}/share/lthn_api/res/* + {pkg}/share/lthn_api/oas-3.0.0.json
This commit is contained in:
parent
692cace8e1
commit
518e002cb3
1 changed files with 9 additions and 1 deletions
|
|
@ -31,7 +31,15 @@ target_link_libraries(lthn_api PUBLIC
|
|||
oatpp::oatpp-swagger
|
||||
)
|
||||
|
||||
target_compile_definitions(lthn_api PUBLIC -DOATPP_SWAGGER_RES_PATH="${oatpp-swagger_INCLUDE_DIRS}/../bin/oatpp-swagger/res")
|
||||
# Define path to swagger resources for the installed package.
|
||||
# This assumes the executable is in 'bin' and resources are in 'share/lthn_api'.
|
||||
target_compile_definitions(lthn_api PUBLIC -DOATPP_SWAGGER_RES_PATH="../share/lthn_api/res")
|
||||
|
||||
# Install swagger resources to a conventional location.
|
||||
install(DIRECTORY ${oatpp-swagger_INCLUDE_DIRS}/../bin/oatpp-swagger/res DESTINATION share/lthn_api)
|
||||
|
||||
# Install OpenAPI spec for SDK generation
|
||||
install(FILES ${CMAKE_SOURCE_DIR}/utils/sdk/spec/oas-3.0.0.json DESTINATION share/lthn_api)
|
||||
|
||||
|
||||
#add_executable(lethean-api main.cpp)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue