ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] configure fails with cmake on macosx

From: "H.sivank" <hsivank@xxxxxxxxx>
Date: Tue, 28 Sep 2010 22:02:00 +0200
Hello,
Sorry to interfere in your conversation 

Le 28 sept. 2010 à 15:25, Joerg Mayer a écrit :

>> The default behavior for, for example, libcap should be "use it if it's available, don't use it if it's not", so that on non-Linux systems (which probably don't have libcap), it Just Works, and for Linux systems that lack libcap, it Just Works (by not building with libcap), and, for Linux systems that have libcap, it Just Works (by building with libcap).  It might be nice to allow the user to override that, but, if CMake doesn't make that easy, I'm inclined to make the default behavior the only available behavior (by explicitly setting CAP_OPTIONS to an empty string, so that REQUIRED is *NOT* one of the option).
> Yes, that would be another solution, but being able to specifiy the stuff on the
> command line might be another option.

This is the macro i use to automatically detect libs and include with my cmake projects. It is vey simple ... 
I'm not sure something similar is implemented into Wireshark.

Attachment: Macros.cmake
Description: Binary data


example:
in your CMakeLists.txt do :

have_includes(fcntl.h sys/time.h sys/types.h semaphore.h pthread.h)
have_function(select socket)

Hope it can help.

Hsivank