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

Fix #65: Provide cmake config file #91

Merged
merged 5 commits into from
Dec 20, 2013
Merged

Conversation

scpeters
Copy link
Member

I've created a cmake config file that will be populated at build
time with the installed location of include folders and libraries.
I also restored the FindSimbody cmake module.

This fixes #65.

I've created a cmake config file that will be populated at build
time with the installed location of include folders and libraries.
I also restored the FindSimbody cmake module.
Fix typo in SimbodyConfig.cmake.in
@@ -205,15 +52,15 @@ find_library(Simbody_STATIC_DEBUG_LIBRARY NAMES SimTKsimbody_static_d
# Set composite Simbody_LIBRARIES variable
set(LIBS)
if(Simbody_LIBRARY AND Simbody_DEBUG_LIBRARY)
foreach(libname IN LISTS Simbody_LIBRARY_LIST)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

festive code color-coding

@scpeters
Copy link
Member Author

This isn't working yet. I made a pull request because I thought it would make my testing easier, but I'm having a little trouble still. Sorry for the noise, I'll let you know when I think it's working.

I was missing some of the cmake standard error handling
@sherm1
Copy link
Member

sherm1 commented Dec 18, 2013

ok -- np

Otherwise the Simbody_ROOT_DIR is empty.
Do find_library for each simbody library that we put in
Simbody_LIBRARIES, so that it can give the absolute path
that is known at build time.
@scpeters
Copy link
Member Author

Ok, this took me a while, but I think it's working now. The main thing I wanted to change was to make the cmake configuration file provide the absolute paths to the installed libraries and include files, since this is known at build time. This is necessary if you have multiple simbody installations (I typically have one in /usr or /usr/local and then another in my home folder for development). It also resolves a logic issue in the FindSimbody.cmake file that was reported to bitbucket, related to the recent GNUInstallDirs changes.

@sherm1
Copy link
Member

sherm1 commented Dec 20, 2013

Steve and I discussed this -- there is still more to do but we'll call that a separate issue.

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.

Provide cmake config file instead of module
3 participants