Wireshark mailing list archives

Re: Status Cmake Win32 support


From: Graham Bloice <graham.bloice () trihedral com>
Date: Sun, 24 Nov 2013 19:45:07 +0000

I've now got tshark to build from a VS solution file, had to do some hacks
to get there though, patch files attached for others to peruse, as I'm not
sure if they are the optimal solutions:


   1. I had to add some MSC version definitions to CMakeLists.txt
   2. I had to remove some definitions from cmakeconfig.h.in for windows.
   The windows config.h produced for the normal nmake build is quite a bit
   different than the cmake produced one.  I've attached my patch to get the
   cmake build to work. Folks can check config.h.win32 to see the starting
   point for the normal nmake build.
   3. As mentioned in my previous message, the VS solution chops out every
   8192nd byte from the command line passed to make-dissector-reg.py.  My
   patch (make-reg.patch) gets CMake to write out the required source file
   list to a file and modifies the python script to read in the file.  The
   python changes *should* be backwards compatible.
   4. As I've moved over to building the GTK3 version, some CMake FindXXX
   modules had to be fixed, not entirely convinced by my changes here, but it
   works for me (Findxxx.patch).
   5. The current setpath method for fixing up paths to all the dll's and
   executables doesn't work for VS solution builds, as a solution will usually
   have multiple build configurations (Debug, Release, etc.) and the build
   artefacts go in different places depending on the build config used, e.g.
   builddir\Debug\tshark.exe, builddir\lib\Debug\libwireshark.dll.  As the
   build config is chosen at build time, not cmake generation time the paths
   required can't be generated by cmake.  I think we'll have to move to the
   normal nmake option of copying everything into a target directory.
   6. I have one warning in the tshark build:

Build succeeded.
       "E:\Wireshark\build\Wireshark.sln" (Executables\tshark target) (1) ->
       "E:\Wireshark\build\tshark.vcxproj.metaproj" (default target) (2) ->
       "E:\Wireshark\build\tshark.vcxproj" (default target) (16) ->
       (ClCompile target) ->
         ..\trunk\capture-wpcap.c(906): warning C4003: not enough actual
parameters for macro 'G_STRINGIFY_ARG' [E:\Wireshark\build\tshark.vcxproj]
    1 Warning(s)
    0 Error(s)
Time Elapsed 00:01:26.80

Onwards and upward, now to make dumpcap compile.

Attachment: CMakeLists.txt.patch
Description:

Attachment: cmakeconfig.h.in.patch
Description:

Attachment: make-reg.patch
Description:

Attachment: Findxxx.patch
Description:

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: