forked from loafle/openapi-generator-original
* Rename script: qt5-petstore.sh -> cpp-qt5-petstore.sh * Rename sample folder: qt5cpp -> cpp-qt5 * Rename script: cpprest-petstore.sh -> cpp-restsdk-petstore.sh * Rename sample folder: cpprest -> cpp-restsdk * Rename generator: CppRestClientCodegen -> CppRestSdkClientCodegen * Rename script: tizen-petstore.sh -> cpp-tizen-petstore.sh * Rename sample folder: tizen -> cpp-tizen * Rename script(security): qt5cpp-petstore.sh -> cpp-qt5-petstore.sh * Rename sample folder(security): qt5cpp -> cpp-qt5 * Rename script(windows): qt5cpp-petstore.bat -> cpp-qt5-petstore.bat * Change sample folder * Rename script(windows): cpprest-petstore.bat -> cpp-restsdk-petstore.bat * Change sample folder * Rename script(windows): tizen-petstore.bat -> cpp-tizen-petstore.bat * Change sample folder * Change output folder: tizen -> cpp-tizen * Rename the scripts under bin/openapi3 cpp-restsdk is not exist under bin/openapi3 * Change sample folder
50 lines
1.7 KiB
CMake
50 lines
1.7 KiB
CMake
#
|
|
# OpenAPI Petstore
|
|
# This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
|
#
|
|
# OpenAPI spec version: 1.0.0
|
|
#
|
|
# https://openapi-generator.tech
|
|
#
|
|
# NOTE: Auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
|
|
cmake_minimum_required (VERSION 2.8)
|
|
|
|
#PROJECT's NAME
|
|
project(CppRestOpenAPIClient)
|
|
|
|
|
|
# THE LOCATION OF OUTPUT BINARIES
|
|
set(CMAKE_LIBRARY_DIR ${PROJECT_SOURCE_DIR}/lib)
|
|
set(LIBRARY_OUTPUT_PATH ${CMAKE_LIBRARY_DIR})
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
|
|
|
if(NOT CMAKE_BUILD_TYPE)
|
|
set(CMAKE_BUILD_TYPE Release)
|
|
endif()
|
|
|
|
# BUILD TYPE
|
|
message("A ${CMAKE_BUILD_TYPE} build configuration is detected")
|
|
|
|
# Update require components as necessary
|
|
#find_package(Boost 1.45.0 REQUIRED COMPONENTS ${Boost_THREAD_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_REGEX_LIBRARY} ${Boost_DATE_TIME_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_FILESYSTEM_LIBRARY})
|
|
|
|
# build and set path to cpp rest sdk
|
|
#set(CPPREST_ROOT ${PROJECT_SOURCE_DIR}/../../../developmentTools/3rdParty/cpprest)
|
|
set(CPPREST_INCLUDE_DIR ${CPPREST_ROOT}/include)
|
|
set(CPPREST_LIBRARY_DIR ${CPPREST_ROOT}/lib)
|
|
|
|
if( NOT DEFINED CPPREST_ROOT )
|
|
message( FATAL_ERROR "Failed to find cpprest SDK (or missing components). Double check that \"CPPREST_ROOT\" is properly set")
|
|
endif( NOT DEFINED CPPREST_ROOT )
|
|
|
|
include_directories(${PROJECT_SOURCE_DIR} api model ${CPPREST_INCLUDE_DIR})
|
|
|
|
#SUPPORTING FILES
|
|
set(SUPPORTING_FILES "ApiClient" "ApiConfiguration" "ApiException" "HttpContent" "IHttpBody" "JsonBody" "ModelBase" "MultipartFormData" "Object")
|
|
#SOURCE FILES
|
|
file(GLOB SOURCE_FILES "api/*" "model/*")
|
|
|
|
add_library(${PROJECT_NAME} ${SUPPORTING_FILES} ${SOURCE_FILES})
|