Am 29.12.2010 21:47 schrieb David Cole:
>
> Variables inside functions inherit their values from the calling
> scope. If you need the value of the CMAKE_CURRENT_LIST_DIR in a
> function that points to the directory containing the file that the
> function is defined in, then you should do something
On Wed, Dec 29, 2010 at 2:27 PM, Johannes Wienke
wrote:
> Hey again,
>
> Am 29.12.2010 20:23 schrieb Johannes Wienke:
>> Am 29.12.2010 19:53 schrieb Michael Jackson:
>>> I don't understand what you mean by a "module". If you are in a
>>> CMakeLists.txt or *.cmake file that is being parsed by CMak
Hey again,
Am 29.12.2010 20:23 schrieb Johannes Wienke:
> Am 29.12.2010 19:53 schrieb Michael Jackson:
>> I don't understand what you mean by a "module". If you are in a
>> CMakeLists.txt or *.cmake file that is being parsed by CMake then you have
>> access to CMAKE_CURRENT_LIST_FILE. I think I
Am 29.12.2010 19:53 schrieb Michael Jackson:
>
> --
> Mike Jackson
>
> On Dec 29, 2010, at 1:51 PM, Johannes Wienke wrote:
>
>> Am 29.12.2010 19:22 schrieb Michael Jackson:
>>> You want to do something like this:
>>>
>>> # In the CMake file get the parent directory of the current
>>> # cmake fi
--
Mike Jackson
On Dec 29, 2010, at 1:51 PM, Johannes Wienke wrote:
> Am 29.12.2010 19:22 schrieb Michael Jackson:
>> You want to do something like this:
>>
>> # In the CMake file get the parent directory of the current
>> # cmake file that is being parsed
>> get_filename_component( CURRENT_DI
Am 29.12.2010 19:22 schrieb Michael Jackson:
> You want to do something like this:
>
> # In the CMake file get the parent directory of the current
> # cmake file that is being parsed
> get_filename_component( CURRENT_DIR ${CMAKE_CURRENT_LIST_FILE} ABSOLUTE)
>
> configure_file ( ${CURRENT_DIR}/Som
You want to do something like this:
# In the CMake file get the parent directory of the current
# cmake file that is being parsed
get_filename_component( CURRENT_DIR ${CMAKE_CURRENT_LIST_FILE} ABSOLUTE)
configure_file ( ${CURRENT_DIR}/SomeFile.h.in .. )
Is that what you were looking for?
_
Hi,
Sorry for bumping this, but has anyone got a cue how to do this in a
reliable and easy way?
Thanks,
Johannes
Am 23.12.2010 20:49 schrieb Johannes Wienke:
> I've got a library that provides several cmake modules and also uses
> them. Some of these modules have additional files, e.g. to be use
Hey,
I've got a library that provides several cmake modules and also uses
them. Some of these modules have additional files, e.g. to be used with
CONFIGURE_FILE. The question is, how do I locate these additional files
so that they work in both cases, in project and installed?
${CMAKE_ROOT}/Modules