summaryrefslogtreecommitdiff
path: root/cmake/modules/FindWinSparkle.cmake
diff options
context:
space:
mode:
authorGraham Bloice <graham.bloice@trihedral.com>2014-08-20 22:29:33 +0100
committerGraham Bloice <graham.bloice@trihedral.com>2014-08-22 22:04:33 +0000
commit06565a742411b3d5307cab70a85d5f196073eb90 (patch)
tree747a4255c35e0344d7661ec7c52d490b715180ea /cmake/modules/FindWinSparkle.cmake
parent863b6646d6995b7f0a7c70aad845c7bb3f00dbc7 (diff)
downloadwireshark-06565a742411b3d5307cab70a85d5f196073eb90.tar.gz
Add WinSparkle to the CMake build to bring it into line with
the nmake build Change-Id: I944d0fe15b396cad4d0054b6fc359acb42ae3c9c Reviewed-on: https://code.wireshark.org/review/3755 Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Diffstat (limited to 'cmake/modules/FindWinSparkle.cmake')
-rw-r--r--cmake/modules/FindWinSparkle.cmake35
1 files changed, 35 insertions, 0 deletions
diff --git a/cmake/modules/FindWinSparkle.cmake b/cmake/modules/FindWinSparkle.cmake
new file mode 100644
index 0000000000..8680b1a648
--- /dev/null
+++ b/cmake/modules/FindWinSparkle.cmake
@@ -0,0 +1,35 @@
+#
+# - Find WinSparkle
+# Find the native WinSparkle includes and library
+#
+# WINSPARKLE_INCLUDE_DIRS - where to find WinSparkle.h, etc.
+# WINSPARKLE_LIBRARIES - List of libraries when using WinSparkle.
+# WINSPARKLE_FOUND - True if WinSparkle found.
+
+
+IF (WINSPARKLE_INCLUDE_DIRS)
+ # Already in cache, be silent
+ SET(WINSPARKLE_FIND_QUIETLY TRUE)
+ENDIF (WINSPARKLE_INCLUDE_DIRS)
+
+INCLUDE(FindWSWinLibs)
+FindWSWinLibs("WinSparkle-.*" "WINSPARKLE_HINTS")
+
+FIND_PATH(WINSPARKLE_INCLUDE_DIR winsparkle.h HINTS "${WINSPARKLE_HINTS}" )
+
+FIND_LIBRARY(WINSPARKLE_LIBRARY NAMES WinSparkle HINTS "${WINSPARKLE_HINTS}" )
+
+# handle the QUIETLY and REQUIRED arguments and set WINSPARKLE_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(WINSPARKLE DEFAULT_MSG WINSPARKLE_LIBRARY WINSPARKLE_INCLUDE_DIR)
+
+IF(WINSPARKLE_FOUND)
+ SET(WINSPARKLE_LIBRARIES ${WINSPARKLE_LIBRARY} )
+ SET(WINSPARKLE_INCLUDE_DIRS ${WINSPARKLE_INCLUDE_DIR} )
+ELSE(WINSPARKLE_FOUND)
+ SET(WINSPARKLE_LIBRARIES )
+ SET(WINSPARKLE_INCLUDE_DIRS )
+ENDIF(WINSPARKLE_FOUND)
+
+MARK_AS_ADVANCED( WINSPARKLE_LIBRARIES WINSPARKLE_INCLUDE_DIRS )