Project P depends on library L. L comes with a module FindL.cmake, which is so complicated that we would not be able to adapt it to our needs.
On most platforms, users will build P from source, and dynamically link with L. For them, the line find_package(L REQUIRED) in P/CMakeLists.txt works fine. But now let's suppose users of platform W are unable to cope with binaries that depend on dynamic libraries. They want a fully self-contained executable. Therefore on this platform, we need to link P statically with L. Let's assume that a static binary of L is provided in an idiosyncratic location X/L.lib. So we need to inform CMake that we want static linkage, and where L.lib is located. What is the best way to do this? Shall we bypass find_package? Or shall we provide a location hint to find_package? Shall we hard-code the library location, or pass it as a command-line argument?
smime.p7s
Description: S/MIME Cryptographic Signature
-- 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