[cmake-developers] [PATCH] FindProtobuf: prevent redundant PROTOBUF_LIBRARIES
Rolf Eike Beer
eike at sf-mail.de
Wed Feb 10 13:50:00 EST 2016
Am Mittwoch, 10. Februar 2016, 10:36:31 schrieb Antonio Perez Barrero:
> Before this change, the variable PROTOBUF_LIBRARIES might get redundant
> value for debug and optimized configurations, e.g.
> 'optimized;/usr/lib/libprotobuf.so;debug;/usr/lib/libprotobuf.so'
> ---
> Modules/FindProtobuf.cmake | 18 ++++++------------
> 1 file changed, 6 insertions(+), 12 deletions(-)
>
> diff --git a/Modules/FindProtobuf.cmake b/Modules/FindProtobuf.cmake
> index 2f13b09..57c6e62 100644
> --- a/Modules/FindProtobuf.cmake
> +++ b/Modules/FindProtobuf.cmake
> @@ -213,6 +213,8 @@ endif()
> # Internal function: search for normal library as well as a debug one
> # if the debug one is specified also include debug/optimized keywords
> # in *_LIBRARIES variable
> +include(SelectLibraryConfigurations)
For modules that are part of CMake use
include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
This makes sure exactly the version of SLC the module was designed to use will
be used, i.e. those shipped with the exact same version of CMake.
Greetings,
Eike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20160210/927037c1/attachment.sig>
More information about the cmake-developers
mailing list