Hi,

I'm working for the Compiz project[1] and have just finished
implementing a CMake buildsystem.

Currently, we are linking "plugins" to an executable and various
internal libraries by passing their paths within the build tree to
library_dirs (). While this shows up in the linker command line
correctly, it seems that the libraries don't actually link (upon
inspection with ldd).

The only solution I've found so far is to use something like:

        set_target_properties (
            ${plugin} PROPERTIES
            INSTALL_RPATH_USE_LINK_PATH 1
            BUILD_WITH_INSTALL_RPATH 1
            SKIP_BUILD_RPATH 0
            COMPILE_FLAGS "${${_PLUGIN}_CFLAGSADD}"
            LINK_FLAGS "${${_PLUGIN}_LDFLAGSADD}"
        )

See [2]

and

    set_target_properties (
      ${plugin} PROPERTIES
      INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib
    )

See [3]

Unfortunately, fedora and debian both strictly prohibit the use of
rpath in their packaging guidelines. Is there any way I could get
these libraries to link properly without the use of setting RPATH?

Kind Regards,

Sam.

[1] www.compiz.org
[2] http://git.compiz.org/compiz/core/tree/cmake/CompizPlugin.cmake#n384
[3] http://git.compiz.org/compiz/core/tree/plugins/decor/CMakeLists.txt#n7

-- 
Sam Spilsbury
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to