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

CMake: inconsistency of include interface between pkg-config and CMake config file #285

Open
SpaceIm opened this issue Mar 7, 2022 · 0 comments

Comments

@SpaceIm
Copy link

SpaceIm commented Mar 7, 2022

In CMakeLists, include interface is defined under include (for CMake config file in install target):

$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)

but headers are installed under include/rtmidi:

PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/rtmidi)

In the meantime, .pc file says that include interface is under include/rtmidi:

includedir=${prefix}/include/rtmidi

It's inconsistent.
Someone consuming rtmidi with CMake config files must include public header with #include <rtmidi/RtMidi.h>, but with pkg-config it won't work and it will be #include <RtMidi.h>.
With add_subdirectory(), it is also #include <RtMidi.h>

Moreover, in all samples and tutorials, it's #include <RtMidi.h>

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

1 participant