concurrentqueue
concurrentqueue copied to clipboard
Consider reviewing the include path for a CMake install
The CMake-based build+install works, but it ends up installing the header files in include/concurrentqueue/moodycamel
. This forces client code to use this header inclusion:
#include <concurrentqueue/moodycamel/blockingconcurrentqueue.h>
While it would be preferable a simpler path, as this.
#include <concurrentqueue/blockingconcurrentqueue.h>
This is also the path taken by the concurrentqueue
installation through Vcpkg and it is in the best interest for the spreading of the library that the two approaches are exactly the same.
The line responsible for this, and the only one that should need to be changed is the following.
https://github.com/cameron314/concurrentqueue/blob/6dd38b8a1dbaa7863aa907045f32308a56a6ff5d/CMakeLists.txt#L61
Changed to this.
${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}
I could take care of the change, but I need to understand there's agreement on it. Will this change find acceptance?
NOTE:
Should it be critical to keep the word moodycamel
in the path I'd suggest a more intuitive path.
#include <moodycamel/concurrentqueue/blockingconcurrentqueue.h>
The name of the organization (moodycamel) has a broader scope than the name of the library (concurrentqueue), it feel really weird that the two are inverted.