Fix for
authorjmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 1 Oct 2010 12:17:11 +0000 (12:17 +0000)
committerjmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 1 Oct 2010 12:17:11 +0000 (12:17 +0000)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4879
where the build would fail if no gtk2 development files
were found.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34308 f5534014-38df-0310-8fa8-9805f1628bb7

CMakeLists.txt

index 78436bf6ea6b46a5128139fe5db6c14df409c284..b916f877b12cd4f6ccccf95ea9ad98e99aa2c889 100644 (file)
@@ -405,11 +405,14 @@ endforeach()
 
 add_subdirectory( codecs )
 add_subdirectory( epan )
-add_subdirectory( gtk )
 add_subdirectory( tools/lemon )
 add_subdirectory( wiretap )
 add_subdirectory( wsutil )
 
+if(BUILD_wireshark and GTK2_FOUND)
+       add_subdirectory( gtk )
+endif()
+
 # Basedir where to install guides
 set(DOC_DIR "$ENV{docdir}")
 message(STATUS "docdir: ${DOC_DIR}")
@@ -619,7 +622,7 @@ set(LIBEPAN_LIBS
                ${M_LIBRARIES}
 )
 
-if(BUILD_wireshark)
+if(BUILD_wireshark and GTK2_FOUND)
        set(wireshark_LIBS
                ui
                ${GTK2_LIBRARIES}