Cleaned up KLT CMake files from PR #3912
This commit is contained in:
parent
0b4405972d
commit
73573e1b87
@ -112,7 +112,7 @@ option(WITH_MYFILE_MMAP "Build using memory mapped file" ON)
|
|||||||
option(WITH_LTO "Build with link-time optimizations" OFF)
|
option(WITH_LTO "Build with link-time optimizations" OFF)
|
||||||
option(WITH_SAN "Build with run-time sanitizer" OFF)
|
option(WITH_SAN "Build with run-time sanitizer" OFF)
|
||||||
option(WITH_PROF "Build with profiling instrumentation" OFF)
|
option(WITH_PROF "Build with profiling instrumentation" OFF)
|
||||||
option(WITH_SYSTEM_KLT "Build using system's KLT libraries." OFF)
|
option(WITH_SYSTEM_KLT "Build using system KLT library." OFF)
|
||||||
option(OPTION_OMP "Build with OpenMP support" ON)
|
option(OPTION_OMP "Build with OpenMP support" ON)
|
||||||
option(STRICT_MUTEX "True (recommended): MyMutex will behave like POSIX Mutex; False: MyMutex will behave like POSIX RecMutex; Note: forced to ON for Debug builds" ON)
|
option(STRICT_MUTEX "True (recommended): MyMutex will behave like POSIX Mutex; False: MyMutex will behave like POSIX RecMutex; Note: forced to ON for Debug builds" ON)
|
||||||
option(TRACE_MYRWMUTEX "Trace custom R/W Mutex (Debug builds only); redirecting std::out to a file is strongly recommended!" OFF)
|
option(TRACE_MYRWMUTEX "Trace custom R/W Mutex (Debug builds only); redirecting std::out to a file is strongly recommended!" OFF)
|
||||||
@ -293,8 +293,8 @@ 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)
|
||||||
if (WITH_SYSTEM_KLT)
|
if(WITH_SYSTEM_KLT)
|
||||||
find_package (KLT REQUIRED)
|
find_package(KLT REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Check for libcanberra-gtk3 (sound events on Linux):
|
# Check for libcanberra-gtk3 (sound events on Linux):
|
||||||
|
@ -15,59 +15,52 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
if (KLT_LIBRARIES AND KLT_INCLUDE_DIRS)
|
if(KLT_LIBRARIES AND KLT_INCLUDE_DIRS)
|
||||||
# in cache already
|
# in cache already
|
||||||
set(KLT_FOUND TRUE)
|
set(KLT_FOUND TRUE)
|
||||||
else (KLT_LIBRARIES AND KLT_INCLUDE_DIRS)
|
else()
|
||||||
|
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_path(KLT_INCLUDE_DIR
|
find_library(KLT_LIBRARY
|
||||||
NAMES
|
NAMES
|
||||||
klt.h
|
klt
|
||||||
PATHS
|
PATHS
|
||||||
/usr/include
|
/usr/lib64
|
||||||
/usr/local/include
|
/usr/lib
|
||||||
/opt/local/include
|
/usr/local/lib
|
||||||
/sw/include
|
/opt/local/lib
|
||||||
${CMAKE_INSTALL_PREFIX}/include
|
/sw/lib
|
||||||
PATH_SUFFIXES
|
${CMAKE_INSTALL_PREFIX}/lib
|
||||||
klt
|
)
|
||||||
)
|
mark_as_advanced(KLT_LIBRARY)
|
||||||
mark_as_advanced(KLT_INCLUDE_DIR)
|
|
||||||
|
|
||||||
find_library(KLT_LIBRARY
|
set(KLT_INCLUDE_DIRS ${KLT_INCLUDE_DIR})
|
||||||
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
|
set(KLT_LIBRARIES ${KLT_LIBRARY})
|
||||||
${KLT_INCLUDE_DIR}
|
|
||||||
)
|
|
||||||
|
|
||||||
set(KLT_LIBRARIES
|
if(KLT_INCLUDE_DIRS AND KLT_LIBRARIES)
|
||||||
${KLT_LIBRARY}
|
set(KLT_FOUND TRUE)
|
||||||
)
|
endif()
|
||||||
|
|
||||||
if (KLT_INCLUDE_DIRS AND KLT_LIBRARIES)
|
if(KLT_FOUND)
|
||||||
set(KLT_FOUND TRUE)
|
if(NOT KLT_FIND_QUIETLY)
|
||||||
endif (KLT_INCLUDE_DIRS AND KLT_LIBRARIES)
|
message(STATUS "Found KLT: ${KLT_LIBRARIES}")
|
||||||
|
endif()
|
||||||
if (KLT_FOUND)
|
else()
|
||||||
if (NOT KLT_FIND_QUIETLY)
|
message(STATUS "KLT not found.")
|
||||||
message(STATUS "Found KLT: ${KLT_LIBRARIES}")
|
endif()
|
||||||
endif (NOT KLT_FIND_QUIETLY)
|
|
||||||
else (KLT_FOUND)
|
|
||||||
message(STATUS "KLT not found.")
|
|
||||||
endif (KLT_FOUND)
|
|
||||||
|
|
||||||
mark_as_advanced(KLT_INCLUDE_DIRS KLT_LIBRARIES)
|
|
||||||
|
|
||||||
endif (KLT_LIBRARIES AND KLT_INCLUDE_DIRS)
|
|
||||||
|
|
||||||
|
mark_as_advanced(KLT_INCLUDE_DIRS KLT_LIBRARIES)
|
||||||
|
endif()
|
||||||
|
@ -111,13 +111,21 @@ set(RTENGINESOURCEFILES
|
|||||||
utils.cc
|
utils.cc
|
||||||
)
|
)
|
||||||
|
|
||||||
if (NOT WITH_SYSTEM_KLT)
|
if(NOT WITH_SYSTEM_KLT)
|
||||||
set (RTENGINESOURCEFILES ${RTENGINESOURCEFILES}
|
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/convolve.cc
|
||||||
klt/storeFeatures.cc klt/trackFeatures.cc klt/writeFeatures.cc
|
klt/error.cc
|
||||||
)
|
klt/klt.cc
|
||||||
set (KLT_LIBRARIES)
|
klt/klt_util.cc
|
||||||
endif ()
|
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}")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user