You can run configure_package_config_file twice with code:

SET(@PACKAGE@_LIBS @@PACKAGE@_LIBRARIES@)

Also you can use configure_file command to create one file and include it with config file that was made by configure_package_config_file:

# CMakeLists.txt
configure_file(FooVars.cmake.in FooVars.cmake)
configure_package_config_file(FooConfig.cmake.in FooConfig.cmake ...)

install(FILES FooVars.cmake FooConfig.cmake ...)

# FooConfig.cmake.in
include(relative/path/to/FooVars.cmake)


On 25-Sep-14 03:09, Nico Schlömer wrote:
Hi all,

I would like to use CONFIGURE_PACKAGE_CONFIG_FILE() [1] instead of
CONFIGURE_FILE() for my export configurations. Unfortunately, it seems
that CONFIGURE_PACKAGE_CONFIG_FILE() only supports the @ONLY syntax. I
do use nested variables names in the export configuration, though,
e.g.,
```
SET(${PACKAGE}_LIBS ${${PACKAGE}_LIBRARIES})
```
Any idea how to translate this line into @ONLY syntax? Any other ideas?

Cheers,
Nico


[1] http://www.cmake.org/cmake/help/v3.0/module/CMakePackageConfigHelpers.html

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to