diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2024-06-26 01:31:23 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2024-06-26 01:31:23 +0200 |
commit | 6f295141911016171730330d8e8a8b65e901569e (patch) | |
tree | d89a7897b99f9988e2d22d8b08277971d9df1034 /src/Build/CMakeLists.txt | |
parent | f934f45c2dac9a7e9599b6a97f50e5b9f26e5186 (diff) | |
download | VeraCrypt-6f295141911016171730330d8e8a8b65e901569e.tar.gz VeraCrypt-6f295141911016171730330d8e8a8b65e901569e.zip |
Linux/FreeBSD: automatically detect presence of GTK3. Remove WITHGTK3 makefile argument.
Diffstat (limited to 'src/Build/CMakeLists.txt')
-rw-r--r-- | src/Build/CMakeLists.txt | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/Build/CMakeLists.txt b/src/Build/CMakeLists.txt index a06b1761..345db88b 100644 --- a/src/Build/CMakeLists.txt +++ b/src/Build/CMakeLists.txt @@ -318,17 +318,13 @@ elseif ( ( PLATFORM STREQUAL "CentOS" ) OR ( PLATFORM STREQUAL "openSUSE" ) ) if (NOGUI) set( CPACK_RPM_PACKAGE_REQUIRES "fuse, device-mapper, sudo" ) else () - if ( PLATFORM STREQUAL "CentOS" ) - - if ( DEFINED WITHGTK3 AND WITHGTK3 ) - set( CPACK_RPM_PACKAGE_REQUIRES "fuse, device-mapper, gtk3, sudo, pcsc-lite" ) - else () - set( CPACK_RPM_PACKAGE_REQUIRES "fuse, device-mapper, gtk2, sudo, pcsc-lite" ) - endif() - - elseif ( PLATFORM STREQUAL "openSUSE" ) - - set( CPACK_RPM_PACKAGE_REQUIRES "fuse, device-mapper, gtk2, sudo, pcsc-lite" ) + find_package(PkgConfig REQUIRED) + pkg_check_modules(GTK3 gtk+-3.0) + + if(GTK3_FOUND) + set( CPACK_RPM_PACKAGE_REQUIRES "fuse, device-mapper, gtk3, sudo, pcsc-lite" ) + else() + set( CPACK_RPM_PACKAGE_REQUIRES "fuse, device-mapper, gtk2, sudo, pcsc-lite" ) endif() endif() |