VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Build/CMakeLists.txt
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2024-06-26 01:31:23 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2024-06-26 01:31:23 +0200
commit6f295141911016171730330d8e8a8b65e901569e (patch)
treed89a7897b99f9988e2d22d8b08277971d9df1034 /src/Build/CMakeLists.txt
parentf934f45c2dac9a7e9599b6a97f50e5b9f26e5186 (diff)
downloadVeraCrypt-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.txt18
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()