<div dir="ltr"><div><div>Hi Cedric,<br><br></div>It sounds like creating a package config file is exactly what you need.  When installed, a user will be able to consume your project with "find_package(Foo)".  That will locate and read the package config file which will create an imported target Foo::Foo.  This imported target will cary with it all of the necessary link dependency information.<br><br></div>See <a href="https://cmake.org/cmake/help/v3.6/manual/cmake-packages.7.html">https://cmake.org/cmake/help/v3.6/manual/cmake-packages.7.html</a> for more details.<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">- Chuck<br></div></div></div>
<br><div class="gmail_quote">On Tue, Jun 14, 2016 at 6:28 AM, Cedric Doucet <span dir="ltr"><<a href="mailto:cedric.doucet@inria.fr" target="_blank">cedric.doucet@inria.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:#000000"><div><br></div><div>Hello,</div><div><br></div><div>is there a native way to provide configuration settings for the users of a software?</div><div><br></div><div>For example, I develop a software which depends on several 3rd party libraries which are automatically downloaded and installed with the ExternalProject module.</div><div>My CMake configuration scripts are written so as to handle these 3rd party libraries.</div><div>During installation of the software, header files and libraries are copied to the destination directory but (of course) without their 3rd party dependencies.</div><div> </div><div>Therefore, if a user wants to use my software, he has to handle these 3rd party libraries during compilation and linking steps.</div><div>Depending on the skills of the user, it may be difficult to achieve it.</div><div><br></div><div>I would like to know if there exists a native way of providing sufficient configuration information so that users do not have to handle these libraries.</div><div>For the moment, I provide a CMakeLists template but I wonder if it's the best possible solution.</div><div><br></div><div>Best regards,</div><div><br></div><div>Cédric Doucet</div></div></div><br>--<br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a><br></blockquote></div><br></div>