[CMake] Removing debug and optimized prefixes

Alvaro Aguilera alvaro.aguilera at gmail.com
Thu Aug 15 10:05:28 EDT 2013


you are right!

Thank you
Alvaro


On Do 15 Aug 2013 15:16:04 CEST, Rolf Eike Beer wrote:
> Am 15.08.2013 14:03, schrieb Alvaro Aguilera:
>> Thank you for responding.
>>
>> I found out that the problem was in the FindProtobuf module shipped with
>> opensuse.
>> As a workaround I'm using the following line after
>> find_package(Protobuf):
>>
>> list(REMOVE_ITEM PROTOBUF_LIBRARIES "debug" "optimized")
>>
>> Here are the calls to add_library() and target_link_libraries(), just
>> for the record:
>>
>> --------------------------
>> add_library(
>>     mytarget SHARED
>>     some-code.cpp
>>     "${PROTO_SRCS}"
>>     "${PROTO_HDRS}"
>> )
>>
>> target_link_libraries(
>>     mytarget
>>     "${PROTOBUF_LIBRARIES}"
>>     "${Boost_LIBRARIES}"
>> )
>
> Remove the quotes, then it will work.
>
> target_link_libraries(
>     mytarget
>     ${PROTOBUF_LIBRARIES}
>     ${Boost_LIBRARIES}
> )
>
> Greetings,
>
> Eike
> --
>
> 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://www.cmake.org/mailman/listinfo/cmake




More information about the CMake mailing list