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 install DIRECTORY include wrong parameters? #182

Open
liuzikai opened this issue Jun 13, 2023 · 2 comments
Open

CMake install DIRECTORY include wrong parameters? #182

liuzikai opened this issue Jun 13, 2023 · 2 comments
Milestone

Comments

@liuzikai
Copy link

Hi,

DESTINATION include ${CMAKE_INSTALL_INCLUDEDIR})

According to CMake doc, there should be only one parameter following DESTINATION? When building as a standalone project, ${CMAKE_INSTALL_INCLUDEDIR} is empty so nothing happens. But when I include this project in another one via add_subdirectory with this variable set (also include though), it breaks CMake.

@Nic30
Copy link
Owner

Nic30 commented Jun 21, 2023

@liuzikai Do you propose any solution to this problem?
There is a branch where I replaced cmake with meson. https://github.com/Nic30/hdlConvertor/tree/mesonbuild
But I am fighting against the time there...

@liuzikai
Copy link
Author

I am not sure either... A possible solution is to remove ${CMAKE_INSTALL_INCLUDEDIR} or default it to "include" if it's empty like the following. Just make sure it doesn't break your python build (which I am not really familiar).

if(CMAKE_INSTALL_INCLUDEDIR STREQUAL "")
    set(CMAKE_INSTALL_INCLUDEDIR "include")
endif()

I was trying to use this library in another pretty large CMake-based project, whose configuration does some wired things to these variables. Simply remove either include or ${CMAKE_INSTALL_INCLUDEDIR} works, although later I encountered some other problems and not using this lib for now. So anyway, feel free to apply these easy fixes or just close this issue as you like ;)

@Nic30 Nic30 added this to the v2.4 milestone Jan 14, 2024
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