[CMake] Finding Parent Directory for a Library

David Cole david.cole at kitware.com
Thu Jun 28 16:06:40 EDT 2007


GET_FILENAME_COMPONENT(dir "${MXADataModel_LIBRARY}" PATH)
will put the PATH into the variable 'dir'

HTH,
David

On 6/28/07, Mike Jackson <imikejackson at gmail.com> wrote:
>
> I need to get the Parent Directory for a library so I can add that
> directory to the LINK_DIRECTORIES().
>
> I have this so far:
>
>
> FIND_LIBRARY(MXADataModel_LIBRARY "MXADataModel"
>    /usr/local/lib
>    /usr/lib
>    "${MXA_DIR}/lib"
>    CACHE
> )
>
> Which will put the path to libMXADataModel.dylib" into the variable,
> How do I get its parent?
>
>
> --
> Mike Jackson
> imikejackson & gmail * com
>
>
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20070628/4908bc61/attachment.html


More information about the CMake mailing list