[CMake] How to make a ProjectConfig.cmake
Ian Monroe
ian at monroe.nu
Thu Dec 30 05:33:00 EST 2010
To create my QyotoConfig.cmake I need to know the full path of a
library so that I can set a variable like QYOTO_LIBRARY.
This is pretty standard requirement right? Its what we're supposed to
do in *Config.cmake's?
So anyways, how do I that? The only target property that hasn't
returned NOTFOUND is LOCATION, which unhelpfully returns the location
of the library in the build directory. I could parse this to get the
file name, and then append it to the library install location... but
that seems like such a hack. Feels like I'm doing something wrong if I
need to use a hack to do something standard.
I looked at install(EXPORT which could work, but it seems to include a
lot more information then is needed. I just want to set a variable
with the full path to a library.
Ian
More information about the CMake
mailing list