Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
f8252702
Commit
f8252702
authored
May 10, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
3rdparty: integrate libjpeg-turbo build scripts into OpenCV
parent
77795392
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
51 additions
and
9 deletions
+51
-9
CMakeLists.txt
3rdparty/libjpeg-turbo/CMakeLists.txt
+0
-0
jconfig.h.in
3rdparty/libjpeg-turbo/jconfig.h.in
+2
-0
CMakeLists.txt
3rdparty/libtiff/CMakeLists.txt
+3
-0
readme.txt
3rdparty/readme.txt
+10
-2
CMakeLists.txt
CMakeLists.txt
+7
-1
OpenCVFindLibsGrfmt.cmake
cmake/OpenCVFindLibsGrfmt.cmake
+28
-5
CMakeLists.txt
modules/imgcodecs/CMakeLists.txt
+1
-1
No files found.
3rdparty/libjpeg-turbo/CMakeLists.txt
View file @
f8252702
This diff is collapsed.
Click to expand it.
3rdparty/libjpeg-turbo/jconfig.h.in
View file @
f8252702
...
@@ -48,4 +48,6 @@ typedef signed int INT32;
...
@@ -48,4 +48,6 @@ typedef signed int INT32;
#undef RIGHT_SHIFT_IS_UNSIGNED
#undef RIGHT_SHIFT_IS_UNSIGNED
#define SIZEOF_SIZE_T @SIZEOF_SIZE_T@
#endif /* JPEG_INTERNALS */
#endif /* JPEG_INTERNALS */
3rdparty/libtiff/CMakeLists.txt
View file @
f8252702
...
@@ -294,6 +294,9 @@ set(PIXARLOG_SUPPORT FALSE)
...
@@ -294,6 +294,9 @@ set(PIXARLOG_SUPPORT FALSE)
set
(
JPEG_SUPPORT FALSE
)
set
(
JPEG_SUPPORT FALSE
)
if
(
HAVE_JPEG
)
if
(
HAVE_JPEG
)
set
(
JPEG_SUPPORT TRUE
)
set
(
JPEG_SUPPORT TRUE
)
if
(
TARGET
${
JPEG_LIBRARY
}
AND DEFINED
${
JPEG_LIBRARY
}
_BINARY_DIR
)
include_directories
(
"
${${
JPEG_LIBRARY
}
_BINARY_DIR
}
"
)
endif
()
include_directories
(
${
JPEG_INCLUDE_DIR
}
)
include_directories
(
${
JPEG_INCLUDE_DIR
}
)
endif
()
endif
()
...
...
3rdparty/readme.txt
View file @
f8252702
...
@@ -6,12 +6,20 @@ In order to use these versions of libraries instead of system ones on UNIX syste
...
@@ -6,12 +6,20 @@ In order to use these versions of libraries instead of system ones on UNIX syste
should use BUILD_<library_name> CMake flags (for example, BUILD_PNG for the libpng library).
should use BUILD_<library_name> CMake flags (for example, BUILD_PNG for the libpng library).
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
libjpeg
The Independent JPEG Group's JPEG software.
libjpeg
(deprecated)
The Independent JPEG Group's JPEG software.
Copyright (C) 1991-2012, Thomas G. Lane, Guido Vollbeding.
Copyright (C) 1991-2012, Thomas G. Lane, Guido Vollbeding.
See IGJ home page http://www.ijg.org
See IGJ home page http://www.ijg.org
for details and links to the source code
for details and links to the source code
WITH_JPEG CMake option must be ON to add libjpeg support to imgcodecs.
libjpeg-turbo libjpeg-turbo is covered by three compatible BSD-style open source licenses.
Refer to [LICENSE.md](libjpeg-turbo/LICENSE.md) for a roll-up of license terms.
Site: https://github.com/libjpeg-turbo/libjpeg-turbo
API is compatible with original libjpeg.
WITH_JPEG CMake option must be ON to add libjpeg or libjpeg-turbo support to imgcodecs.
BUILD_JPEG=ON selects libjpeg-turbo by default (since OpenCV 3.4.2).
Enable BUILD_JPEG_TURBO_DISABLE=ON to force using of libjpeg (this option is removed in OpenCV 4.0).
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
libpng Portable Network Graphics library.
libpng Portable Network Graphics library.
The license and copyright notes can be found in libpng/LICENSE.
The license and copyright notes can be found in libpng/LICENSE.
...
...
CMakeLists.txt
View file @
f8252702
...
@@ -1165,7 +1165,13 @@ status(" Media I/O: ")
...
@@ -1165,7 +1165,13 @@ status(" Media I/O: ")
status
(
" ZLib:"
ZLIB_FOUND THEN
"
${
ZLIB_LIBRARIES
}
(ver
${
ZLIB_VERSION_STRING
}
)"
ELSE
"build (ver
${
ZLIB_VERSION_STRING
}
)"
)
status
(
" ZLib:"
ZLIB_FOUND THEN
"
${
ZLIB_LIBRARIES
}
(ver
${
ZLIB_VERSION_STRING
}
)"
ELSE
"build (ver
${
ZLIB_VERSION_STRING
}
)"
)
if
(
WITH_JPEG OR HAVE_JPEG
)
if
(
WITH_JPEG OR HAVE_JPEG
)
status
(
" JPEG:"
JPEG_FOUND THEN
"
${
JPEG_LIBRARY
}
(ver
${
JPEG_LIB_VERSION
}
)"
ELSE
"build (ver
${
JPEG_LIB_VERSION
}
)"
)
if
(
NOT HAVE_JPEG
)
status
(
" JPEG:"
NO
)
elseif
(
BUILD_JPEG
)
status
(
" JPEG:"
"build-
${
JPEG_LIBRARY
}
(ver
${
JPEG_LIB_VERSION
}
)"
)
else
()
status
(
" JPEG:"
"
${
JPEG_LIBRARY
}
(ver
${
JPEG_LIB_VERSION
}
)"
)
endif
()
endif
()
endif
()
if
(
WITH_WEBP OR HAVE_WEBP
)
if
(
WITH_WEBP OR HAVE_WEBP
)
...
...
cmake/OpenCVFindLibsGrfmt.cmake
View file @
f8252702
...
@@ -36,13 +36,36 @@ if(WITH_JPEG)
...
@@ -36,13 +36,36 @@ if(WITH_JPEG)
if
(
NOT JPEG_FOUND
)
if
(
NOT JPEG_FOUND
)
ocv_clear_vars
(
JPEG_LIBRARY JPEG_LIBRARIES JPEG_INCLUDE_DIR
)
ocv_clear_vars
(
JPEG_LIBRARY JPEG_LIBRARIES JPEG_INCLUDE_DIR
)
set
(
JPEG_LIBRARY libjpeg
)
if
(
NOT BUILD_JPEG_TURBO_DISABLE
)
set
(
JPEG_LIBRARIES
${
JPEG_LIBRARY
}
)
set
(
JPEG_LIBRARY libjpeg-turbo
)
add_subdirectory
(
"
${
OpenCV_SOURCE_DIR
}
/3rdparty/libjpeg"
)
set
(
JPEG_LIBRARIES
${
JPEG_LIBRARY
}
)
set
(
JPEG_INCLUDE_DIR
"
${${
JPEG_LIBRARY
}
_SOURCE_DIR
}
"
)
add_subdirectory
(
"
${
OpenCV_SOURCE_DIR
}
/3rdparty/libjpeg-turbo"
)
set
(
JPEG_INCLUDE_DIR
"
${${
JPEG_LIBRARY
}
_SOURCE_DIR
}
/src"
)
else
()
set
(
JPEG_LIBRARY libjpeg
)
set
(
JPEG_LIBRARIES
${
JPEG_LIBRARY
}
)
add_subdirectory
(
"
${
OpenCV_SOURCE_DIR
}
/3rdparty/libjpeg"
)
set
(
JPEG_INCLUDE_DIR
"
${${
JPEG_LIBRARY
}
_SOURCE_DIR
}
"
)
endif
()
endif
()
endif
()
ocv_parse_header
(
"
${
JPEG_INCLUDE_DIR
}
/jpeglib.h"
JPEG_VERSION_LINES JPEG_LIB_VERSION
)
macro
(
ocv_detect_jpeg_version header_file
)
if
(
NOT DEFINED JPEG_LIB_VERSION AND EXISTS
"
${
header_file
}
"
)
ocv_parse_header
(
"
${
header_file
}
"
JPEG_VERSION_LINES JPEG_LIB_VERSION
)
endif
()
endmacro
()
ocv_detect_jpeg_version
(
"
${
JPEG_INCLUDE_DIR
}
/jpeglib.h"
)
if
(
DEFINED CMAKE_CXX_LIBRARY_ARCHITECTURE
)
ocv_detect_jpeg_version
(
"
${
JPEG_INCLUDE_DIR
}
/
${
CMAKE_CXX_LIBRARY_ARCHITECTURE
}
/jconfig.h"
)
endif
()
# no needed for strict platform check here, both files 64/32 should contain the same version
ocv_detect_jpeg_version
(
"
${
JPEG_INCLUDE_DIR
}
/jconfig-64.h"
)
ocv_detect_jpeg_version
(
"
${
JPEG_INCLUDE_DIR
}
/jconfig-32.h"
)
ocv_detect_jpeg_version
(
"
${
JPEG_INCLUDE_DIR
}
/jconfig.h"
)
ocv_detect_jpeg_version
(
"
${${
JPEG_LIBRARY
}
_BINARY_DIR
}
/jconfig.h"
)
if
(
NOT DEFINED JPEG_LIB_VERSION
)
set
(
JPEG_LIB_VERSION
"unknown"
)
endif
()
set
(
HAVE_JPEG YES
)
set
(
HAVE_JPEG YES
)
endif
()
endif
()
...
...
modules/imgcodecs/CMakeLists.txt
View file @
f8252702
...
@@ -19,7 +19,7 @@ if(HAVE_PNG OR HAVE_TIFF OR HAVE_OPENEXR)
...
@@ -19,7 +19,7 @@ if(HAVE_PNG OR HAVE_TIFF OR HAVE_OPENEXR)
endif
()
endif
()
if
(
HAVE_JPEG
)
if
(
HAVE_JPEG
)
ocv_include_directories
(
${
JPEG_INCLUDE_DIR
}
)
ocv_include_directories
(
${
JPEG_INCLUDE_DIR
}
${${
JPEG_LIBRARY
}
_BINARY_DIR
}
)
list
(
APPEND GRFMT_LIBS
${
JPEG_LIBRARIES
}
)
list
(
APPEND GRFMT_LIBS
${
JPEG_LIBRARIES
}
)
endif
()
endif
()
...
...
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