Skip to content

CMake Deprecation Warning #162

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

Closed
jjuhl opened this issue Mar 15, 2025 · 2 comments
Closed

CMake Deprecation Warning #162

jjuhl opened this issue Mar 15, 2025 · 2 comments

Comments

@jjuhl
Copy link
Contributor

jjuhl commented Mar 15, 2025

Hi,

I'm trying to integrate tmxlite into my SFML based project and noticed a small issue while doing so. My version of cmake is:

$ cmake --version
cmake version 3.31.6

and while building tmxlite as part of my project I get the following deprecation warning:

[cmake] Cloning into 'tmxlite-src'...
[cmake] HEAD is now at 89eaddc Merge pull request #128 from mpartel/tileset-without-map
[cmake] CMake Deprecation Warning at build/Desktop-Debug/_deps/tmxlite-src/tmxlite/CMakeLists.txt:1 (cmake_minimum_required):
[cmake]   Compatibility with CMake < 3.10 will be removed from a future version of
[cmake]   CMake.
[cmake] 
[cmake]   Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
[cmake]   to tell CMake that the project requires at least <min> but has been updated
[cmake]   to work with policies introduced by <max> or earlier.

Not an urgent issue to fix since everything still works, but with CMake 4.0 on the horizon I fear there's a fair chance that things will stop working in the near future, so perhaps it's time to update the minimum required CMake version :-)

@juliohq
Copy link

juliohq commented May 9, 2025

I can confirm it isn't working anymore in CMake 4.0:

CMake Error at thirdparty/tmxlite/tmxlite/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.

  Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.

A workaround is to use -DCMAKE_POLICY_VERSION_MINIMUM=3.5 as suggested in the error, though it isn't ideal.

My CMake version is:

$ cmake --version
cmake version 4.0.1-dirty

@fallahn
Copy link
Owner

fallahn commented May 10, 2025

Thanks for the heads up! I've upped the min version number now.

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

No branches or pull requests

3 participants