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

ENH: Use GNUInstallDirs CMake module #1062

Merged
merged 6 commits into from
Oct 17, 2021
Merged

ENH: Use GNUInstallDirs CMake module #1062

merged 6 commits into from
Oct 17, 2021

Conversation

gdevenyi
Copy link
Contributor

@gdevenyi gdevenyi commented Aug 4, 2020

This is @cookpa's work. Given it fixes some outstanding bugs #872 we should merge.

Trying to enable installation to the correct lib dir for each platform.

This just needs the SuperBuild bits still adjusted, I will provide feedback.

Trying to enable installation to the correct lib dir for each platform
@gdevenyi gdevenyi marked this pull request as draft August 4, 2020 13:34
@gdevenyi
Copy link
Contributor Author

gdevenyi commented Aug 4, 2020

I believe this line: https://github.com/ANTsX/ANTs/blob/master/ANTS.cmake#L199

Needs to have "lib" changed to ${CMAKE_INSTALL_LIBDIR}

@cookpa cookpa marked this pull request as ready for review October 12, 2021 15:04
@cookpa cookpa marked this pull request as draft October 12, 2021 15:05
@cookpa
Copy link
Member

cookpa commented Oct 12, 2021

I think I've set all the variables correctly, but CMAKE_INSTALL_LIBDIR does not get propagated to the ANTS-build. A workaround is to go to ANTS-build and then

cmake -D CMAKE_INSTALL_LIBDIR=lib64 .
make install

I'm trying to figure out how to make ANTS use the Superbuild value

@gdevenyi
Copy link
Contributor Author

This is probably related to "make install" not working properly at the superbuild level, but rather needs to happen inside ANTS after the final build.

@cookpa
Copy link
Member

cookpa commented Oct 12, 2021

I'm thinking it is independently detecting CMAKE_INSTALL_LIBDIR=lib for my machine. Trying to add it to superbuild vars

@cookpa cookpa marked this pull request as ready for review October 14, 2021 18:06
@cookpa
Copy link
Member

cookpa commented Oct 14, 2021

OK I think that last commit does the trick, I can now build with VTK and send libs to lib64.

Update: I spoke too soon, I forgot to turn shared libs on. Trying again

@cookpa cookpa marked this pull request as draft October 14, 2021 20:54
@cookpa
Copy link
Member

cookpa commented Oct 16, 2021

I think I may have finally cracked it. Things were going wrong because when CMAKE_INSTALL_LIBDIR was lib64, ITK libs were going to staging/lib but VTK libs were going to staging/lib64. Now both stage to lib but then install to ${CMAKE_INSTALL_LIBDIR}.

I would be grateful if anyone could test this on a non-Mac OS system.

@gdevenyi
Copy link
Contributor Author

Builds and installs properly on Ubuntu 18.04

@cookpa cookpa marked this pull request as ready for review October 17, 2021 17:41
@cookpa cookpa merged commit 7bc7c9d into master Oct 17, 2021
cookpa added a commit that referenced this pull request Oct 17, 2021
@cookpa cookpa deleted the installLib64 branch October 18, 2021 14:22
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

Successfully merging this pull request may close these issues.

2 participants