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

@ghost
Copy link

ghost 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

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

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

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 pr/create-project-cmake-pkgconfig branch from 5f2c18f to 88e61ea Compare November 7, 2020 20:25
@mgerhardy
Copy link
Contributor Author

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

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

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 pr/create-project-cmake-pkgconfig branch from 3645c3b to c851268 Compare November 8, 2020 10:25
* 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 pr/create-project-cmake-pkgconfig branch from c851268 to e1ff39f Compare November 8, 2020 10:27
@mgerhardy mgerhardy merged commit 7be30d4 into scummvm:master Nov 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants