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
e8afcdba
Commit
e8afcdba
authored
Mar 01, 2012
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More flexible tiff library configuration
parent
92d2d747
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
26 deletions
+42
-26
CMakeLists.txt
3rdparty/libtiff/CMakeLists.txt
+41
-25
tif_config.h.cmakein
3rdparty/libtiff/tif_config.h.cmakein
+0
-0
OpenCVIOLibs.cmake
cmake/OpenCVIOLibs.cmake
+1
-1
No files found.
3rdparty/libtiff/CMakeLists.txt
View file @
e8afcdba
...
@@ -4,25 +4,36 @@
...
@@ -4,25 +4,36 @@
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
project
(
${
TIFF_LIBRARY
}
)
project
(
${
TIFF_LIBRARY
}
)
# List of C++ files:
include
(
CheckFunctionExists
)
include
(
CheckIncludeFile
)
check_include_file
(
assert.h HAVE_ASSERT_H
)
check_include_file
(
fcntl.h HAVE_FCNTL_H
)
check_include_file
(
io.h HAVE_IO_H
)
check_function_exists
(
jbg_newlen HAVE_JBG_NEWLEN
)
check_function_exists
(
mmap HAVE_MMAP
)
check_include_file
(
search.h HAVE_SEARCH_H
)
check_include_file
(
string.h HAVE_STRING_H
)
check_include_file
(
sys/types.h HAVE_SYS_TYPES_H
)
check_include_file
(
unistd.h HAVE_UNISTD_H
)
include_directories
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
"
)
if
(
WIN32
)
set
(
USE_WIN32_FILEIO 1
)
endif
()
add_definitions
(
-DHAVE_STRING_H=1
)
configure_file
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/tif_config.h.cmakein"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/tif_config.h"
@ONLY
)
# The .cpp files:
include_directories
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
"
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
)
# List of C++ files:
set
(
lib_srcs
set
(
lib_srcs
t4.h
tiffio.hxx
tiffiop.h
tif_aux.c
tif_aux.c
tif_close.c
tif_close.c
tif_codec.c
tif_codec.c
tif_color.c
tif_color.c
tif_compress.c
tif_compress.c
tif_dir.c
tif_dir.c
tif_dir.h
tif_dirinfo.c
tif_dirinfo.c
tif_dirread.c
tif_dirread.c
tif_dirwrite.c
tif_dirwrite.c
...
@@ -30,13 +41,14 @@ set(lib_srcs
...
@@ -30,13 +41,14 @@ set(lib_srcs
tif_error.c
tif_error.c
tif_extension.c
tif_extension.c
tif_fax3.c
tif_fax3.c
tif_fax3.h
tif_fax3sm.c
tif_fax3sm.c
tif_flush.c
tif_flush.c
tif_getimage.c
tif_getimage.c
tif_jbig.c
tif_jbig.c
tif_jpeg_12.c
tif_jpeg.c
tif_jpeg.c
tif_luv.c
tif_luv.c
tif_lzma.c
tif_lzw.c
tif_lzw.c
tif_next.c
tif_next.c
tif_ojpeg.c
tif_ojpeg.c
...
@@ -44,10 +56,8 @@ set(lib_srcs
...
@@ -44,10 +56,8 @@ set(lib_srcs
tif_packbits.c
tif_packbits.c
tif_pixarlog.c
tif_pixarlog.c
tif_predict.c
tif_predict.c
tif_predict.h
tif_print.c
tif_print.c
tif_read.c
tif_read.c
tif_stream.cxx
tif_strip.c
tif_strip.c
tif_swab.c
tif_swab.c
tif_thunder.c
tif_thunder.c
...
@@ -56,36 +66,42 @@ set(lib_srcs
...
@@ -56,36 +66,42 @@ set(lib_srcs
tif_warning.c
tif_warning.c
tif_write.c
tif_write.c
tif_zip.c
tif_zip.c
tif_stream.cxx
t4.h
tif_dir.h
tif_fax3.h
tiff.h
tiffio.h
tiffiop.h
tiffvers.h
tif_predict.h
uvcode.h
uvcode.h
tiffio.hxx
"
${
CMAKE_CURRENT_BINARY_DIR
}
/tif_config.h"
)
)
if
(
UNIX
)
if
(
UNIX
)
set
(
lib_srcs
${
lib_srcs
}
tif_unix.c
)
list
(
APPEND lib_srcs tif_unix.c
)
if
(
CMAKE_COMPILER_IS_GNUCXX
)
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-strict-aliasing -Wno-int-to-pointer-cast")
set_source_files_properties
(
tif_unix.c PROPERTIES COMPILE_FLAGS
"-w"
)
endif
()
endif
()
endif
()
if
(
WIN32
)
if
(
WIN32
)
set
(
lib_srcs
${
lib_srcs
}
tif_win32.c
)
list
(
APPEND lib_srcs
tif_win32.c
)
endif
(
WIN32
)
endif
(
WIN32
)
file
(
GLOB lib_hdrs *.h*
)
if
(
MSVC
)
if
(
MSVC
)
string
(
REPLACE
"/W4"
"/W0"
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
"
)
string
(
REPLACE
"/W4"
"/W0"
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
"
)
string
(
REPLACE
"/W4"
"/W0"
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
"
)
string
(
REPLACE
"/W4"
"/W0"
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
"
)
endif
()
endif
()
if
(
UNIX
)
if
(
UNIX
AND
(
CMAKE_COMPILER_IS_GNUCXX OR CV_ICC
))
if
(
CMAKE_COMPILER_IS_GNUCXX OR CV_ICC
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-fPIC"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-fPIC"
)
endif
()
endif
()
add_library
(
${
TIFF_LIBRARY
}
STATIC
${
lib_srcs
}
${
lib_hdrs
}
)
if
(
CMAKE_COMPILER_IS_GNUCXX
)
set_source_files_properties
(
tif_stream.cxx PROPERTIES COMPILE_FLAGS
"-Wno-sign-compare"
)
endif
()
endif
()
add_library
(
${
TIFF_LIBRARY
}
STATIC
${
lib_srcs
}
)
set_target_properties
(
${
TIFF_LIBRARY
}
set_target_properties
(
${
TIFF_LIBRARY
}
PROPERTIES
PROPERTIES
OUTPUT_NAME
"
${
TIFF_LIBRARY
}
"
OUTPUT_NAME
"
${
TIFF_LIBRARY
}
"
...
...
3rdparty/libtiff/tif_config.h
→
3rdparty/libtiff/tif_config.h
.cmakein
View file @
e8afcdba
This diff is collapsed.
Click to expand it.
cmake/OpenCVIOLibs.cmake
View file @
e8afcdba
...
@@ -32,7 +32,7 @@ if(WITH_TIFF AND NOT TIFF_FOUND)
...
@@ -32,7 +32,7 @@ if(WITH_TIFF AND NOT TIFF_FOUND)
set
(
TIFF_LIBRARY libtiff
)
set
(
TIFF_LIBRARY libtiff
)
set
(
TIFF_LIBRARIES
${
TIFF_LIBRARY
}
)
set
(
TIFF_LIBRARIES
${
TIFF_LIBRARY
}
)
add_subdirectory
(
"
${
OpenCV_SOURCE_DIR
}
/3rdparty/libtiff"
)
add_subdirectory
(
"
${
OpenCV_SOURCE_DIR
}
/3rdparty/libtiff"
)
set
(
TIFF_INCLUDE_DIR
"
${${
TIFF_LIBRARY
}
_SOURCE_DIR
}
"
)
set
(
TIFF_INCLUDE_DIR
"
${${
TIFF_LIBRARY
}
_SOURCE_DIR
}
"
"
${${
TIFF_LIBRARY
}
_BINARY_DIR
}
"
)
endif
()
endif
()
################### libjpeg - optional
################### libjpeg - optional
...
...
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