[CMake] Trying to build a winpcap programme

Bill Hoffman bill.hoffman at kitware.com
Mon May 3 21:38:32 EDT 2010


On 5/3/2010 2:30 PM, Mr Shore wrote:
> Hi all, I'm using winpcap for my project.
>
> The detailed steps to use it are here
> <http://www.winpcap.org/docs/docs_40_2/html/group__wpcapsamps.html> ,
> but I don't know whether cmake supports these two operations:
>
>     * If your program uses Win32 specific functions of WinPcap, remember
>       to include /WPCAP/ among the preprocessor definitions.
add_definitions(-DWPCAP)
>     * If your program uses the remote capture capabilities of WinPcap,
>       add / HAVE_REMOTE/ among the preprocessor definitions. Do /not/
>       include remote-ext.h directly in your source files.
add_definitions(-DHAVE_REMOTE)

find_library(WPCAPLIB wpcap)
target_link_library(mylib ${WPCAPLIB})


-Bill


More information about the CMake mailing list