use system KLT library if available
This commit is contained in:
@@ -256,6 +256,7 @@ find_package (JPEG REQUIRED)
|
|||||||
find_package (PNG REQUIRED)
|
find_package (PNG REQUIRED)
|
||||||
find_package (TIFF REQUIRED)
|
find_package (TIFF REQUIRED)
|
||||||
find_package (ZLIB REQUIRED)
|
find_package (ZLIB REQUIRED)
|
||||||
|
find_package (KLT)
|
||||||
|
|
||||||
# link witz bzip
|
# link witz bzip
|
||||||
if (WITH_BZIP)
|
if (WITH_BZIP)
|
||||||
|
73
cmake/modules/FindKLT.cmake
Normal file
73
cmake/modules/FindKLT.cmake
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
# - Try to find KLT
|
||||||
|
# Once done this will define
|
||||||
|
#
|
||||||
|
# KLT_FOUND - system has KLT
|
||||||
|
# KLT_INCLUDE_DIRS - the KLT include directory
|
||||||
|
# KLT_LIBRARIES - Link these to use KLT
|
||||||
|
# KLT_DEFINITIONS - Compiler switches required for using KLT
|
||||||
|
#
|
||||||
|
# Copyright (c) 2009 Andreas Schneider <mail@cynapses.org>
|
||||||
|
# updated for KLT by Dan Horák
|
||||||
|
#
|
||||||
|
# Redistribution and use is allowed according to the terms of the New
|
||||||
|
# BSD license.
|
||||||
|
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
if (KLT_LIBRARIES AND KLT_INCLUDE_DIRS)
|
||||||
|
# in cache already
|
||||||
|
set(KLT_FOUND TRUE)
|
||||||
|
else (KLT_LIBRARIES AND KLT_INCLUDE_DIRS)
|
||||||
|
|
||||||
|
find_path(KLT_INCLUDE_DIR
|
||||||
|
NAMES
|
||||||
|
klt.h
|
||||||
|
PATHS
|
||||||
|
/usr/include
|
||||||
|
/usr/local/include
|
||||||
|
/opt/local/include
|
||||||
|
/sw/include
|
||||||
|
${CMAKE_INSTALL_PREFIX}/include
|
||||||
|
PATH_SUFFIXES
|
||||||
|
klt
|
||||||
|
)
|
||||||
|
mark_as_advanced(KLT_INCLUDE_DIR)
|
||||||
|
|
||||||
|
find_library(KLT_LIBRARY
|
||||||
|
NAMES
|
||||||
|
klt
|
||||||
|
PATHS
|
||||||
|
/usr/lib64
|
||||||
|
/usr/lib
|
||||||
|
/usr/local/lib
|
||||||
|
/opt/local/lib
|
||||||
|
/sw/lib
|
||||||
|
${CMAKE_INSTALL_PREFIX}/lib
|
||||||
|
)
|
||||||
|
mark_as_advanced(KLT_LIBRARY)
|
||||||
|
|
||||||
|
set(KLT_INCLUDE_DIRS
|
||||||
|
${KLT_INCLUDE_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
set(KLT_LIBRARIES
|
||||||
|
${KLT_LIBRARY}
|
||||||
|
)
|
||||||
|
|
||||||
|
if (KLT_INCLUDE_DIRS AND KLT_LIBRARIES)
|
||||||
|
set(KLT_FOUND TRUE)
|
||||||
|
endif (KLT_INCLUDE_DIRS AND KLT_LIBRARIES)
|
||||||
|
|
||||||
|
if (KLT_FOUND)
|
||||||
|
if (NOT KLT_FIND_QUIETLY)
|
||||||
|
message(STATUS "Found KLT: ${KLT_LIBRARIES}")
|
||||||
|
endif (NOT KLT_FIND_QUIETLY)
|
||||||
|
else (KLT_FOUND)
|
||||||
|
message(STATUS "Could not find KLT, using internal code.")
|
||||||
|
endif (KLT_FOUND)
|
||||||
|
|
||||||
|
mark_as_advanced(KLT_INCLUDE_DIRS KLT_LIBRARIES)
|
||||||
|
|
||||||
|
endif (KLT_LIBRARIES AND KLT_INCLUDE_DIRS)
|
||||||
|
|
@@ -20,12 +20,18 @@ set (RTENGINESOURCEFILES colortemp.cc curves.cc flatcurves.cc diagonalcurves.cc
|
|||||||
dirpyr_equalizer.cc
|
dirpyr_equalizer.cc
|
||||||
calc_distort.cc lcp.cc dcp.cc ipretinex.cc
|
calc_distort.cc lcp.cc dcp.cc ipretinex.cc
|
||||||
cJSON.c camconst.cc
|
cJSON.c camconst.cc
|
||||||
klt/convolve.cc klt/error.cc klt/klt.cc klt/klt_util.cc klt/pnmio.cc klt/pyramid.cc klt/selectGoodFeatures.cc
|
|
||||||
klt/storeFeatures.cc klt/trackFeatures.cc klt/writeFeatures.cc
|
|
||||||
clutstore.cc
|
clutstore.cc
|
||||||
ciecam02.cc
|
ciecam02.cc
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (NOT KLT_FOUND)
|
||||||
|
set (RTENGINESOURCEFILES ${RTENGINESOURCEFILES}
|
||||||
|
klt/convolve.cc klt/error.cc klt/klt.cc klt/klt_util.cc klt/pnmio.cc klt/pyramid.cc klt/selectGoodFeatures.cc
|
||||||
|
klt/storeFeatures.cc klt/trackFeatures.cc klt/writeFeatures.cc
|
||||||
|
)
|
||||||
|
set (KLT_LIBRARIES)
|
||||||
|
endif ()
|
||||||
|
|
||||||
include_directories (BEFORE "${CMAKE_CURRENT_BINARY_DIR}")
|
include_directories (BEFORE "${CMAKE_CURRENT_BINARY_DIR}")
|
||||||
|
|
||||||
add_library (rtengine ${RTENGINESOURCEFILES})
|
add_library (rtengine ${RTENGINESOURCEFILES})
|
||||||
@@ -40,6 +46,6 @@ set_target_properties (rtengine PROPERTIES COMPILE_FLAGS "${RTENGINE_CXX_FLAGS}"
|
|||||||
|
|
||||||
target_link_libraries (rtengine rtexif ${EXTRA_LIB} ${GOBJECT_LIBRARIES} ${GTHREAD_LIBRARIES}
|
target_link_libraries (rtengine rtexif ${EXTRA_LIB} ${GOBJECT_LIBRARIES} ${GTHREAD_LIBRARIES}
|
||||||
${GLIB2_LIBRARIES} ${GLIBMM_LIBRARIES} ${LCMS_LIBRARIES} ${EXPAT_LIBRARIES} ${FFTW3F_LIBRARIES} ${IPTCDATA_LIBRARIES}
|
${GLIB2_LIBRARIES} ${GLIBMM_LIBRARIES} ${LCMS_LIBRARIES} ${EXPAT_LIBRARIES} ${FFTW3F_LIBRARIES} ${IPTCDATA_LIBRARIES}
|
||||||
${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${TIFF_LIBRARIES} ${ZLIB_LIBRARIES})
|
${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${TIFF_LIBRARIES} ${ZLIB_LIBRARIES} ${KLT_LIBRARIES})
|
||||||
|
|
||||||
install (FILES ${CAMCONSTSFILE} DESTINATION "${DATADIR}" PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
install (FILES ${CAMCONSTSFILE} DESTINATION "${DATADIR}" PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
||||||
|
Reference in New Issue
Block a user