[CMake] Protobuf Libraries not found on OS X

Michael Jackson mike.jackson at bluequartz.net
Fri Sep 4 15:01:25 EDT 2015


It _should_. I think this was a case of "operator" error. Not sure I defined CMAKE_PREFIX_PATH properly with the path to the protobuf libraries. I'll give that a try and I am sure that it will work properly.

Thanks for the sanity check
Mike J.

On Sep 4, 2015, at 2:59 PM, Daniel Schepler <dschepler at scalable-networks.com> wrote:

> Doesn't CMAKE_PREFIX_PATH work for you?
> -- 
> Daniel Schepler
> From: CMake [cmake-bounces at cmake.org] on behalf of Michael Jackson [mike.jackson at bluequartz.net]
> Sent: Friday, September 04, 2015 10:33 AM
> To: CMake list
> Subject: Re: [CMake] Protobuf Libraries not found on OS X
> 
> Odd, I built from source and there does not seem to be any way to add a custom search path (akin to QtDir or something like that) for the searching. I added a few lines to the FindProtobuf.cmake file to make it look for "Protobuf_DIR" as an environment variable. If I installed it into /usr/local I bit the default paths would find it.
> 
> I guess I could submit the patch as a bug report for the next version of CMake.
> 
> Thanks
> Mike Jackson
> On Sep 4, 2015, at 11:53 AM, Nils Guillermin <nils.guillermin at gmail.com> wrote:
> 
>> I'm on Mac OS X 10.10.4 and I use protobuf installed through homebrew.
>> 
>> Nils
>> 
>> On Thu, Sep 3, 2015 at 1:48 PM, Michael Jackson <mike.jackson at bluequartz.net> wrote:
>> I have compiled the Protocol Buffer library on OS X and I am using the following CMake code to try and find the compiled libraries:
>> 
>> find_package(Protobuf REQUIRED)
>> 
>> 
>> but when configuring I get the usual
>> 
>> CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
>> Please set them or make sure they are set and tested correctly in the CMake files:
>> PROTOBUF_LIBRARY (ADVANCED)
>> 
>> Looking at the FindProtobuf.cmake file that came with CMake 3.3.0 it looks like the module would ONLY work with MSVC built Protobuf libraries as the specific paths that are searched for are Visual Studio specific. Is this the correct behavior? Does anyone else use Protobuffers on OS X? I am thinking of rolling my on FindProtobuf.cmake file to have cmake look in more places.
>> 
>> ---
>> Mike Jackson
>> 
>> --
>> 
>> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150904/620430d8/attachment-0001.html>


More information about the CMake mailing list