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

Add some more modern syntax in CMake files #1034

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

gikari
Copy link
Contributor

@gikari gikari commented Dec 2, 2022

Here:

  • Config mode syntax for find_package. This syntax is recommended by CMake and official Qt 6 documentation (works for Qt 5 too).
  • CMAKE_AUTORCC variable for less verbosity
  • add_compile_definitions is recommended by CMake, as it superseeds the add_difinitions.
  • Use target_sources instead of variables (more reliable and flexible) for source additions
  • Add headers to sources, so that some IDE could pick up them (like Qt Creator).
  • Some other small fixes

Using fetch content cmake module is less verbose,
than custom download and extract logic with setting
of additional variables.

CMake version 3.16 is in the Ubuntu 20.04 repository,
so everyone should have at least it by now.
@gikari gikari force-pushed the feature/2_cmake-fixes branch from 4754890 to 7f3d6e8 Compare December 4, 2022 12:07
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.

1 participant