Skip to content

Commit f5b8fd6

Browse files
authored
[cpp-rest-sdk] fix finding of the crypto libraries (#21219)
* [cpp-rest-sdk] fix finding of the crypto libraries This fixes finding of the crypto for cpprest sdk via find_library. It also bumps the minimum CMake version to 3.10 to avoid deprecation warnings * docs: add myself as a technical committee member
1 parent 4b2abdf commit f5b8fd6

File tree

4 files changed

+58
-34
lines changed

4 files changed

+58
-34
lines changed

.github/CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,7 @@ modules/openapi-generator/src/main/resources/cpp-qt-client/**/* @martindelille
2828
samples/client/petstore/cpp-qt/**/* @martindelille
2929
modules/openapi-generator/src/main/resources/cpp-qt-client/**/* @muttleyxd
3030
samples/client/petstore/cpp-qt/**/* @muttleyxd
31+
32+
# cpp-rest-client technical committee
33+
modules/openapi-generator/src/main/resources/cpp-rest-client/**/* @aminya
34+
samples/client/petstore/cpp-restsdk/**/* @aminya

README.md

Lines changed: 44 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -97,32 +97,48 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se
9797

9898
## Table of contents
9999

100-
- [OpenAPI Generator](#openapi-generator)
101-
- [Overview](#overview)
102-
- [Table of Contents](#table-of-contents)
103-
- [1 - Installation](#1---installation)
104-
- [1.1 - Compatibility](#11---compatibility)
105-
- [1.2 - Artifacts on Maven Central](#12---artifacts-on-maven-central)
106-
- [1.3 - Download JAR](#13---download-jar)
107-
- [1.4 - Build Projects](#14---build-projects)
108-
- [1.5 - Homebrew](#15---homebrew)
109-
- [1.6 - Docker](#16---docker)
110-
- [1.7 - NPM](#17---npm)
111-
- [1.8 - pip](#18---pip)
112-
- [2 - Getting Started](#2---getting-started)
113-
- [3 - Usage](#3---usage)
114-
- [3.1 - Customization](#31---customization)
115-
- [3.2 - Workflow Integration](#32---workflow-integration-maven-gradle-github-cicd)
116-
- [3.3 - Online Generators](#33---online-openapi-generator)
117-
- [3.4 - License Information on Generated Code](#34---license-information-on-generated-code)
118-
- [3.5 - IDE Integration](#35---ide-integration)
119-
- [4 - Companies/Projects using OpenAPI Generator](#4---companiesprojects-using-openapi-generator)
120-
- [5 - Presentations/Videos/Tutorials/Books](#5---presentationsvideostutorialsbooks)
121-
- [6 - About Us](#6---about-us)
122-
- [6.1 - OpenAPI Generator Core Team](#61---openapi-generator-core-team)
123-
- [6.2 - OpenAPI Generator Technical Committee](#62---openapi-generator-technical-committee)
124-
- [6.3 - History of OpenAPI Generator](#63---history-of-openapi-generator)
125-
- [7 - License](#7---license)
100+
- [Sponsors](#sponsors)
101+
- [Thank you to our bronze sponsors!](#thank-you-to-our-bronze-sponsors)
102+
- [Thank you GoDaddy for sponsoring the domain names, Linode for sponsoring the VPS, Checkly for sponsoring the API monitoring and Gradle for sponsoring Develocity](#thank-you-godaddy-for-sponsoring-the-domain-names-linode-for-sponsoring-the-vps-checkly-for-sponsoring-the-api-monitoring-and-gradle-for-sponsoring-develocity)
103+
- [Overview](#overview)
104+
- [Table of contents](#table-of-contents)
105+
- [1 - Installation](#1---installation)
106+
- [1.1 - Compatibility](#11---compatibility)
107+
- [1.2 - Artifacts on Maven Central](#12---artifacts-on-maven-central)
108+
- [1.3 - Download JAR](#13---download-jar)
109+
- [Launcher Script](#launcher-script)
110+
- [1.4 - Build Projects](#14---build-projects)
111+
- [Nix users](#nix-users)
112+
- [1.5 - Homebrew](#15---homebrew)
113+
- [1.6 - Docker](#16---docker)
114+
- [Public Pre-built Docker images](#public-pre-built-docker-images)
115+
- [OpenAPI Generator CLI Docker Image](#openapi-generator-cli-docker-image)
116+
- [OpenAPI Generator Online Docker Image](#openapi-generator-online-docker-image)
117+
- [Development in docker](#development-in-docker)
118+
- [Troubleshooting](#troubleshooting)
119+
- [Run Docker in Vagrant](#run-docker-in-vagrant)
120+
- [1.7 - NPM](#17---npm)
121+
- [1.8 - pip](#18---pip)
122+
- [2 - Getting Started](#2---getting-started)
123+
- [3 - Usage](#3---usage)
124+
- [To generate a sample client library](#to-generate-a-sample-client-library)
125+
- [3.1 - Customization](#31---customization)
126+
- [3.2 - Workflow Integration (Maven, Gradle, Github, CI/CD)](#32---workflow-integration-maven-gradle-github-cicd)
127+
- [3.3 - Online OpenAPI generator](#33---online-openapi-generator)
128+
- [3.4 - License information on Generated Code](#34---license-information-on-generated-code)
129+
- [3.5 - IDE Integration](#35---ide-integration)
130+
- [4 - Companies/Projects using OpenAPI Generator](#4---companiesprojects-using-openapi-generator)
131+
- [5 - Presentations/Videos/Tutorials/Books](#5---presentationsvideostutorialsbooks)
132+
- [6 - About Us](#6---about-us)
133+
- [6.1 - OpenAPI Generator Core Team](#61---openapi-generator-core-team)
134+
- [Core Team Members](#core-team-members)
135+
- [Template Creator](#template-creator)
136+
- [How to join the core team](#how-to-join-the-core-team)
137+
- [6.2 - OpenAPI Generator Technical Committee](#62---openapi-generator-technical-committee)
138+
- [Members of Technical Committee](#members-of-technical-committee)
139+
- [6.3 - History of OpenAPI Generator](#63---history-of-openapi-generator)
140+
- [Founding Members (alphabetical order):](#founding-members-alphabetical-order)
141+
- [7 - License](#7---license)
126142

127143
## [1 - Installation](#table-of-contents)
128144

@@ -1007,7 +1023,7 @@ Here is a list of template creators:
10071023
* Apex: @asnelling
10081024
* Bash: @bkryza
10091025
* C: @PowerOfCreation @zhemant [:heart:](https://www.patreon.com/zhemant)
1010-
* C++ REST: @Danielku15
1026+
* C++ REST: @Danielku15, @aminya
10111027
* C++ Tiny: @AndersSpringborg @kaareHH @michelealbano @mkakbas
10121028
* C++ UE4: @Kahncode
10131029
* C# (.NET 2.0): @who
@@ -1219,7 +1235,7 @@ If you want to join the committee, please kindly apply by sending an email to te
12191235
| Apex | |
12201236
| Bash | @frol (2017/07) @bkryza (2017/08) @kenjones-cisco (2017/09) |
12211237
| C | @zhemant (2018/11) @ityuhui (2019/12) @michelealbano (2020/03) @eafer (2024/12) |
1222-
| C++ | @ravinikam (2017/07) @stkrwork (2017/07) @etherealjoy (2018/02) @martindelille (2018/03) @muttleyxd (2019/08) |
1238+
| C++ | @ravinikam (2017/07) @stkrwork (2017/07) @etherealjoy (2018/02) @martindelille (2018/03) @muttleyxd (2019/08) @aminya (2025/05) |
12231239
| C# | @mandrean (2017/08) @shibayan (2020/02) @Blackclaws (2021/03) @lucamazzanti (2021/05) @iBicha (2023/07) |
12241240
| Clojure | |
12251241
| Crystal | @cyangle (2021/01) |

modules/openapi-generator/src/main/resources/cpp-rest-sdk-client/cmake-lists.mustache

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#
99
# NOTE: Auto generated by OpenAPI Generator (https://openapi-generator.tech).
1010

11-
cmake_minimum_required (VERSION 3.5)
11+
cmake_minimum_required (VERSION 3.10)
1212

1313
project({{{packageName}}} CXX)
1414

@@ -63,14 +63,16 @@ if (UNIX)
6363
if (BUILD_SHARED_LIBS)
6464
target_link_libraries(${PROJECT_NAME} PUBLIC Boost::headers cpprestsdk::cpprest)
6565
else()
66-
target_link_libraries(${PROJECT_NAME} PUBLIC Boost::headers cpprestsdk::cpprest crypto)
66+
find_library(CRYPTO_LIB crypto REQUIRED)
67+
target_link_libraries(${PROJECT_NAME} PUBLIC Boost::headers cpprestsdk::cpprest ${CRYPTO_LIB})
6768
endif()
6869
else()
6970
message(STATUS "Building client library for Windows")
7071
if (BUILD_SHARED_LIBS)
7172
target_link_libraries(${PROJECT_NAME} PUBLIC Boost::headers cpprestsdk::cpprest)
7273
else()
73-
target_link_libraries(${PROJECT_NAME} PUBLIC Boost::headers cpprestsdk::cpprest bcrypt)
74+
find_library(BCRYPT_LIB bcrypt REQUIRED)
75+
target_link_libraries(${PROJECT_NAME} PUBLIC Boost::headers cpprestsdk::cpprest ${BCRYPT_LIB})
7476
endif()
7577
endif()
7678

samples/client/petstore/cpp-restsdk/client/CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#
99
# NOTE: Auto generated by OpenAPI Generator (https://openapi-generator.tech).
1010

11-
cmake_minimum_required (VERSION 3.5)
11+
cmake_minimum_required (VERSION 3.10)
1212

1313
project(CppRestPetstoreClient CXX)
1414

@@ -63,14 +63,16 @@ if (UNIX)
6363
if (BUILD_SHARED_LIBS)
6464
target_link_libraries(${PROJECT_NAME} PUBLIC Boost::headers cpprestsdk::cpprest)
6565
else()
66-
target_link_libraries(${PROJECT_NAME} PUBLIC Boost::headers cpprestsdk::cpprest crypto)
66+
find_library(CRYPTO_LIB crypto REQUIRED)
67+
target_link_libraries(${PROJECT_NAME} PUBLIC Boost::headers cpprestsdk::cpprest ${CRYPTO_LIB})
6768
endif()
6869
else()
6970
message(STATUS "Building client library for Windows")
7071
if (BUILD_SHARED_LIBS)
7172
target_link_libraries(${PROJECT_NAME} PUBLIC Boost::headers cpprestsdk::cpprest)
7273
else()
73-
target_link_libraries(${PROJECT_NAME} PUBLIC Boost::headers cpprestsdk::cpprest bcrypt)
74+
find_library(BCRYPT_LIB bcrypt REQUIRED)
75+
target_link_libraries(${PROJECT_NAME} PUBLIC Boost::headers cpprestsdk::cpprest ${BCRYPT_LIB})
7476
endif()
7577
endif()
7678

0 commit comments

Comments
 (0)