cpp-rest-sdk-client.cmake-lists.mustache Maven / Gradle / Ivy
The newest version!
#
# {{{appName}}}
# {{{appDescription}}}
#
# The version of the OpenAPI document: 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}/3rdParty/cpprest)
set(CPPREST_INCLUDE_DIR ${CPPREST_ROOT}/include)
set(CPPREST_LIBRARY_DIR ${CPPREST_ROOT}/lib)
include_directories(${PROJECT_SOURCE_DIR} api model ${CPPREST_INCLUDE_DIR})
# If using vcpkg, set include directories. Also comment out CPPREST section above since vcpkg will handle it.
# To install required vcpkg packages execute:
# > vcpkg install cpprestsdk cpprestsdk:x64-windows boost-uuid boost-uuid:x64-windows
# set(VCPKG_ROOT "C:\\vcpkg\\installed\\x64-windows")
# set(VCPKG_INCLUDE_DIR ${VCPKG_ROOT}/include)
# set(VCPKG_LIBRARY_DIR ${VCPKG_ROOT}/lib)
# include_directories(${PROJECT_SOURCE_DIR} api model ${VCPKG_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})
© 2015 - 2024 Weber Informatics LLC | Privacy Policy