diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-11-07 16:51:41 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-11-07 16:51:41 +0200 |
commit | 7364e3e52e7bed9781493aedfb7be2a338146598 (patch) | |
tree | 7574144f6be79d489533e4bd3b551c80634e278e /Depends.cmake | |
parent | 159639b9f1d351a883127ff55ac93d814e430067 (diff) |
macOS: Use Sparkle for automatic updates
Diffstat (limited to 'Depends.cmake')
-rw-r--r-- | Depends.cmake | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/Depends.cmake b/Depends.cmake index 3faeca75..c6e4495f 100644 --- a/Depends.cmake +++ b/Depends.cmake | |||
@@ -146,15 +146,30 @@ else () | |||
146 | endif () | 146 | endif () |
147 | endif () | 147 | endif () |
148 | 148 | ||
149 | if (ENABLE_SPARKLE) | ||
150 | # macOS only. | ||
151 | add_library (sparkle INTERFACE) | ||
152 | set (SPARKLE_FRAMEWORK ${SPARKLE_DIR}/Sparkle.framework) | ||
153 | target_link_libraries (sparkle INTERFACE ${SPARKLE_FRAMEWORK}) | ||
154 | target_compile_definitions (sparkle INTERFACE LAGRANGE_ENABLE_SPARKLE=1) | ||
155 | message (STATUS "Using Sparkle: ${SPARKLE_FRAMEWORK}") | ||
156 | if (NOT SPARKLE_ARCH) | ||
157 | message (FATAL_ERROR "Set SPARKLE_ARCH to a CPU architecture ID (e.g., arm64)") | ||
158 | endif () | ||
159 | endif () | ||
160 | |||
149 | if (ENABLE_WINSPARKLE) | 161 | if (ENABLE_WINSPARKLE) |
150 | # We're assuming this is Windows. | 162 | # Windows only. |
151 | add_library (winsparkle INTERFACE) | 163 | add_library (winsparkle INTERFACE) |
152 | target_include_directories (winsparkle INTERFACE ${WINSPARKLE_DIR}/include) | 164 | target_include_directories (winsparkle INTERFACE ${WINSPARKLE_DIR}/include) |
153 | target_link_libraries (winsparkle INTERFACE ${WINSPARKLE_DIR}/x64/Release/WinSparkle.dll) | 165 | set (WINSPARKLE_DLL ${WINSPARKLE_DIR}/x64/Release/WinSparkle.dll) |
166 | target_link_libraries (winsparkle INTERFACE ${WINSPARKLE_DLL}) | ||
167 | target_compile_definitions (winsparkle INTERFACE LAGRANGE_ENABLE_WINSPARKLE=1) | ||
154 | install ( | 168 | install ( |
155 | PROGRAMS ${WINSPARKLE_DIR}/x64/Release/WinSparkle.dll | 169 | PROGRAMS ${WINSPARKLE_DLL} |
156 | DESTINATION . | 170 | DESTINATION . |
157 | ) | 171 | ) |
172 | message (STATUS "Using WinSparkle: ${WINSPARKLE_DLL}") | ||
158 | endif () | 173 | endif () |
159 | 174 | ||
160 | find_package (PkgConfig REQUIRED) | 175 | find_package (PkgConfig REQUIRED) |