aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorKovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>2009-08-30 08:51:43 +0000
committerKovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>2009-08-30 08:51:43 +0000
commit600a9a677bb7339b30be08c49b2b2ae9c177bb05 (patch)
treeeb33e363841119a5db51f9dfb195346915a3b5d1 /cmake
parent185a7a8ee85027b94143f15769478ef0216712ad (diff)
Add new windows cmake module finder
svn path=/trunk/; revision=29624
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/FindWSWIN32.cmake31
1 files changed, 31 insertions, 0 deletions
diff --git a/cmake/modules/FindWSWIN32.cmake b/cmake/modules/FindWSWIN32.cmake
new file mode 100644
index 0000000000..da6ab3dbae
--- /dev/null
+++ b/cmake/modules/FindWSWIN32.cmake
@@ -0,0 +1,31 @@
+# - Find packages bundled with Windows
+#
+
+IF(WIN32)
+
+SET(WIRESHARK_TARGET_PLATFORM "win32" CACHE STRING "Target platform (only win32/win64)")
+SET(WIRESHARK_LIBS "c:/wireshark-${WIRESHARK_TARGET_PLATFORM}-libs" CACHE PATH "Base directory, where your libraries reside")
+
+SET(GLIB_VERSION "2.0" CACHE PATH "GLib version")
+
+# GLib
+set(GLIB2_INCLUDE_DIRS
+ ${WIRESHARK_LIBS}/glib/include/glib-${GLIB_VERSION}
+ ${WIRESHARK_LIBS}/glib/lib/glib-${GLIB_VERSION}/include
+)
+set(GLIB2_LIBRARIES
+ ${WIRESHARK_LIBS}/glib/lib/glib-${GLIB_VERSION}.lib
+ ${WIRESHARK_LIBS}/glib/lib/gmodule-${GLIB_VERSION}.lib
+ ${WIRESHARK_LIBS}/glib/lib/gobject-${GLIB_VERSION}.lib
+ # XXX: Also include GThread lib for now
+ ${WIRESHARK_LIBS}/glib/lib/gthread-${GLIB_VERSION}.lib
+)
+
+# show the GLIB2_INCLUDE_DIRS and GLIB2_LIBRARIES variables only in the advanced view
+mark_as_advanced(GLIB2_INCLUDE_DIRS GLIB2_LIBRARIES)
+
+SET(WSWIN32_FOUND TRUE)
+SET(WSWIN32_INCLUDE_DIRS ${GLIB2_INCLUDE_DIRS})
+SET(WSWIN32_LIBRARIES ${GLIB2_LIBRARIES})
+
+ENDIF()