diff options
Diffstat (limited to 'src/Build/CMakeLists.txt')
-rw-r--r-- | src/Build/CMakeLists.txt | 47 |
1 files changed, 28 insertions, 19 deletions
diff --git a/src/Build/CMakeLists.txt b/src/Build/CMakeLists.txt index f1a176c6..0c602f03 100644 --- a/src/Build/CMakeLists.txt +++ b/src/Build/CMakeLists.txt | |||
@@ -242,19 +242,24 @@ if ( ( PLATFORM STREQUAL "Debian" ) OR ( PLATFORM STREQUAL "Ubuntu" ) ) | |||
242 | set( CPACK_DEBIAN_PACKAGE_RELEASE ${CPACK_PACKAGE_RELEASE} ) | 242 | set( CPACK_DEBIAN_PACKAGE_RELEASE ${CPACK_PACKAGE_RELEASE} ) |
243 | set( CPACK_DEBIAN_PACKAGE_ARCHITECTURE ${ARCHITECTURE} ) # mandatory | 243 | set( CPACK_DEBIAN_PACKAGE_ARCHITECTURE ${ARCHITECTURE} ) # mandatory |
244 | 244 | ||
245 | # Link against gtk3 version of wxWidgets if >= Debian 10 or >= Ubuntu 18.04 | 245 | if (NOGUI) |
246 | # Otherwise, link against gtk2 version of wxWidgets | 246 | # We build wxWidgets statically so that we don't depend on any GTK library |
247 | if ( ( ( PLATFORM STREQUAL "Debian" ) AND ( PLATFORM_VERSION VERSION_GREATER_EQUAL "10" ) ) | 247 | set( CPACK_DEBIAN_PACKAGE_DEPENDS "libfuse2, dmsetup, sudo" ) |
248 | OR ( ( PLATFORM STREQUAL "Ubuntu" ) AND ( PLATFORM_VERSION VERSION_GREATER_EQUAL "18.04" ) ) ) | ||
249 | |||
250 | set( CPACK_DEBIAN_PACKAGE_DEPENDS "libwxgtk3.0-gtk3-0v5, libfuse2, dmsetup, sudo" ) | ||
251 | |||
252 | else () | 248 | else () |
253 | 249 | # Link against gtk3 version of wxWidgets if >= Debian 10 or >= Ubuntu 18.04 | |
254 | set( CPACK_DEBIAN_PACKAGE_DEPENDS "libwxgtk3.0-0v5, libfuse2, dmsetup, sudo" ) | 250 | # Otherwise, link against gtk2 version of wxWidgets |
251 | if ( ( ( PLATFORM STREQUAL "Debian" ) AND ( PLATFORM_VERSION VERSION_GREATER_EQUAL "10" ) ) | ||
252 | OR ( ( PLATFORM STREQUAL "Ubuntu" ) AND ( PLATFORM_VERSION VERSION_GREATER_EQUAL "18.04" ) ) ) | ||
253 | |||
254 | set( CPACK_DEBIAN_PACKAGE_DEPENDS "libwxgtk3.0-gtk3-0v5, libfuse2, dmsetup, sudo" ) | ||
255 | |||
256 | else () | ||
255 | 257 | ||
258 | set( CPACK_DEBIAN_PACKAGE_DEPENDS "libwxgtk3.0-0v5, libfuse2, dmsetup, sudo" ) | ||
259 | |||
260 | endif() | ||
256 | endif() | 261 | endif() |
257 | 262 | ||
258 | set( CPACK_DEBIAN_PACKAGE_MAINTAINER ${CONTACT} ) # mandatory | 263 | set( CPACK_DEBIAN_PACKAGE_MAINTAINER ${CONTACT} ) # mandatory |
259 | set( CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY} ) # mandatory | 264 | set( CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY} ) # mandatory |
260 | set( CPACK_DEBIAN_ARCHIVE_TYPE "gnutar") # mandatory | 265 | set( CPACK_DEBIAN_ARCHIVE_TYPE "gnutar") # mandatory |
@@ -284,19 +289,23 @@ elseif ( ( PLATFORM STREQUAL "CentOS" ) OR ( PLATFORM STREQUAL "openSUSE" ) ) | |||
284 | set( CPACK_RPM_PACKAGE_VENDOR ${CPACK_PACKAGE_VENDOR} ) # mandatory | 289 | set( CPACK_RPM_PACKAGE_VENDOR ${CPACK_PACKAGE_VENDOR} ) # mandatory |
285 | set( CPACK_RPM_PACKAGE_AUTOREQ "no" ) # disable automatic shared libraries dependency detection (most of the time buggy) | 290 | set( CPACK_RPM_PACKAGE_AUTOREQ "no" ) # disable automatic shared libraries dependency detection (most of the time buggy) |
286 | 291 | ||
287 | if ( PLATFORM STREQUAL "CentOS" ) | 292 | if (NOGUI) |
293 | set( CPACK_RPM_PACKAGE_REQUIRES "fuse, device-mapper, sudo" ) | ||
294 | else () | ||
295 | if ( PLATFORM STREQUAL "CentOS" ) | ||
296 | |||
297 | if ( DEFINED WITHGTK3 AND WITHGTK3 ) | ||
298 | set( CPACK_RPM_PACKAGE_REQUIRES "fuse, device-mapper, gtk3, sudo" ) | ||
299 | else () | ||
300 | set( CPACK_RPM_PACKAGE_REQUIRES "fuse, device-mapper, gtk2, sudo" ) | ||
301 | endif() | ||
302 | |||
303 | elseif ( PLATFORM STREQUAL "openSUSE" ) | ||
288 | 304 | ||
289 | if ( DEFINED WITHGTK3 AND WITHGTK3 ) | ||
290 | set( CPACK_RPM_PACKAGE_REQUIRES "fuse, device-mapper, gtk3, sudo" ) | ||
291 | else () | ||
292 | set( CPACK_RPM_PACKAGE_REQUIRES "fuse, device-mapper, gtk2, sudo" ) | 305 | set( CPACK_RPM_PACKAGE_REQUIRES "fuse, device-mapper, gtk2, sudo" ) |
293 | endif() | 306 | endif() |
294 | |||
295 | elseif ( PLATFORM STREQUAL "openSUSE" ) | ||
296 | |||
297 | set( CPACK_RPM_PACKAGE_REQUIRES "fuse, device-mapper, gtk2, sudo" ) | ||
298 | endif() | 307 | endif() |
299 | 308 | ||
300 | set( CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE ${RPM_PRERM}) # optional | 309 | set( CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE ${RPM_PRERM}) # optional |
301 | 310 | ||
302 | # Prevents CPack from generating file conflicts | 311 | # Prevents CPack from generating file conflicts |