[CMake] Trying to find a directory

Matthieu Brucher matthieu.brucher at gmail.com
Fri Nov 24 03:55:33 EST 2006


Why don't you use ${PROJECT_BINARY_DIR}/../bin ?

2006/11/24, Timo Rumland <cr at olympclan.de>:
>
> Hello,
>
> > Not sure to understand your need
> > but did you look at:
> >
> > IF(EXISTS file-name)
> > IF(EXISTS directory-name)
> > or
> > FILE(RELATIVE_PATH variable directory file)
> > or
> > GET_FILENAME_COMPONENT
>
> yes I did. Perhaps I have not explained my problem properly.
>
> My binary dir is "c:/project/test/buildfiles", the cmake variable
> ${PROJECT_BINARY_DIR} contains that automatically after I use the "PROJECT"
> command.
>
> Now I want to set the path where to build the project binaries, in my case
> it is "c:/project/test/bin", BUT I never know the beginning of that path
> ("c:/project/test"), because I can't say where the user is on his system.
>
> So I need to get the relative path "../bin" from "[whatever]/buildfiles"
> resulting in "[whatever]/bin".
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>



-- 
PS : Le club www.developpez.com met à disposition gratuitement tous les
services utiles aux développeurs : newsletter, magazine, actualités, cours,
tutoriels, articles, FAQ's, tests, comparatifs, débats, sondages, outils,
sources, composants et exemples de codes, les BLOGs des développeurs, et
l'hébergement gratuit de sites pour développeurs.
www.developpez.com est la communauté en langue française qui concentre le
plus de développeurs professionnels :
- Jusqu'à 80 000 visites par jour
- Plus de 900 000 développeurs distincts fréquentent au moins une fois par
mois www.developpez.com
- Le forum d'entraide des développeurs est le plus actif dans son domaine
avec plus de 5000 messages par jour
- La plus grande équipe de rédaction bénévole : plus de 200 auteurs.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20061124/a88c0eb6/attachment.htm


More information about the CMake mailing list