Skip to content

Commit 8c31247

Browse files
authored
Merge pull request #5 from bringauto/BAF-796/add-cpprest-packager
add cpprest package, remove install_deps_imported
2 parents d31a045 + 19b644d commit 8c31247

File tree

4 files changed

+23
-5
lines changed

4 files changed

+23
-5
lines changed

CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,10 @@ CMDEF_ADD_LIBRARY(
6161
TARGET_LINK_LIBRARIES(fleet-http-client-shared
6262
PUBLIC
6363
fleet-protocol-interface::common-headers-interface
64-
bringauto_logger::bringauto_logger
6564
fleet-protocol-cxx-helpers-static::fleet-protocol-cxx-helpers-static
6665
bringauto-fleet-http-client-generated-shared
66+
PRIVATE
67+
bringauto_logger::bringauto_logger
6768
)
6869

6970
IF(BRINGAUTO_TESTS)
@@ -76,12 +77,14 @@ IF (BRINGAUTO_INSTALL)
7677
TARGET fleet-http-client-shared
7778
NAMESPACE fleet-http-client-shared::
7879
)
79-
BA_PACKAGE_DEPS_IMPORTED(fleet-http-client-shared)
8080
ENDIF ()
8181

8282
IF (BRINGAUTO_PACKAGE)
8383
CMDEF_PACKAGE(
8484
MAIN_TARGET fleet-http-client-shared
8585
VERSION ${FLEET_HTTP_CLIENT_VERSION}
8686
)
87+
SET(CPACK_GENERATOR ZIP)
88+
SET(CPACK_PACKAGE_CONTACT "BringAuto s.r.o. <[email protected]>")
89+
INCLUDE(CPack)
8790
ENDIF ()

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,23 @@ After the initial threshold delay ends, the time container is emptied and subseq
1818

1919
![Flow chart](./doc/img/request_frequency_guard.png)
2020

21-
## Requirements
21+
## Usage
2222

23-
- cpprestsdk: `sudo apt-get install libcpprest-dev`
23+
When using fleet-http-client, it is required to install its dependencies.
24+
This has to be done because cpprest is obsolete.
25+
26+
### Requirements
27+
28+
- cpprestsdk
29+
- bringauto-logger
30+
- Boost
31+
32+
All requirements can be added by bringauto Packager
33+
34+
### Example
35+
36+
Usage example is in [Mission module CMakeLists](https://github.com/bringauto/mission-module/blob/master/CMakeLists.txt).
37+
Pay attention to the FIND_PACKAGE part.
2438

2539
## Generating client code
2640

cmake/Dependencies.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ BA_PACKAGE_LIBRARY(ba-logger v1.2.0)
55
BA_PACKAGE_LIBRARY(boost v1.78.0)
66
BA_PACKAGE_LIBRARY(fleet-protocol-interface v2.0.0 PLATFORM_STRING_MODE any_machine NO_DEBUG ON)
77
BA_PACKAGE_LIBRARY(fleet-protocol-cxx-helpers-static v1.1.1)
8+
BA_PACKAGE_LIBRARY(cpprestsdk v2.10.20)
89

910
IF (BRINGAUTO_TESTS)
1011
BA_PACKAGE_LIBRARY(gtest v1.12.1)

lib/bringauto-fleet-http-client-generated/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ IF(NOT CMAKE_CXX_STANDARD)
2020
SET(CMAKE_CXX_STANDARD 14)
2121
ENDIF()
2222

23-
FIND_PACKAGE(cpprestsdk REQUIRED)
23+
FIND_PACKAGE(cpprestsdk REQUIRED 2.10.20)
2424
FIND_PACKAGE(Boost REQUIRED)
2525

2626
INCLUDE(GNUInstallDirs)

0 commit comments

Comments
 (0)