clin...@elemtech.com wrote:

> 
> I'm playing with some of the new cmake 2.8.11 features and an example I
> saw had this:
> 
> set_property(TARGET foo PROPERTY
>        INTERFACE_INCLUDE_DIRECTORIES
>        "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR};
${CMAKE_CURRENT_SOURCE_DIR}>"
>        "$<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/include>"
>      )
> 
> I can see it put the expanded version of "${CMAKE_INSTALL_PREFIX}/include"
> in my export file, but I want it to be relocatable.  For example, if I use
> the CPack ZIP generator, the files can be unzipped anywhere. If I replace
> it with "$<INSTALL_INTERFACE:include>" , it complains about it being a
> relative path.

Indeed. The $<INSTALL_PREFIX> generator expression was created to address 
this issue. It expands to the ${_IMPORT_PREFIX}. Where did you see the 
example above? In an old commit message? It doesn't seem to be in the code:

$ git grep "INSTALL_PREFIX./include"
Tests/ExportImport/Export/CMakeLists.txt:        "$<INSTALL_INTERFACE:
$<INSTALL_PREFIX>/include/${_libName}>"
Tests/ExportImport/Export/CMakeLists.txt:  INTERFACE_INCLUDE_DIRECTORIES 
"$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/testSharedLibRequired>"
Tests/ExportImport/Export/CMakeLists.txt:  INTERFACE_INCLUDE_DIRECTORIES 
"$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/testSharedLibDepends>"
Tests/RunCMake/GeneratorExpression/BadInstallPrefix.cmake:  
$<INSTALL_PREFIX>/include


Thanks,

Steve.


--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to