aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2019-11-15 13:30:19 -0800
committerGerald Combs <gerald@wireshark.org>2019-11-15 22:34:06 +0000
commit7cc5f4c45f9792f2cd3d207efed48aa021bdffd4 (patch)
treed3250465db3a3b75708859f313acbcfa9aecd63a /cmake
parente624545b957ad3b6780088e37ddda872e1b23735 (diff)
CMake: Work correctly without Sparkle.
Set or clear SPARKLE_LIBRARIES and SPARKLE_INCLUDE_DIRS in FindSparkle.cmake, similar to what we do in other modules. Use them instead of SPARKLE_LIBRARY and SPARKLE_INCLUDE_DIR. Change-Id: I023c711edd6a44421aadf85413da3207d9b08e64 Reviewed-on: https://code.wireshark.org/review/35097 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/FindSparkle.cmake15
1 files changed, 12 insertions, 3 deletions
diff --git a/cmake/modules/FindSparkle.cmake b/cmake/modules/FindSparkle.cmake
index 7da80be0ea..5c14080d08 100644
--- a/cmake/modules/FindSparkle.cmake
+++ b/cmake/modules/FindSparkle.cmake
@@ -2,9 +2,9 @@
# Find the Sparkle framework
#
# This defines the following:
-# SPARKLE_FOUND - True if we found Sparkle
-# SPARKLE_INCLUDE_DIR - Path to Sparkle.h
-# SPARKLE_LIBRARY - Path to Sparkle.framework
+# SPARKLE_FOUND - True if we found Sparkle
+# SPARKLE_INCLUDE_DIRS - Path to Sparkle.h, empty if not found
+# SPARKLE_LIBRARIES - Path to Sparkle.framework, empty if not found
include(FindPackageHandleStandardArgs)
@@ -19,4 +19,13 @@ find_library(SPARKLE_LIBRARY NAMES Sparkle
)
find_package_handle_standard_args(Sparkle DEFAULT_MSG SPARKLE_INCLUDE_DIR SPARKLE_LIBRARY)
+
+if(SPARKLE_FOUND)
+ set(SPARKLE_LIBRARIES ${SPARKLE_LIBRARY} )
+ set(SPARKLE_INCLUDE_DIRS ${SPARKLE_INCLUDE_DIR} )
+else(SPARKLE_FOUND)
+ set(SPARKLE_LIBRARIES )
+ set(SPARKLE_INCLUDE_DIRS )
+endif(SPARKLE_FOUND)
+
mark_as_advanced(SPARKLE_INCLUDE_DIR SPARKLE_LIBRARY)