externalproject_add & install( target ... )

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

externalproject_add & install( target ... )

alexander.sizov
hello, world!
sorry for my english:
I have several libraries that come to me in archives compiled with their header files. for unpacking and configuring the primary method I use externalproject_add(). next, I need to install them and create configuration scripts for further importing into several projects using the find_package() method. however, in this script:
# ----------------------------------------
externalproject_add( libA_external ... )
add_library( libA STATIC IMPORTED )
set_target_properties( libA PROPERTIES IMPORTED_LOCATION ... )
install( TARGETS libA ... ) # <---- I got error: install TARGETS given target "libA" which does not exist in this directory.
# ----------------------------------------
how to write such a script so that a configuration file is automatically created for importing the library and headers with find_package()?
perhaps someone has an example?
thank you.

--

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:
https://cmake.org/mailman/listinfo/cmake