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

install path of the headers #75

Closed
toxa81 opened this issue Mar 18, 2019 · 11 comments
Closed

install path of the headers #75

toxa81 opened this issue Mar 18, 2019 · 11 comments

Comments

@toxa81
Copy link

toxa81 commented Mar 18, 2019

autotools install the headers into $PREFIX/include/spglib/* while cmake installs a single spglib.h header into $PREFIX/include/spglib.h

What is the expected install path and what is a deprecated path?

@atztogo
Copy link
Collaborator

atztogo commented Mar 19, 2019

I have no specific install path. I expect users decide it.

@toxa81
Copy link
Author

toxa81 commented Mar 19, 2019

Well, of course. But autotools will place the headers under the spglib subfolder inside the include directory but not the cmake. This means the the host code has to choose between

#include <spglib/spglib.h>

and

#include <spglib.h>

This confuses the build systems that have to provide a path to a library headers. If the library was build by autotools or by cmake the location of headers is different.

@atztogo
Copy link
Collaborator

atztogo commented Mar 19, 2019

I see. I finally failed to use autotools well. Cmake is now enough poplular. Do you think I am allowed to remove autotools support?

@toxa81
Copy link
Author

toxa81 commented Mar 19, 2019

Do you think I am allowed to remove autotools support?

Yes, I think so. CMake works just fine and there is no need to replicate the build process with autotools.

@StefanBruens
Copy link
Contributor

avogadrolibs expects it to be installed as spglib/spglib.h, so is may be better to use the autoconf location.

@atztogo
Copy link
Collaborator

atztogo commented Feb 13, 2020

@StefanBruens, could you tell more in detail?

@StefanBruens
Copy link
Contributor

https://github.com/OpenChemistry/avogadrolibs/blob/master/cmake/FindSpglib.cmake

Also the sources contain "#include <spglib/spglib.h>

So preferably, DESTINATION should be "%{CMAKE_INSTALL_INCLUDEDIR}/spglib"

@atztogo
Copy link
Collaborator

atztogo commented Feb 13, 2020

How about

install(TARGETS symspg LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})

?

@LecrisUT
Copy link
Collaborator

Maybe this can be considered as part of the 2.0 release. Overall the standard syntax is that the main interface header is in the top include. Others use foldered structure if they want to include only components of the library. This is unnecessary for this library.

As for downstream users, it would be great if someone can contact the devs to switch to using simple find_package or FetchContent now that these will be available in the next minor release

@lan496
Copy link
Member

lan496 commented Jun 17, 2023

@LecrisUT This issue seems to be resolved. Can I close this issue?

@LecrisUT
Copy link
Collaborator

Good with me. Spglib's api is a single-header library so it shouldn't have a dedicated folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

5 participants