[cmake-developers] Adding the OpenRAVE library module

Rosen Diankov rosen.diankov at gmail.com
Fri Apr 15 08:49:57 EDT 2011


Hi Brad,

thanks for the answers! for now i'm not sure if i want to spend time
tweaking the LINK_INTERFACE_LIBRARIES property, it's getting a little
too complicated just to get exports working right.

i was reading this:

http://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/readme.txt

which says XXX_LIBRARY should not be used in the CMakeLists.txt. If
you meant something different with that comment, please make it more
clear, currently the interpretation i got was "deprecated"

since we're not doing any find_library(OpenRAVE) calls, does that mean
it is ok to use OpenRAVE_LIBRARY in my current setup? What would you
recommend?

As for the registry, I just checked my windows and i have this key

HKEY_LOCAL_MACHINE\\Software\\Kitware\\CMake 2.8.4

however the cmake documentation says to put package specific stuff into:

HKEY_LOCAL_MACHINE\\Software\\Kitware\\CMake\\Packages\\OpenRAVE

where version is ignored. Is this correct? i am just be setting the
prefix to be read as the default key right?

rosen,

2011/4/15 Brad King <brad.king at kitware.com>:
> On 04/15/2011 06:06 AM, Rosen Diankov wrote:
>> I wasn't really sure what changes are needed to use the new registry
>> functions you committed.
>
> No changes are needed to your config file or find module.  The command
> will look at the system package registry automatically.  It is up to
> your installer to set the registry value though.
>
>> is there a nightly build of cmake somewhere?
>
> http://www.cmake.org/files/dev/?C=M;O=D
>
>> in the -version.cmake file, PACKAGE_FIND_VERSION is not set when just
>> using find_package(OpenRAVE), therefore i had to enclose everything
>> with:
>
> It loads the file so that it can read the PACKAGE_VERSION to know what
> version has been found even if no specific version was requested.  You
> do not need to set PACKAGE_VERSION_COMPATIBLE or PACKAGE_VERSION_EXACT
> if no PACKAGE_FIND_VERSION is set on input because if no version is
> requested CMake does not check them.  Therefore you do not need the
> if/else/endif pattern.
>
> Also, the code
>
>  if( "${PACKAGE_FIND_VERSION}" EQUAL "0.3.0" )
>
> does not make sense because EQUAL only works with numerical values.
> It can compare individual integers but not 3-component versions.
> Use VERSION_LESS, VERSION_GREATER, or VERSION_EQUAL for that.
>
>> the wiki says to set foo_LIBRARY, where the cmake readme says _LIBRARY
>> is deprecated, _LIBRARIES should be used. which one is it?
>
> Nothing says that _LIBRARY id deprecated.  Where did you see that?
> The readme says that it should not be used as an *output* of the find
> module in the calling CMakeLists.txt file.  The individual _LIBRARY
> variables are for storing the results of find_library calls in the
> cache.  The mention of it on the wiki is only talking about how to
> report the result from a FindXXX module as an imported target.  That
> has nothing to do with package configuration files.
>
>> I read all the documentation on imported/exported targets, but there's
>> one thing i don't understand. Is this a replacement for configuration
>> files?
>
> They are complementary.  The config file in the install tree should
> load the targets file generated by install(EXPORT).  The config file
> in the build tree (if you support that) should load the targets file
> created by the export() command.
>
> http://www.cmake.org/Wiki/CMake/Tutorials/Packaging#Packaging_and_Exporting
>
>> Or are imported targets declared inside configuration files and
>> used in conjunction with OpenRAVE_LIBRARIES variables?
>
> Yes.  See above.
>
>> the libopenrave library links to static libraries, which will never be
>> exported from openrave, but i get the following message:
>>
>> CMake Error: INSTALL(EXPORT "openrave-targets" ...) includes target
>> "libopenrave" which requires target "crlibm" that is not in the export
>> set.
>
> CMake follows transitive link dependencies by default.  You can hide
> implementation details of a shared library by setting the property
> "LINK_INTERFACE_LIBRARIES" on it.
>
> http://www.cmake.org/cmake/help/cmake-2-8-docs.html#prop_tgt:LINK_INTERFACE_LIBRARIES
>
> -Brad
>



More information about the cmake-developers mailing list