<div dir="auto">Our why doesn't cmake set a long needed standard here of .dll.lib and be done with this nonsense?</div><br><div class="gmail_quote"><div dir="ltr">On Thu, Mar 22, 2018, 11:58 PM P F via CMake <<a href="mailto:cmake@cmake.org">cmake@cmake.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Why not install shared libraries in one location and static libraries in another?<br>
<br>
> On Mar 21, 2018, at 4:55 AM, Mario Emmenlauer <<a href="mailto:mario@emmenlauer.de" target="_blank" rel="noreferrer">mario@emmenlauer.de</a>> wrote:<br>
><br>
><br>
> I've googled this issue for a while now but found only few<br>
> references (1,2) and no solution. I'd like to enforce that<br>
> find_package() will only accept static or shared libraries.<br>
> I would then set this option based on BUILD_SHARED_LIBS=(ON|OFF).<br>
><br>
> I.e. I'd love to have something like:<br>
> if(BUILD_SHARED_LIBS)<br>
> BUILD_TYPE="SHARED"<br>
> else()<br>
> BUILD_TYPE="STATIC"<br>
> endif()<br>
> find_package(XXX ${BUILD_TYPE})<br>
> find_package(YYY ${BUILD_TYPE})<br>
> find_package(ZZZ ${BUILD_TYPE})<br>
> ...<br>
><br>
><br>
> It seems that this does not exist? I could also not find a<br>
> good workaround. The best I can find is to use 'NAMES' and<br>
> add the static or shared library names manually.<br>
><br>
> This is not very suitable, because I have a project with more<br>
> than 30 dependencies. The project should either build (fully)<br>
> static or (fully) shared. I can not easily maintain lists of<br>
> 30 static and shared library names on several platforms.<br>
><br>
> Is there a solution or good workaround?<br>
><br>
> All the best,<br>
><br>
> Mario Emmenlauer<br>
><br>
><br>
> (1) <a href="https://cmake.org/pipermail/cmake/2012-September/052059.html" rel="noreferrer noreferrer" target="_blank">https://cmake.org/pipermail/cmake/2012-September/052059.html</a><br>
> (2) <a href="https://cmake.org/pipermail/cmake/2010-December/041326.html" rel="noreferrer noreferrer" target="_blank">https://cmake.org/pipermail/cmake/2010-December/041326.html</a><br>
><br>
><br>
> --<br>
> BioDataAnalysis GmbH, Mario Emmenlauer Tel. Buero: +49-89-74677203<br>
> Balanstr. 43 mailto: memmenlauer * <a href="http://biodataanalysis.de" rel="noreferrer noreferrer" target="_blank">biodataanalysis.de</a><br>
> D-81669 München <a href="http://www.biodataanalysis.de/" rel="noreferrer noreferrer" target="_blank">http://www.biodataanalysis.de/</a><br>
> --<br>
><br>
> Powered by <a href="http://www.kitware.com" rel="noreferrer 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 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 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 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 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 noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="https://cmake.org/mailman/listinfo/cmake" rel="noreferrer noreferrer" target="_blank">https://cmake.org/mailman/listinfo/cmake</a><br>
<br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer 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 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 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 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 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 noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://cmake.org/mailman/listinfo/cmake" rel="noreferrer noreferrer" target="_blank">https://cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div>