Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CREATE_PROJECT: fixed cmake generator #2549

Merged

Conversation

@mgerhardy
Copy link
Contributor

@mgerhardy mgerhardy commented Oct 20, 2020

With these patches I'm now able to configure, compile and link with cmake

  • Support for pkg-config was added
  • Shortened the CMakeLists.txt by more than 4000 lines
  • Added macro for feature detection
  • Configure stage is reporting missing libs as error now (they were reported as compile errors during the build before)
  • Link the scummvm-detection lib (this was missing before)
  • Added missing defines like DETECTION_STATIC and USE_SDL2
  • Added the generated CMakeLists.txt to .gitignore
@deepcode-ci-bot
Copy link

@deepcode-ci-bot deepcode-ci-bot bot commented Oct 20, 2020

DeepCode's analysis on #e1ff39 found:

  • ⚠️ 1 warning 👇

Top issues

Description Example fixes
Missing check is_open on std::ofstream before writing to it. Occurrences: 🔧 Example fixes

👉 View analysis in DeepCode’s Dashboard | Configure the bot

@lotharsm
Copy link
Member

@lotharsm lotharsm commented Oct 24, 2020

I ran into similar issues when I played around with create_project. +1 from me.

@mgerhardy mgerhardy force-pushed the mgerhardy:pr/create-project-cmake-pkgconfig branch 2 times, most recently from 7bf2a35 to ead5e04 Nov 7, 2020
@mgerhardy
Copy link
Contributor Author

@mgerhardy mgerhardy commented Nov 7, 2020

With the latest commit I'm now able to not only configure the build system - but also compile and link the binary. But

 ~/dev/scummvm/build   remotes/mgerhardy/pr/create-project-cmake-pkgconfig ? ⍟53  ./scummvm --list-engines                                                                                                                                                               ✔  17:31:09
Engine ID       Engine Name                                           
--------------- ------------------------------------------------------

There are also no shared objects created. So I suppose there is some define missing here?

@mgerhardy mgerhardy force-pushed the mgerhardy:pr/create-project-cmake-pkgconfig branch from 5f2c18f to 88e61ea Nov 7, 2020
@mgerhardy
Copy link
Contributor Author

@mgerhardy mgerhardy commented Nov 7, 2020

This also fixes some missing defines since the detection plugin rework.

@mgerhardy mgerhardy force-pushed the mgerhardy:pr/create-project-cmake-pkgconfig branch from e01e2d0 to 32c6db4 Nov 8, 2020
@mgerhardy
Copy link
Contributor Author

@mgerhardy mgerhardy commented Nov 8, 2020

CMakeLists.txt

Attached a generated cmake script

@mgerhardy mgerhardy changed the title CREATE_PROJECT: extended the cmake generator to support pkg-config CREATE_PROJECT: fixed cmake generator Nov 8, 2020
@mgerhardy mgerhardy force-pushed the mgerhardy:pr/create-project-cmake-pkgconfig branch from 3645c3b to c851268 Nov 8, 2020
* Support for pkg-config was added
* Shortened the CMakeLists.txt by more than 4000 lines
* Added macro for feature detection
* Configure stage is reporting missing libs as error now (they were reported as compile errors during the build before)
* Link the scummvm-detection lib (this was missing before)
* Added missing defines like DETECTION_STATIC and USE_SDL2
* Group impl and header files in src file list to shorten the cmake script
* Unified indention for generated script
@mgerhardy mgerhardy force-pushed the mgerhardy:pr/create-project-cmake-pkgconfig branch from c851268 to e1ff39f Nov 8, 2020
@mgerhardy mgerhardy merged commit 7be30d4 into scummvm:master Nov 8, 2020
1 check failed
1 check failed
deepcode-ci-bot Found 1 warning issue.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.