All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cpprest.cmake-lists.mustache Maven / Gradle / Ivy

There is a newer version: 3.0.0-rc1
Show newest version
#
# {{{appName}}}
# {{{appDescription}}}
#
# OpenAPI spec version: 1.0.0
#
# https://github.com/swagger-api/swagger-codegen.git
#
# NOTE: Auto generated by the swagger code generator program.

cmake_minimum_required (VERSION 2.8)

#PROJECT's NAME
project(CppRestSwaggerClient)


# 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})




© 2015 - 2024 Weber Informatics LLC | Privacy Policy