Wireshark-dev: [Wireshark-dev] cmake and tshark, without gtk

From: João Henrique Freitas <joaohf@xxxxxxxxx>
Date: Wed, 6 Apr 2011 21:36:00 -0300
Hi,

I am trying to make a receipe to use on yocto project (www.yoctoproject.org).

My target is on tshark, not wireshark (no gui).

I am using cmake build.

I disabled wireshark gui build with -DBUILD_wireshark option. But the
CMakeLists.txt includes the 'gtk' directory. I think this is not
right.

This patch fix it:

--- CMakeLists.txt      2011-03-01 14:06:13.000000000 -0300
+++ /home_local/usuario/w/CMakeLists.txt        2011-04-06
21:44:12.000000000 -0300
@@ -224,6 +224,9 @@
        set(PACKAGELIST GTK2 ${PACKAGELIST})
        set(GTK2_OPTIONS COMPONENTS gtk)
        set(GTK2_DEBUG false)
+    set(GTK2_BUILD true)
+else()
+    set(GTK2_BUILD false)
 endif()

 # SMI SNMP
@@ -388,7 +391,9 @@

 add_subdirectory( codecs )
 add_subdirectory( epan )
-add_subdirectory( gtk )
+if(GTK2_BUILD)
+    add_subdirectory( gtk )
+endif()
 add_subdirectory( tools/lemon )
 add_subdirectory( wiretap )
 add_subdirectory( wsutil )

Thanks.


-- 
-----------------------------------------------------------
João Henrique Freitas - joaohf_at_gmail.com
Campinas-SP-Brasil
BSD051283
LPI 1
http://www.joaohfreitas.eti.br