Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
libvncserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
libvncserver
Commits
729e965d
Commit
729e965d
authored
Mar 23, 2012
by
DRC
Committed by
Christian Beier
Mar 26, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extend support for the new TurboVNC encoder to the CMake build system
parent
7124b5fb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
2 deletions
+39
-2
CMakeLists.txt
CMakeLists.txt
+39
-2
No files found.
CMakeLists.txt
View file @
729e965d
...
@@ -5,6 +5,9 @@ include(CheckFunctionExists)
...
@@ -5,6 +5,9 @@ include(CheckFunctionExists)
include
(
CheckIncludeFile
)
include
(
CheckIncludeFile
)
include
(
CheckTypeSize
)
include
(
CheckTypeSize
)
include
(
TestBigEndian
)
include
(
TestBigEndian
)
include
(
CheckCSourceCompiles
)
include
(
CheckCXXSourceCompiles
)
include
(
CheckCSourceRuns
)
set
(
PACKAGE_NAME
"LibVNCServer"
)
set
(
PACKAGE_NAME
"LibVNCServer"
)
set
(
FULL_PACKAGE_NAME
"LibVNCServer"
)
set
(
FULL_PACKAGE_NAME
"LibVNCServer"
)
...
@@ -30,6 +33,40 @@ find_package(X11)
...
@@ -30,6 +33,40 @@ find_package(X11)
find_package
(
OpenSSL
)
find_package
(
OpenSSL
)
find_library
(
LIBGCRYPT_LIBRARIES gcrypt
)
find_library
(
LIBGCRYPT_LIBRARIES gcrypt
)
# Check whether the version of libjpeg we found was libjpeg-turbo and print a
# warning if not.
set
(
CMAKE_REQUIRED_LIBRARIES
${
JPEG_LIBRARIES
}
)
set
(
CMAKE_REQUIRED_FLAGS -I
${
JPEG_INCLUDE_DIR
}
)
set
(
JPEG_TEST_SOURCE
"
\n
#include <stdio.h>
\n
#include <jpeglib.h>
\n
int main(void) {
\n
struct jpeg_compress_struct cinfo;
\n
struct jpeg_error_mgr jerr;
\n
cinfo.err=jpeg_std_error(&jerr);
\n
jpeg_create_compress(&cinfo);
\n
cinfo.input_components = 3;
\n
jpeg_set_defaults(&cinfo);
\n
cinfo.in_color_space = JCS_EXT_RGB;
\n
jpeg_default_colorspace(&cinfo);
\n
return 0;
\n
}"
)
if
(
CMAKE_CROSSCOMPILING
)
check_c_source_compiles
(
"
${
JPEG_TEST_SOURCE
}
"
FOUND_LIBJPEG_TURBO
)
else
()
check_c_source_runs
(
"
${
JPEG_TEST_SOURCE
}
"
FOUND_LIBJPEG_TURBO
)
endif
()
set
(
CMAKE_REQUIRED_LIBRARIES
)
set
(
CMAKE_REQUIRED_FLAGS
)
set
(
CMAKE_REQUIRED_DEFINITIONS
)
if
(
NOT FOUND_LIBJPEG_TURBO
)
message
(
WARNING
"*** The libjpeg library you are building against is not libjpeg-turbo. Performance will be reduced. You can obtain libjpeg-turbo from: https://sourceforge.net/projects/libjpeg-turbo/files/ ***"
)
endif
()
set
(
CMAKE_REQUIRED_LIBRARIES resolv
)
set
(
CMAKE_REQUIRED_LIBRARIES resolv
)
check_function_exists
(
__b64_ntop HAVE_B64
)
check_function_exists
(
__b64_ntop HAVE_B64
)
...
@@ -166,13 +203,13 @@ endif(ZLIB_FOUND)
...
@@ -166,13 +203,13 @@ endif(ZLIB_FOUND)
if
(
JPEG_FOUND
)
if
(
JPEG_FOUND
)
add_definitions
(
-DLIBVNCSERVER_HAVE_LIBJPEG
)
add_definitions
(
-DLIBVNCSERVER_HAVE_LIBJPEG
)
include_directories
(
${
JPEG_INCLUDE_DIR
}
)
include_directories
(
${
JPEG_INCLUDE_DIR
}
)
set
(
TIGHT_C
${
LIBVNCSERVER_DIR
}
/tight.c
)
set
(
TIGHT_C
${
LIBVNCSERVER_DIR
}
/tight.c
${
COMMON_DIR
}
/turbojpeg.c
)
endif
(
JPEG_FOUND
)
endif
(
JPEG_FOUND
)
if
(
PNG_FOUND
)
if
(
PNG_FOUND
)
add_definitions
(
-DLIBVNCSERVER_HAVE_LIBPNG
)
add_definitions
(
-DLIBVNCSERVER_HAVE_LIBPNG
)
include_directories
(
${
PNG_INCLUDE_DIR
}
)
include_directories
(
${
PNG_INCLUDE_DIR
}
)
set
(
TIGHT_C
${
LIBVNCSERVER_DIR
}
/tight.c
)
set
(
TIGHT_C
${
LIBVNCSERVER_DIR
}
/tight.c
${
COMMON_DIR
}
/turbojpeg.c
)
endif
(
PNG_FOUND
)
endif
(
PNG_FOUND
)
set
(
LIBVNCSERVER_SOURCES
set
(
LIBVNCSERVER_SOURCES
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment