[CMake] Installed project with shared libs

Chris Scharver scharver at gmail.com
Fri Feb 24 17:11:03 EST 2006


Thanks for the quick fix! I built a shared library with the install
name and everything worked!

ADD_LIBRARY(quanta SHARED ${QUANTA_SOURCES})
SET_TARGET_PROPERTIES(quanta PROPERTIES
    INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib"
    BUILD_WITH_INSTALL_RPATH ON
)
INSTALL_TARGETS(/lib quanta)

I did have to duplicate the install directory for both
INSTALL_NAME_DIR and INSTALL_TARGETS. That's not a big issue, as it's
easy to work with while maintaining flexibility for @executable_path
names.

Now to try it with my VTK install. :)

Thanks!
Chris


More information about the CMake mailing list