On 02/08/2016 04:24 PM, Antonio Pérez Barrero wrote:
> Yes, it is possible, but currently it's not looking for the debug
> library with a different name, just in a different path that is
> unlikely to exist in a Unix system.
The fact that a separate find_library is called for it and the result
is stored in a separate (user-settable) cache entry means that it is
possible to get two different values. This convention is well established
in several find modules.
> Having the PROTOBUF_LIBRARIES variable getting the afore mentioned
> value messes up the client code using `find_package(Protobuf)` on Unix.
The only supported use for PROTOBUF_LIBRARIES is to pass it to
target_link_libraries, and that interprets the 'optimized' and 'debug'
keywords. This is shown in the module documentation example:
target_link_libraries(bar ${PROTOBUF_LIBRARIES})
The documentation makes no other guarantees about the variable value.
-Brad
--
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-developers