2010-05-12 01:44:00 +08:00
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
# CMake file for libtiff. See root CMakeLists.txt
|
|
|
|
#
|
|
|
|
# ----------------------------------------------------------------------------
|
|
|
|
project(libtiff)
|
|
|
|
|
|
|
|
# List of C++ files:
|
|
|
|
|
2011-04-26 23:46:15 +08:00
|
|
|
include_directories("${CMAKE_CURRENT_SOURCE_DIR}")
|
2010-05-12 01:44:00 +08:00
|
|
|
|
|
|
|
add_definitions(-DHAVE_STRING_H=1)
|
|
|
|
|
|
|
|
# The .cpp files:
|
|
|
|
|
|
|
|
set(lib_srcs
|
2010-07-16 20:54:53 +08:00
|
|
|
t4.h
|
|
|
|
tiffio.hxx
|
|
|
|
tiffiop.h
|
|
|
|
tif_aux.c
|
|
|
|
tif_close.c
|
|
|
|
tif_codec.c
|
|
|
|
tif_color.c
|
|
|
|
tif_compress.c
|
|
|
|
tif_dir.c
|
|
|
|
tif_dir.h
|
|
|
|
tif_dirinfo.c
|
|
|
|
tif_dirread.c
|
|
|
|
tif_dirwrite.c
|
|
|
|
tif_dumpmode.c
|
|
|
|
tif_error.c
|
|
|
|
tif_extension.c
|
|
|
|
tif_fax3.c
|
|
|
|
tif_fax3.h
|
|
|
|
tif_fax3sm.c
|
|
|
|
tif_flush.c
|
|
|
|
tif_getimage.c
|
|
|
|
tif_jbig.c
|
|
|
|
tif_jpeg.c
|
|
|
|
tif_luv.c
|
|
|
|
tif_lzw.c
|
|
|
|
tif_next.c
|
|
|
|
tif_ojpeg.c
|
|
|
|
tif_open.c
|
|
|
|
tif_packbits.c
|
|
|
|
tif_pixarlog.c
|
|
|
|
tif_predict.c
|
|
|
|
tif_predict.h
|
|
|
|
tif_print.c
|
|
|
|
tif_read.c
|
|
|
|
tif_stream.cxx
|
|
|
|
tif_strip.c
|
|
|
|
tif_swab.c
|
|
|
|
tif_thunder.c
|
|
|
|
tif_tile.c
|
|
|
|
tif_version.c
|
|
|
|
tif_warning.c
|
|
|
|
tif_write.c
|
|
|
|
tif_zip.c
|
|
|
|
uvcode.h
|
|
|
|
)
|
2010-05-12 01:44:00 +08:00
|
|
|
|
|
|
|
if(UNIX)
|
|
|
|
set(lib_srcs ${lib_srcs} tif_unix.c)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
set(lib_srcs ${lib_srcs} tif_win32.c)
|
|
|
|
endif(WIN32)
|
|
|
|
|
|
|
|
#if(APPLE)
|
|
|
|
# set(lib_srcs ${lib_srcs} tif_apple.c)
|
|
|
|
#endif(APPLE)
|
|
|
|
|
|
|
|
file(GLOB lib_hdrs *.h*)
|
|
|
|
|
|
|
|
set(the_target "libtiff")
|
|
|
|
|
|
|
|
if(MSVC)
|
2010-07-16 20:54:53 +08:00
|
|
|
string(REPLACE "/W4" "/W0" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
|
|
|
string(REPLACE "/W4" "/W0" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
2010-05-12 01:44:00 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(UNIX)
|
|
|
|
if(CMAKE_COMPILER_IS_GNUCXX OR CV_ICC)
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2011-04-26 23:46:15 +08:00
|
|
|
add_library(${the_target} STATIC ${lib_srcs} ${lib_hdrs})
|
2010-05-12 01:44:00 +08:00
|
|
|
|
|
|
|
set_target_properties(${the_target}
|
|
|
|
PROPERTIES
|
|
|
|
OUTPUT_NAME "${the_target}"
|
|
|
|
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
|
|
|
|
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/3rdparty/lib/"
|
|
|
|
)
|
2011-05-11 21:37:20 +08:00
|
|
|
|
2011-05-17 17:40:06 +08:00
|
|
|
if(ENABLE_SOLUTION_FOLDERS)
|
2011-05-11 21:37:20 +08:00
|
|
|
set_target_properties(${the_target} PROPERTIES FOLDER "3rdparty")
|
|
|
|
endif()
|
2010-12-05 10:10:59 +08:00
|
|
|
|
|
|
|
if(NOT BUILD_SHARED_LIBS)
|
|
|
|
install(TARGETS ${the_target}
|
|
|
|
ARCHIVE DESTINATION share/opencv/3rdparty/lib COMPONENT main)
|
|
|
|
endif()
|