Commit 8e0c4246 authored by Jerome Royan's avatar Jerome Royan
Browse files

use conan V2 to manage dependencies

parent 5f24579c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -16,3 +16,5 @@ EtsiServerGen/*
!EtsiServerGen/CMakeLists.txt
!EtsiServerGen/.openapi-generator-ignore
!EtsiServerGen/patches
!EtsiServerGen/conanfile.txt
EtsiServerImpl/CMakeUserPresets.json
 No newline at end of file
+2 −0
Original line number Diff line number Diff line
@@ -23,3 +23,5 @@
#!docs/README.md

CMakeLists.txt
patches
conanfile.txt
+32 −28
Original line number Diff line number Diff line
project(RestbedGen)

cmake_minimum_required(VERSION 3.22)

set(TARGET_NAME org.openapitools.server.apiStubs)
set(RESTBED_INCLUDE_DIR ${CMAKE_CURRENT_LIST_DIR}/external/restbed/source)
set(RESTBED_LIB ${CMAKE_CURRENT_LIST_DIR}/external/restbed/build/librestbed.a)

find_package(Boost 1.45.0 REQUIRED COMPONENTS system filesystem regex)

#
# ARF - Augmented Reality Framework (ETSI ISG ARF)
#
# Copyright 2024 ETSI
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Last change: May 2024
#

cmake_minimum_required(VERSION 3.23)

project(worldStorageRestBedcppServer VERSION 2.1.0)

set(TARGET_NAME worldStorageRestBedcppServer)

find_package(Boost REQUIRED)
find_package(restbed  REQUIRED)

# Get generated filenames
file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/.openapi-generator/FILES" GENERATED_SOURCES)
@@ -38,7 +56,6 @@ include_directories(

add_library(${TARGET_NAME} SHARED)


target_sources(${TARGET_NAME}
    PRIVATE
        ${GENERATED_SOURCES})
@@ -46,29 +63,16 @@ target_sources(${TARGET_NAME}
target_include_directories(${TARGET_NAME}
    PUBLIC
        ${GENERATED_SOURCES_INCLUDE_DIRS}
        ${RESTBED_INCLUDE_DIR}
)



include_directories(${RESTBED_INCLUDE_DIR})

link_directories( ${RESTBED_INCLUDE_DIR})

target_link_libraries(${TARGET_NAME}
    PUBLIC
	${RESTBED_LIB}
    ssl 
    crypto 
	Boost::system
    Boost::filesystem
    Boost::regex
    boost::boost
    restbed::restbed
    -lpthread
    )


install(FILES  ${HDRS} DESTINATION include)
install(DIRECTORY  ${RESTBED_INCLUDE_DIR}/corvusoft DESTINATION include)
#install(TARGETS ${PROJECT_NAME} DESTINATION /usr/lib)
install(FILES  ${HDRS} DESTINATION include/${TARGET_NAME})
install(TARGETS ${TARGET_NAME} DESTINATION lib)

+12 −0
Original line number Diff line number Diff line
[requires]
boost/1.78.0
restbed/4.8

[generators]
CMakeDeps
CMakeToolchain

[layout]


[options]
+17 −14
Original line number Diff line number Diff line
#
# ARF - Augmented Reality Framework (ETSI ISG ARF)
#
# Copyright 2022 ETSI
# Copyright 2024 ETSI
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -15,27 +15,30 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Last change: June 2022
# Last change: May 2024
#

cmake_minimum_required(VERSION 3.2)
project(HackPistacheServ VERSION 0.1.0)

cmake_minimum_required(VERSION 3.23)

project(RestBedImpl VERSION 2.1.0)

set(TARGET_NAME RestbedImpl)

find_package(Boost REQUIRED)
find_package(restbed REQUIRED)

set(CMAKE_POSITION_INDEPENDENT_CODE ON)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -pg -g3" )

file(GLOB SRCS
    ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp
)

find_package(PkgConfig)
pkg_check_modules(PISTACHE REQUIRED libpistache)

find_package(Boost 1.71 REQUIRED)

find_library(PISTACHEGEN libPistacheGen.a)
message(STATUS ${PISTACHEGEN})

add_executable(HackPistacheServ ${SRCS})
add_executable(${TARGET_NAME} ${SRCS})
include_directories(src)

target_link_libraries(HackPistacheServ ${PISTACHEGEN} pistache Boost::boost)
target_link_libraries(${TARGET_NAME} boost::boost restbed::restbed)

Loading