Commits (3)
......@@ -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
......@@ -23,3 +23,5 @@
#!docs/README.md
CMakeLists.txt
patches
conanfile.txt
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)
[requires]
boost/1.78.0
restbed/4.8
[generators]
CMakeDeps
CMakeToolchain
[layout]
[options]
#
# 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)
# WORLD STORAGE CPP SERVER (PISTACHE)
# WORLD STORAGE CPP SERVER (RESTBED)
## Description
This folder contains the source files for a basic implementation of the library you just created
## Requirements
- Boost
- Pistache
- a cpp compiler
- Ubuntu 22.04
- CMake > 2.22
- conan V2
## Code usage
Once you are in this directory, to build and execute the server, use the following commands:
mkdir -p build
cd build
cmake ..
conan install . --build=missing
cd build
cmake .. --preset conan-release
make
./HackPistacheServ
./RestbedImpl
[requires]
boost/1.78.0
restbed/4.8
[generators]
CMakeDeps
CMakeToolchain
[layout]
cmake_layout
\ No newline at end of file
*This repository is part of the outcomes of the Specialist Task Force 620 focusing on the authoring of a World Representation as part of the ETSI ISG Augmented Reality Framework architecture (https://www.etsi.org/deliver/etsi_gs/ARF/001_099/003/01.01.01_60/gs_ARF003v010101p.pdf).*
*The set of the World Representation authoring components includes:*
*This repository is part of the outcomes of the Specialist Task Force 620 and 669 focusing on the authoring and use of a World Representation as part of the ETSI ISG Augmented Reality Framework architecture (https://www.etsi.org/deliver/etsi_gs/ARF/001_099/003/01.01.01_60/gs_ARF003v010101p.pdf).*
*The set of the World Representation components includes:*
*• The C++ and C# source code for servers and clients generated from OpenAPI available here (https://forge.etsi.org/rep/arf/arf005)*
......@@ -11,11 +11,11 @@
---
# WORLD STORAGE CPP SERVER (PISTACHE)
# WORLD STORAGE CPP SERVER (RestBed)
## Description
This repo contains a pistache server library generation pipeline compliant to the World Storage API.
This repo contains a restbed server library generation pipeline compliant to the World Storage API.
It also contains a sample using that library, it's a basic implementation allowing the user to perform all CRUD operations on the Trackable models.
## Repo Content
......@@ -29,13 +29,30 @@ It also contains a sample using that library, it's a basic implementation allowi
## Requirements
- A Linux based machine
- CMake
- Ubuntu 22.04
- CMake > 2.22
- conan V2
- npm
## Install or update cmake
To install the last version of Cmake, we recommend to follow the instruction detailed on the following link (Using APT Repositories): https://askubuntu.com/questions/355565/how-do-i-install-the-latest-version-of-cmake-from-the-command-line
## Install conan v2
npm install
npm run installConan
## Code Generation
To generate the code and the DLLs use the following commands:
npm install
npm run generate && npm run dependencies && npm run build
npm install (if not already done)
npm run generate && npm run build
You will find the header files in:
/usr/local/include/worldStorageRestBedcppServer/
and the library file in:
/usr/local/lib/libworldStorageRestBedcppServer.so
......@@ -14,13 +14,13 @@
"Last change: June 2022"
],
"name": "worldstorageserver",
"version": "0.0.1",
"version": "2.1.0",
"description": "ISG ARF World Storage Cpp Server",
"main": "index.js",
"scripts": {
"generate": "cd EtsiServerGen && sudo java -jar /usr/local/lib/node_modules/@openapitools/openapi-generator-cli/versions/6.6.0.jar generate -i ../openapi/API/worldstorage/worldstorageopenapi.yaml --skip-validate-spec -g cpp-restbed-server -o . && cd patches && sudo ./applyPatches.sh",
"dependencies": "sudo apt update && sudo apt-get install libboost-all-dev && cd EtsiServerGen && mkdir external && cd external && git clone --recursive https://github.com/corvusoft/restbed.git && mkdir restbed/build && cd restbed/build && cmake -DBUILD_SSL=NO -DBUILD_TESTS=NO -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true .. && make install",
"build": "cd EtsiServerGen && sudo mkdir -p build && cd build && sudo cmake .. && sudo make && sudo make install"
"generate": "cd EtsiServerGen && java -jar /usr/local/lib/node_modules/@openapitools/openapi-generator-cli/versions/6.6.0.jar generate -i ../openapi/API/worldstorage/worldstorageopenapi.yaml --skip-validate-spec -g cpp-restbed-server -o . && cd patches && ./applyPatches.sh",
"installConan": "pip install conan",
"build": "cd EtsiServerGen && conan install . --build=missing -of build && cd build && cmake .. --preset conan-release && cmake --build . && sudo make install"
},
"devDependencies": {
......