Re: [CMake] Any portable way in CMake build tree to find Source tree path?

2013-01-28 Thread Kent Williams
Thanks for all your help. It does seem like you can spend a long time working with CMake (nearly 10 years for me) and still learn new things! On Sat, Jan 26, 2013 at 8:48 AM, Cory Quammen wrote: > Oops, I didn't know about that command. I tried it out, and it works > like a charm. > > Thanks fo

Re: [CMake] Any portable way in CMake build tree to find Source tree path?

2013-01-26 Thread Cory Quammen
Oops, I didn't know about that command. I tried it out, and it works like a charm. Thanks for pointing it out, Alex! Cory On Sat, Jan 26, 2013 at 3:25 AM, Alexander Neundorf wrote: > On Saturday 26 January 2013, Cory Quammen wrote: >> Kent, >> >> I have a CMake function that may be of interest

Re: [CMake] Any portable way in CMake build tree to find Source tree path?

2013-01-26 Thread Alexander Neundorf
On Saturday 26 January 2013, Cory Quammen wrote: > Kent, > > I have a CMake function that may be of interest to you (see attached file). > > For your purposes, use it as follows: > > GetCMakeCacheValue( "${ABC_BUILD_DIR}" ABC_SOURCE_DIR ) > > where the project against which you want to build is

Re: [CMake] Any portable way in CMake build tree to find Source tree path?

2013-01-25 Thread Cory Quammen
Kent, I have a CMake function that may be of interest to you (see attached file). For your purposes, use it as follows: GetCMakeCacheValue( "${ABC_BUILD_DIR}" ABC_SOURCE_DIR ) where the project against which you want to build is named "ABC". The first argument must always be the build director

Re: [CMake] Any portable way in CMake build tree to find Source tree path?

2013-01-25 Thread Jean-Christophe Fillion-Robin
Hi Kent, On all the platform, the build tree contains a CMakeCache.txt that will systematically contain the following text: FOO_SOURCE_DIR:STATIC=/path/to/foosource where FOO is the name of the project. You could simply check for the existence of "CMakeCache.txt", and extact the value usin

[CMake] Any portable way in CMake build tree to find Source tree path?

2013-01-25 Thread Kent Williams
I'm trying to write a Find.cmake file for a library that doesn't generate a proper Config.cmake file. The problem I'm trying to solve is how to build against a build tree instead of an install tree. On OS X and Windows (well, probably any Makefile generator) CMake helpfully adds CMakeDirectoryInf