mirror of https://github.com/opencv/opencv.git
parent
4a299acd48
commit
8141a5026c
11 changed files with 204 additions and 198 deletions
@ -1,15 +1,3 @@ |
||||
if(WITH_JASPER AND NOT JASPER_FOUND) |
||||
add_subdirectory(libjasper) |
||||
endif() |
||||
if(WITH_JPEG AND NOT JPEG_FOUND) |
||||
add_subdirectory(libjpeg) |
||||
endif() |
||||
if(WITH_PNG AND NOT PNG_FOUND) |
||||
add_subdirectory(libpng) |
||||
endif() |
||||
if(WITH_TIFF AND NOT TIFF_FOUND) |
||||
add_subdirectory(libtiff) |
||||
endif() |
||||
if(WIN32) |
||||
add_subdirectory(ffmpeg) |
||||
add_subdirectory(ffmpeg) |
||||
endif() |
||||
|
@ -0,0 +1,94 @@ |
||||
################### zlib - required |
||||
if(BUILD_ZLIB) |
||||
set(ZLIB_FOUND FALSE) |
||||
else() |
||||
if(ANDROID) |
||||
set(ZLIB_FOUND TRUE) |
||||
set(ZLIB_LIBRARY z) |
||||
set(ZLIB_LIBRARIES ${ZLIB_LIBRARY}) |
||||
set(ZLIB_INCLUDE_DIR "") |
||||
else() |
||||
include(FindZLIB) |
||||
endif() |
||||
endif() |
||||
|
||||
if(NOT ZLIB_FOUND) |
||||
set(ZLIB_LIBRARY zlib) |
||||
set(ZLIB_LIBRARIES ${ZLIB_LIBRARY}) |
||||
add_subdirectory("${OpenCV_SOURCE_DIR}/3rdparty/zlib") |
||||
set(ZLIB_INCLUDE_DIR "${${ZLIB_LIBRARY}_SOURCE_DIR}" "${${ZLIB_LIBRARY}_BINARY_DIR}") |
||||
endif() |
||||
|
||||
################### libtiff - optional |
||||
if(WITH_TIFF) |
||||
if(BUILD_TIFF) |
||||
set(TIFF_FOUND FALSE) |
||||
else() |
||||
include(FindTIFF) |
||||
endif() |
||||
endif() |
||||
|
||||
if(WITH_TIFF AND NOT TIFF_FOUND) |
||||
set(TIFF_LIBRARY libtiff) |
||||
set(TIFF_LIBRARIES ${TIFF_LIBRARY}) |
||||
add_subdirectory("${OpenCV_SOURCE_DIR}/3rdparty/libtiff") |
||||
set(TIFF_INCLUDE_DIR "${${TIFF_LIBRARY}_SOURCE_DIR}") |
||||
endif() |
||||
|
||||
################### libjpeg - optional |
||||
if(WITH_JPEG) |
||||
if(BUILD_JPEG) |
||||
set(JPEG_FOUND FALSE) |
||||
else() |
||||
include(FindJPEG) |
||||
endif() |
||||
endif() |
||||
|
||||
if(WITH_JPEG AND NOT JPEG_FOUND) |
||||
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() |
||||
|
||||
################### libjasper - optional (should be searched after libjpeg) |
||||
if(WITH_JASPER) |
||||
if(BUILD_JASPER) |
||||
set(JASPER_FOUND FALSE) |
||||
else() |
||||
include(FindJasper) |
||||
endif() |
||||
endif() |
||||
|
||||
if(WITH_JASPER AND NOT JASPER_FOUND) |
||||
set(JASPER_LIBRARY libjasper) |
||||
set(JASPER_LIBRARIES ${JASPER_LIBRARY}) |
||||
add_subdirectory("${OpenCV_SOURCE_DIR}/3rdparty/libjasper") |
||||
set(JASPER_INCLUDE_DIR "${${JASPER_LIBRARY}_SOURCE_DIR}") |
||||
endif() |
||||
|
||||
################### libpng - optional |
||||
if(WITH_PNG) |
||||
if(BUILD_PNG) |
||||
set(PNG_FOUND FALSE) |
||||
else() |
||||
include(FindPNG) |
||||
if(PNG_FOUND) |
||||
check_include_file(${PNG_PNG_INCLUDE_DIR}/png.h HAVE_PNG_H) |
||||
check_include_file(${PNG_PNG_INCLUDE_DIR}/libpng/png.h HAVE_LIBPNG_PNG_H) |
||||
endif() |
||||
endif() |
||||
endif() |
||||
|
||||
if(WITH_PNG AND NOT PNG_FOUND) |
||||
set(PNG_LIBRARY libpng) |
||||
set(PNG_LIBRARIES ${PNG_LIBRARY}) |
||||
add_subdirectory("${OpenCV_SOURCE_DIR}/3rdparty/libpng") |
||||
set(PNG_INCLUDE_DIR "${${PNG_LIBRARY}_SOURCE_DIR}") |
||||
set(PNG_DEFINITIONS "") |
||||
endif() |
||||
|
||||
################### OpenEXR - optional |
||||
if(WITH_OPENEXR) |
||||
include(cmake/OpenCVFindOpenEXR.cmake) |
||||
endif() |
Loading…
Reference in new issue