Skip to content

[cpp-qt-client] Fix and refactor CMakeLists.txt #11950

Closed
Thaulino wants to merge 3 commits intoOpenAPITools:masterfrom
Thaulino:master
Closed

[cpp-qt-client] Fix and refactor CMakeLists.txt #11950
Thaulino wants to merge 3 commits intoOpenAPITools:masterfrom
Thaulino:master

Conversation

@Thaulino
Copy link
Copy Markdown
Contributor

@Thaulino Thaulino commented Mar 23, 2022

This is my first pull request here - sorry if something does not fit to the rules

Description

Changed: Always add Qt5::Gui to build, needed because {{prefix}}Oauth.h is always part of the build
Added: find_package for OpenSSL, should be done prior target_link_libraries

Tests that have been done :

(ubuntu)
install deps (reference #11371 ):
sudo apt install -y --no-install-recommends qt5-default
run code generator:
java -jar openapi-generator-cli-5.4.0.jar generate -t cpp-qt-templates -i petstore.json -g cpp-qt-client -o petstore
run cmake:
cmake -S petstore -B petstore/build

(windows)
run code generator:
java -jar openapi-generator-cli-5.4.0.jar generate -t cpp-qt-templates -i petstore.json -g cpp-qt-client -o petstore
run cmake:
cmake -S petstore -B petstore/build

Issue

fixes #11371

technical commitee

@muttleyxd
@etherealjoy
@wing328

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package 
    ./bin/generate-samples.sh
    ./bin/utils/export_docs_generators.sh
    
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    For Windows users, please run the script in Git BASH.
  • File the PR against the correct branch: master (5.3.0), 6.0.x
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

Changed: Always add Qt5::Gui to build
Added: find_package for OpenSSL (if not Apple)
@Thaulino
Copy link
Copy Markdown
Contributor Author

Sorry i somehow reverted unintentionally the commit.
Now i reverted the revert -.-
maybe it is possible to cherrypick the first commit

@Thaulino Thaulino changed the title [cpp-qt-client] Fix and refactor CMakeLists.txt #11371 [cpp-qt-client] Fix and refactor CMakeLists.txt Mar 23, 2022
@wing328
Copy link
Copy Markdown
Member

wing328 commented Mar 24, 2022

maybe it is possible to cherrypick the first commit

@Thaulino thanks for the PR. Feel free to submit a new PR by cherry-picking the first commit. Let me know if you need any help.

@wing328
Copy link
Copy Markdown
Member

wing328 commented Mar 24, 2022

cc @ravinikam (2017/07) @stkrwork (2017/07) @etherealjoy (2018/02) @MartinDelille (2018/03) @muttleyxd (2019/08)

@Thaulino
Copy link
Copy Markdown
Contributor Author

Thaulino commented Mar 25, 2022

@wing328 i created a new pr (#11967) 😄

@wing328 wing328 closed this Mar 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] CMakeLists.txt gernerated by cpp-qt-client is missing Qt5:.Gui dependency / linking

2 participants