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 packaging doesn't support example usage #504

Open
HunterZ opened this issue Mar 2, 2024 · 2 comments
Open

CMake packaging doesn't support example usage #504

HunterZ opened this issue Mar 2, 2024 · 2 comments

Comments

@HunterZ
Copy link

HunterZ commented Mar 2, 2024

The project readme says to use #include <ixwebsocket/xyz.h> but the CMake install logic uses .../include/ixwebsocket in the exported target properties:

$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/ixwebsocket>

This means that unless you get the parent include directory via some other means, the #include directive breaks, which is exactly what just happened to me when I tried to reuse some of my ixwebsocket-dependent code in another CMake project.

Note that ixwebsocket's pkgconfig setup exports the parent include directory, so fixing this would bring those into alignment:

includedir=${prefix}/include

@bsergean
Copy link
Collaborator

bsergean commented Mar 6, 2024

Do you have any clue on how to fix that, without breaking vcpkg and all ?

@HunterZ
Copy link
Author

HunterZ commented Mar 7, 2024

Well my point is that vcpkg is already broken...It seems the answer is to change:
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/ixwebsocket>
...to:
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
...which would align it with both the pkgconfig setup and other vcpkg packages' CMake configs.

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

2 participants