Group :: Rede/Acesso Remoto
RPM: tigervnc
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: Ubuntu-0151-make-cmake-enable-options-mandatory-if-turned-on.patch
Download
Download
Description: Make cmake enable options mandatory if turned on.
Author: <unknown>
Index: pkg-tigervnc/CMakeLists.txt
===================================================================
--- pkg-tigervnc.orig/CMakeLists.txt
+++ pkg-tigervnc/CMakeLists.txt
@@ -141,8 +141,8 @@ find_package(ZLIB REQUIRED)
find_package(Pixman REQUIRED)
# Check for gettext
-option(ENABLE_NLS "Enable translation of program messages" ON)
-if(ENABLE_NLS)
+option(ENABLE_NLS "Enable translation of program messages")
+if(NOT DEFINED ENABLE_NLS OR ENABLE_NLS)
# Tools
find_package(Gettext)
@@ -176,8 +176,14 @@ if(ENABLE_NLS)
endif()
if(NOT GETTEXT_FOUND OR NOT ICONV_FOUND)
- message(WARNING "Gettext NOT found. Native Language Support disabled.")
- set(ENABLE_NLS 0)
+ if(DEFINED ENABLE_NLS)
+ message(FATAL_ERROR "Native Language Support requested, but gettext NOT found!")
+ else()
+ message(WARNING "Gettext NOT found. Native Language Support disabled.")
+ set(ENABLE_NLS 0)
+ endif()
+ else()
+ set(ENABLE_NLS 1)
endif()
endif()
@@ -261,13 +267,19 @@ if(UNIX AND NOT APPLE)
endif()
# Check for GNUTLS library
-option(ENABLE_GNUTLS "Enable protocol encryption and advanced authentication" ON)
-if(ENABLE_GNUTLS)
+option(ENABLE_GNUTLS "Enable protocol encryption and advanced authentication")
+if(NOT DEFINED ENABLE_GNUTLS OR ENABLE_GNUTLS)
find_package(GnuTLS)
if (GNUTLS_FOUND)
include_directories(${GNUTLS_INCLUDE_DIR})
add_definitions("-DHAVE_GNUTLS")
add_definitions(${GNUTLS_DEFINITIONS})
+ else()
+ if(DEFINED ENABLE_GNUTLS)
+ message(FATAL_ERROR "GnuTLS support requested, but library could not be found!")
+ else()
+ message(WARNING "GnuTLS NOT found. SSL support disabled.")
+ endif()
endif()
endif()