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
a8f0c933
Commit
a8f0c933
authored
Feb 24, 2012
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modified zlib search. Use system zlib on Android by default
parent
b12f1853
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
36 deletions
+33
-36
CMakeLists.txt
3rdparty/CMakeLists.txt
+0
-3
CMakeLists.txt
3rdparty/libpng/CMakeLists.txt
+1
-6
CMakeLists.txt
3rdparty/zlib/CMakeLists.txt
+9
-11
CMakeLists.txt
CMakeLists.txt
+21
-5
CMakeLists.txt
modules/core/CMakeLists.txt
+0
-4
CMakeLists.txt
modules/highgui/CMakeLists.txt
+2
-7
No files found.
3rdparty/CMakeLists.txt
View file @
a8f0c933
if
(
NOT ZLIB_FOUND
)
add_subdirectory
(
zlib
)
endif
()
if
(
WITH_JASPER AND NOT JASPER_FOUND
)
add_subdirectory
(
libjasper
)
endif
()
...
...
3rdparty/libpng/CMakeLists.txt
View file @
a8f0c933
...
...
@@ -7,12 +7,7 @@ project(libpng)
# List of C++ files:
include_directories
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
"
)
if
(
ZLIB_FOUND
)
include_directories
(
${
ZLIB_INCLUDE_DIR
}
)
else
()
include_directories
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/../zlib"
)
endif
()
include_directories
(
${
ZLIB_INCLUDE_DIR
}
)
file
(
GLOB lib_srcs *.c
)
file
(
GLOB lib_hdrs *.h
)
...
...
3rdparty/zlib/CMakeLists.txt
View file @
a8f0c933
...
...
@@ -37,11 +37,11 @@ if(MSVC)
endif
()
configure_file
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/zconf.h.cmakein"
"
${
OpenCV
_BINARY_DIR
}
/zconf.h"
@ONLY
)
include_directories
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
"
)
"
${
CMAKE_CURRENT
_BINARY_DIR
}
/zconf.h"
@ONLY
)
include_directories
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
"
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
)
set
(
ZLIB_PUBLIC_HDRS
"
${
OpenCV
_BINARY_DIR
}
/zconf.h"
"
${
CMAKE_CURRENT
_BINARY_DIR
}
/zconf.h"
zlib.h
)
set
(
ZLIB_PRIVATE_HDRS
...
...
@@ -73,10 +73,8 @@ set(ZLIB_SRCS
zutil.c
)
set
(
the_target
"zlib"
)
add_library
(
${
the_target
}
STATIC
${
ZLIB_SRCS
}
${
ZLIB_PUBLIC_HDRS
}
${
ZLIB_PRIVATE_HDRS
}
)
set_target_properties
(
${
the_target
}
PROPERTIES DEFINE_SYMBOL ZLIB_DLL
)
add_library
(
${
ZLIB_LIBRARY
}
STATIC
${
ZLIB_SRCS
}
${
ZLIB_PUBLIC_HDRS
}
${
ZLIB_PRIVATE_HDRS
}
)
set_target_properties
(
${
ZLIB_LIBRARY
}
PROPERTIES DEFINE_SYMBOL ZLIB_DLL
)
if
(
UNIX
)
if
(
CMAKE_COMPILER_IS_GNUCXX OR CV_ICC
)
...
...
@@ -88,16 +86,16 @@ if(MSVC)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
/wd4013"
)
endif
()
set_target_properties
(
${
the_target
}
PROPERTIES
OUTPUT_NAME
"
${
the_target
}
"
set_target_properties
(
${
ZLIB_LIBRARY
}
PROPERTIES
OUTPUT_NAME
${
ZLIB_LIBRARY
}
DEBUG_POSTFIX
"
${
OPENCV_DEBUG_POSTFIX
}
"
ARCHIVE_OUTPUT_DIRECTORY
"
${
CMAKE_BINARY_DIR
}
/3rdparty/
${
OPENCV_LIB_INSTALL_PATH
}
"
)
if
(
ENABLE_SOLUTION_FOLDERS
)
set_target_properties
(
${
the_target
}
PROPERTIES FOLDER
"3rdparty"
)
set_target_properties
(
${
ZLIB_LIBRARY
}
PROPERTIES FOLDER
"3rdparty"
)
endif
()
if
(
NOT BUILD_SHARED_LIBS
)
install
(
TARGETS
${
the_target
}
ARCHIVE DESTINATION share/OpenCV/3rdparty/
${
OPENCV_LIB_INSTALL_PATH
}
COMPONENT main
)
install
(
TARGETS
${
ZLIB_LIBRARY
}
ARCHIVE DESTINATION share/OpenCV/3rdparty/
${
OPENCV_LIB_INSTALL_PATH
}
COMPONENT main
)
endif
()
CMakeLists.txt
View file @
a8f0c933
...
...
@@ -148,6 +148,9 @@ OCV_OPTION(BUILD_TESTS "Build accuracy & regression tests"
OCV_OPTION
(
BUILD_WITH_DEBUG_INFO
"Include debug info into debug libs"
ON
)
OCV_OPTION
(
BUILD_WITH_STATIC_CRT
"Enables use of staticaly linked CRT for staticaly linked OpenCV"
ON IF MSVC
)
# 3rdparty libs
OCV_OPTION
(
BUILD_ZLIB
"Build zlib from source instead of installed in the system"
WIN32 OR IOS
)
if
(
WIN32 OR ANDROID
)
set
(
OPENCV_BUILD_3RDPARTY_LIBS TRUE CACHE INTERNAL
"Build 3rd party libraries"
)
else
()
...
...
@@ -424,7 +427,6 @@ endif()
if
(
UNIX OR WIN32
)
if
(
NOT OPENCV_BUILD_3RDPARTY_LIBS
)
message
(
STATUS
"NOT OPENCV_BUILD_3RDPARTY_LIBS **************************************************"
)
include
(
FindZLIB
)
if
(
WITH_PNG
)
include
(
FindPNG
)
if
(
PNG_FOUND
)
...
...
@@ -468,12 +470,26 @@ if(WITH_JASPER AND NOT JASPER_FOUND)
set
(
JASPER_LIBRARIES libjasper
)
endif
()
if
(
NOT ZLIB_FOUND
)
set
(
ZLIB_LIBRARY zlib
)
################### zlib - always required
if
(
NOT BUILD_ZLIB
)
if
(
ANDROID
)
set
(
ZLIB_FOUND TRUE
)
set
(
ZLIB_LIBRARY z
)
set
(
ZLIB_INCLUDE_DIR
""
)
else
()
include
(
FindZLIB
)
endif
()
else
()
set
(
ZLIB_FOUND FALSE
)
endif
()
#message(STATUS "Graphic libraries: ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${TIFF_LIBRARIES} ${JASPER_LIBRARIES}")
if
(
NOT ZLIB_FOUND
)
set
(
ZLIB_LIBRARY zlib
)
add_subdirectory
(
3rdparty/zlib
)
set
(
ZLIB_INCLUDE_DIR
"
${
OpenCV_SOURCE_DIR
}
/3rdparty/zlib"
"
${${
ZLIB_LIBRARY
}
_BINARY_DIR
}
"
)
endif
()
################### OpenEXR
if
(
WITH_OPENEXR
)
include
(
cmake/OpenCVFindOpenEXR.cmake
)
endif
()
...
...
@@ -775,7 +791,7 @@ status(" OpenGL support:" HAVE_OPENGL THEN YES ELSE NO)
# media
status
(
""
)
status
(
" Media I/O: "
)
status
(
" ZLib:"
ZLIB_FOUND THEN
${
ZLIB_FOUND
}
ELSE build
)
status
(
" ZLib:"
ZLIB_FOUND THEN
"
${
ZLIB_FOUND
}
-
${
ZLIB_LIBRARY
}
"
ELSE build
)
status
(
" JPEG:"
NOT WITH_JPEG OR JPEG_FOUND THEN
${
JPEG_FOUND
}
ELSE build
)
status
(
" PNG:"
NOT WITH_PNG OR PNG_FOUND THEN
${
PNG_FOUND
}
ELSE build
)
status
(
" TIFF:"
NOT WITH_TIFF OR TIFF_FOUND THEN
${
TIFF_FOUND
}
ELSE build
)
...
...
modules/core/CMakeLists.txt
View file @
a8f0c933
set
(
the_description
"The Core Functionality"
)
ocv_add_module
(
core
${
ZLIB_LIBRARY
}
)
if
(
NOT ZLIB_FOUND
)
set
(
ZLIB_INCLUDE_DIR
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/../../3rdparty/zlib"
)
endif
()
ocv_module_include_directories
(
${
ZLIB_INCLUDE_DIR
}
)
if
(
HAVE_CUDA
)
...
...
modules/highgui/CMakeLists.txt
View file @
a8f0c933
...
...
@@ -10,13 +10,8 @@ ocv_add_module(highgui opencv_imgproc OPTIONAL opencv_androidcamera)
set
(
GRFMT_LIBS
""
)
if
(
WITH_PNG OR WITH_TIFF OR WITH_OPENEXR
)
if
(
ZLIB_FOUND
)
include_directories
(
${
ZLIB_INCLUDE_DIR
}
)
set
(
GRFMT_LIBS
${
GRFMT_LIBS
}
${
ZLIB_LIBRARIES
}
)
else
()
include_directories
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/../../3rdparty/zlib"
)
set
(
GRFMT_LIBS
${
GRFMT_LIBS
}
zlib
)
endif
()
include_directories
(
${
ZLIB_INCLUDE_DIR
}
)
set
(
GRFMT_LIBS
${
GRFMT_LIBS
}
${
ZLIB_LIBRARY
}
)
endif
()
if
(
WITH_JPEG
)
...
...
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