-
Notifications
You must be signed in to change notification settings - Fork 11
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
Header files installing to root #324
Comments
Hardcoding Right now, I was going to suggest what @gchenfc said, which is print out the value of |
Okay after going through the CMake documentation and really understanding what's going on here, here's the explanation of the 2 snippets:
My strongest guess is that @arutkowski is using some different setup which doesn't have |
I think always setting the same, non /use/local prefix should help. Does that work for you, Gerry? |
Correct me if I'm wrong - you're saying that we should always be using
Yes I think this may be it??? We maybe need @varunagrawal I think there may be a misunderstanding due to my imprecise wording (I'm familiar with install/target_include_directories and generator expressions). I'm trying to say that
should be
or something. Well anyway this is a minor note that isn't that important atm, the main question is why Adam's machine is not using CMAKE_PREFIX_PATH. |
To answer that question, I need details about Adam's machine and setup. |
Indeed, adding
Following the suggestion from @gchenfc to add
and after adding the GNUInstallDirs (before the line
For reference, here's some basic info on my machine: Although, at some point while trying to get this to work, cmake got updated to 3.22.1, and I don't remember doing that myself (I wonder if Homebrew had something to do with that, as I seem to have to reinstall it after every time I clear the build directory). Also, I followed the directions for installing gtdynamics as described in the readme, but I used an absolute path for |
Sorry for the late reply, glad that I'm not able to reproduce the examples issue, is it possible it just needs a |
Should we close this as resolved? |
I think it is safe to close this issue. I didn't follow up on checking whether or not I could build the examples. It's not a high priority for me. If I notice that problem again, I suggest that I could make a separate issue for that. |
Action items:
GTDynamics/gtdynamics/CMakeLists.txt
?@arutkowski is having a strange issue on his machine where cmake is installing the
.h
files into/gtdynamics/...
(root) instead of${CMAKE_PREFIX_PATH}/include/gtdynamics/...
. Interestingly, the.so
file is properly installed into${CMAKE_PREFIX_PATH}/lib/libgtdynamics.so
. Adam worked around it by manually copying the files into the correct directory, but this is not ideal.Upon reading more carefully, I think maybe this is related to the cmake builtin
CMAKE_INSTALL_INCLUDEDIR
used e.g. here:GTDynamics/gtdynamics/CMakeLists.txt
Line 43 in 2636582
CMAKE_INSTALL_INCLUDEDIR
was introduced in cmake 3.14 I think, though IIRC @arutkowski had 3.17 so it should have been there.Nevertheless, maybe we should do
cmake_minimum_required(VERSION 3.14)
, or just hard-code the includes install path asinclude/
instead of usingCMAKE_INSTALL_INCLUDEDIR
.Finally I suspect the use of
CMAKE_INSTALL_INCLUDEDIR
may be inconsistent withGTDynamics/gtdynamics/CMakeLists.txt
Lines 67 to 76 in 2636582
which does hardcode the
include/
folder install path.The text was updated successfully, but these errors were encountered: