Wireshark mailing list archives

Re: cmake / OSX - FindM.cmake


From: Edwin Groothuis <Edwin.Groothuis () riverbed com>
Date: Mon, 14 Mar 2016 21:54:52 +0000

Hmmm... 

cmake -DCMAKE_OSX_SYSROOT detects libpcap properly, but the tests build with it show that it failed to detect all the 
pcap_* functions because the test doesn't link the libpcap.dylib file.

But with the command line tools they get detected. Macosx-setup.sh should add a check for this to be installed.

Thanks for your help to the pointer!

Edwin

-----Original Message-----
From: wireshark-dev-bounces () wireshark org [mailto:wireshark-dev-bounces () wireshark org] On Behalf Of Guy Harris
Sent: Monday, 14 March 2016 14:39
To: Developer support list for Wireshark
Subject: Re: [Wireshark-dev] cmake / OSX - FindM.cmake

On Mar 13, 2016, at 8:27 PM, Edwin Groothuis <edwin.groothuis () riverbed com> wrote:

I got it. Invoking cmake as:
 
$ cmake 
-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/
 .
 
does do it cleanly. Also for PCAP. Also for ZLib.

Yes, those are all system-supplied libraries, at least in the "runtime" sense.  (For Linux people, think packages such 
as "libm", "libpcap", "zlib" or "libz", or whatever they're called on your distribution.)

The *header files*, however, are supplied as part of either Xcode or the command-line development tools.  (For Linux 
people, think the "XXX-dev" package corresponding to the "XXX" package, or whatever convention your distribution uses.  
For Windows, I guess think "SDK" or whatever it's called.)

If you only install the Shiny GUI IDE Xcode, you don't get /usr/include.  You *do* get command-line tools, but they're 
buried inside the Xcode application bundle, just as the headers are.

If you install the "command-line (development) tools", you get separate copies of the headers, command-line tools, 
etc., in the usual UN*X places.

You can install both.  I sincerely hope that Apple manages to keep them in sync with updates to Xcode and the 
command-line tools.

It Would Be Nice if CMake were to make an effort to provide a nice way to, on OS X, look in "the appropriate places" 
without requiring that you tell it where to look.  Perhaps we're all missing the right magical way to do that.
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe


Current thread: