Skip to content

Fix CMake deprecation warnings and include paths (fixes #384, #391, #432)#455

Open
NITIN9181 wants to merge 2 commits into
cameron314:masterfrom
NITIN9181:master
Open

Fix CMake deprecation warnings and include paths (fixes #384, #391, #432)#455
NITIN9181 wants to merge 2 commits into
cameron314:masterfrom
NITIN9181:master

Conversation

@NITIN9181

Copy link
Copy Markdown

This PR resolves three open CMake-related issues:

  1. Fixes Deprecation warnings when building with newer versions of CMake #432 (CMake deprecation warnings): Updates cmake_minimum_required to use the policy range syntax (VERSION 3.9...3.31). This silences the CMake deprecation warnings (e.g., "Compatibility with CMake < 3.10 will be removed") that occur in newer CMake versions, without breaking backward compatibility for users still on CMake 3.9.

  2. Fixes CMakeLists INSTALL DESTINATION and INSTALL_INTERFACE are inconsistent #384 and Consider reviewing the include path for a CMake install #391 (Mismatched include paths): Modifies the CMake install destination from ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/moodycamel to strictly ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}. This ensures that the physical installation path matches the INSTALL_INTERFACE expectations. Downstream projects using find_package will now correctly resolve #include <concurrentqueue.h> without needing the inverted /moodycamel/ subdirectory prefix, which also aligns with vcpkg compatibility.

Both changes have been locally tested via find_package and FetchContent and compile cleanly.

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.

Deprecation warnings when building with newer versions of CMake CMakeLists INSTALL DESTINATION and INSTALL_INTERFACE are inconsistent

1 participant