v01
This commit is contained in:
245
thirdparty/Pangolin/CMakeModules/AndroidUtils.cmake
vendored
Normal file
245
thirdparty/Pangolin/CMakeModules/AndroidUtils.cmake
vendored
Normal file
@@ -0,0 +1,245 @@
|
||||
if(NOT ANDROID_PACKAGE_NAME)
|
||||
set(ANDROID_PACKAGE_NAME "com.github.stevenlovegrove.pangolin")
|
||||
endif()
|
||||
|
||||
if(NOT ANDROID_DEFERRED_ENTRY_SO)
|
||||
set(ANDROID_DEFERRED_ENTRY_SO "libpangolin.so")
|
||||
endif()
|
||||
|
||||
# Configure build environment to automatically generate APK's instead of executables.
|
||||
if(ANDROID AND NOT TARGET apk)
|
||||
# virtual targets which we'll add apks and push actions to.
|
||||
add_custom_target( apk )
|
||||
add_custom_target( push )
|
||||
add_custom_target( run )
|
||||
|
||||
# Reset output directories to be in binary folder (rather than source)
|
||||
set(LIBRARY_OUTPUT_PATH_ROOT ${CMAKE_CURRENT_BINARY_DIR})
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH_ROOT}/libs/${ANDROID_NDK_ABI_NAME})
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH_ROOT}/libs/${ANDROID_NDK_ABI_NAME})
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH_ROOT}/bin/${ANDROID_NDK_ABI_NAME})
|
||||
|
||||
macro( create_android_manifest_xml filename prog_name package_name activity_name)
|
||||
file( WRITE ${filename}
|
||||
"<?xml version=\"1.0\" encoding=\"utf-8\"?>
|
||||
<!-- BEGIN_INCLUDE(manifest) -->
|
||||
<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"
|
||||
package=\"${package_name}.${prog_name}\"
|
||||
android:versionCode=\"1\"
|
||||
android:versionName=\"1.0\">
|
||||
|
||||
<!-- This is the platform API where NativeActivity was introduced. -->
|
||||
<uses-sdk android:minSdkVersion=\"14\" />
|
||||
<uses-feature android:glEsVersion=\"0x00020000\" />
|
||||
<uses-feature android:name=\"android.hardware.camera\" />
|
||||
<uses-permission android:name=\"android.permission.CAMERA\"/>
|
||||
<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>
|
||||
<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\"/>
|
||||
|
||||
<!-- This .apk has no Java code itself, so set hasCode to false. -->
|
||||
<application android:label=\"${activity_name}\" android:hasCode=\"false\">
|
||||
|
||||
<!-- Our activity is the built-in NativeActivity framework class.
|
||||
This will take care of integrating with our NDK code. -->
|
||||
<activity android:name=\"android.app.NativeActivity\"
|
||||
android:label=\"${activity_name}\"
|
||||
android:screenOrientation=\"landscape\"
|
||||
android:configChanges=\"orientation|keyboard|keyboardHidden\"
|
||||
android:theme=\"@android:style/Theme.NoTitleBar.Fullscreen\"
|
||||
>
|
||||
<!-- Tell NativeActivity the name of our .so -->
|
||||
<meta-data android:name=\"android.app.lib_name\"
|
||||
android:value=\"${prog_name}_start\" />
|
||||
<intent-filter>
|
||||
<action android:name=\"android.intent.action.MAIN\" />
|
||||
<category android:name=\"android.intent.category.LAUNCHER\" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
<!-- END_INCLUDE(manifest) -->" )
|
||||
endmacro()
|
||||
|
||||
macro( create_bootstrap_library prog_name package_name)
|
||||
set(bootstrap_cpp "${CMAKE_CURRENT_BINARY_DIR}/${prog_name}_start.cpp" )
|
||||
file( WRITE ${bootstrap_cpp}
|
||||
"#include <android/native_activity.h>
|
||||
#include <android/log.h>
|
||||
#include <dlfcn.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <cstdio>
|
||||
|
||||
#define LOGE(...) ((void)__android_log_print(ANDROID_LOG_ERROR, \"AndroidUtils.cmake\", __VA_ARGS__))
|
||||
#define LIB_PATH \"/data/data/${package_name}.${prog_name}/lib/\"
|
||||
|
||||
void * load_lib(const char * l) {
|
||||
void * handle = dlopen(l, RTLD_NOW | RTLD_GLOBAL);
|
||||
if (!handle) LOGE( \"dlopen('%s'): %s\", l, strerror(errno) );
|
||||
return handle;
|
||||
}
|
||||
|
||||
void ANativeActivity_onCreate(ANativeActivity * app, void * ud, size_t udsize) {
|
||||
#include \"${prog_name}_shared_load.h\"
|
||||
|
||||
// Look for standard entrypoint in user lib
|
||||
void (*stdentrypoint)(ANativeActivity*, void*, size_t);
|
||||
*(void **) (&stdentrypoint) = dlsym(load_lib( LIB_PATH \"lib${prog_name}.so\"), \"ANativeActivity_onCreate\");
|
||||
if (stdentrypoint) {
|
||||
(*stdentrypoint)(app, ud, udsize);
|
||||
}else{
|
||||
// Look for deferred load entry point
|
||||
void (*exdentrypoint)(ANativeActivity*, void*, size_t, const char*);
|
||||
*(void **) (&exdentrypoint) = dlsym(load_lib( LIB_PATH \"lib${prog_name}.so\"), \"DeferredNativeActivity_onCreate\");
|
||||
if (!exdentrypoint) {
|
||||
// Look in specific shared lib
|
||||
*(void **) (&exdentrypoint) = dlsym(load_lib( LIB_PATH \"${ANDROID_DEFERRED_ENTRY_SO}\"), \"DeferredNativeActivity_onCreate\");
|
||||
}
|
||||
if(exdentrypoint) {
|
||||
(*exdentrypoint)(app, ud, udsize, LIB_PATH \"lib${prog_name}.so\" );
|
||||
}else{
|
||||
LOGE( \"Unable to find compatible entry point\" );
|
||||
}
|
||||
}
|
||||
}" )
|
||||
add_library( "${prog_name}_start" SHARED ${bootstrap_cpp} )
|
||||
target_link_libraries( "${prog_name}_start" android log )
|
||||
add_dependencies( ${prog_name} "${prog_name}_start" )
|
||||
endmacro()
|
||||
|
||||
macro( android_update android_project_name)
|
||||
# Find which android platforms are available.
|
||||
execute_process(
|
||||
COMMAND android list targets -c
|
||||
OUTPUT_VARIABLE android_target_list
|
||||
)
|
||||
|
||||
# Pick first platform from this list.
|
||||
string(REGEX MATCH "^[^\n]+" android_target "${android_target_list}" )
|
||||
message(STATUS "Android Target: ${android_target}")
|
||||
|
||||
if( NOT "${android_target}" STREQUAL "" )
|
||||
# Generate ant build scripts for making APK
|
||||
execute_process(
|
||||
COMMAND android update project --name ${android_project_name} --path . --target ${android_target} --subprojects
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
else()
|
||||
message( FATAL_ERROR "No Android SDK platforms found. Please install an Android platform SDK. On Linux, run 'android'." )
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Override add_executable to build android .so instead!
|
||||
macro( add_executable prog_name)
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/libs/${ANDROID_NDK_ABI_NAME})
|
||||
add_library( ${prog_name} SHARED ${ARGN} )
|
||||
|
||||
# Add required link libs for android
|
||||
target_link_libraries(${prog_name} log android )
|
||||
|
||||
# Create manifest required for APK
|
||||
create_android_manifest_xml(
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/AndroidManifest.xml" "${prog_name}"
|
||||
"${ANDROID_PACKAGE_NAME}" "${prog_name}"
|
||||
)
|
||||
|
||||
# Create library that will launch this program and load shared libs
|
||||
create_bootstrap_library( ${prog_name} ${ANDROID_PACKAGE_NAME} )
|
||||
|
||||
# Generate ant build system for APK
|
||||
android_update( ${prog_name} )
|
||||
|
||||
# Target to invoke ant build system for APK
|
||||
set( APK_FILE "${CMAKE_CURRENT_BINARY_DIR}/bin/${prog_name}-debug.apk" )
|
||||
add_custom_command(
|
||||
OUTPUT ${APK_FILE}
|
||||
COMMAND ant debug
|
||||
DEPENDS ${prog_name}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
# Target to install on device
|
||||
add_custom_target( ${prog_name}-apk
|
||||
DEPENDS ${APK_FILE}
|
||||
)
|
||||
add_dependencies(apk ${prog_name}-apk)
|
||||
|
||||
# Target to install on device
|
||||
add_custom_target( ${prog_name}-push
|
||||
COMMAND adb install -r ${APK_FILE}
|
||||
DEPENDS ${APK_FILE}
|
||||
)
|
||||
add_dependencies(push ${prog_name}-push)
|
||||
|
||||
# install and run on device
|
||||
add_custom_target( ${prog_name}-run
|
||||
COMMAND adb shell am start -n ${ANDROID_PACKAGE_NAME}.${prog_name}/android.app.NativeActivity
|
||||
DEPENDS ${prog_name}-push
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
add_dependencies(run ${prog_name}-run)
|
||||
|
||||
# Flag to package dependent libs
|
||||
set_property(TARGET ${prog_name} APPEND PROPERTY MAKE_APK 1 )
|
||||
|
||||
# Clear shared library loading header
|
||||
file( WRITE "${CMAKE_CURRENT_BINARY_DIR}/${prog_name}_shared_load.h" "")
|
||||
endmacro()
|
||||
|
||||
macro( package_with_target prog_name lib_path )
|
||||
# Mark lib_path as dependent of prog_name
|
||||
set_property(TARGET ${prog_name} APPEND PROPERTY IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE ${lib_path} )
|
||||
|
||||
# If prog_name is to be packaged, add file copy command to package .so's.
|
||||
get_target_property( package_dependent_libs ${prog_name} MAKE_APK )
|
||||
if( package_dependent_libs )
|
||||
get_filename_component(target_filename ${lib_path} NAME)
|
||||
file( APPEND ${depend_file} "load_lib(LIB_PATH \"${target_filename}\" );\n")
|
||||
add_custom_command(TARGET ${prog_name} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
${lib_path} "${CMAKE_CURRENT_BINARY_DIR}/libs/${ANDROID_NDK_ABI_NAME}/"
|
||||
)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro( add_to_depend_libs prog_name depend_file lib_name )
|
||||
# Recursively Process dependents of lib_name
|
||||
get_target_property(TARGET_LIBS ${lib_name} IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE)
|
||||
if(NOT TARGET_LIBS)
|
||||
get_target_property(TARGET_LIBS ${lib_name} IMPORTED_LINK_INTERFACE_LIBRARIES_NOCONFIG)
|
||||
endif()
|
||||
if(NOT TARGET_LIBS)
|
||||
get_target_property(TARGET_LIBS ${lib_name} IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG)
|
||||
endif()
|
||||
|
||||
foreach(SUBLIB ${TARGET_LIBS})
|
||||
if(SUBLIB)
|
||||
add_to_depend_libs( ${prog_name} ${depend_file} ${SUBLIB} )
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Check if lib itself is an external shared library
|
||||
if("${lib_name}" MATCHES "\\.so$")
|
||||
package_with_target( ${prog_name} ${lib_name} )
|
||||
endif()
|
||||
|
||||
# Check if lib itself is an internal shared library
|
||||
get_target_property(TARGET_LIB ${lib_name} LOCATION)
|
||||
if("${TARGET_LIB}" MATCHES "\\.so$")
|
||||
package_with_target( ${prog_name} ${TARGET_LIB} )
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro( target_link_libraries prog_name)
|
||||
# _target_link_libraries corresponds to original
|
||||
_target_link_libraries( ${prog_name} ${ARGN} )
|
||||
|
||||
# Recursively process dependencies
|
||||
set(depend_file "${CMAKE_CURRENT_BINARY_DIR}/${prog_name}_shared_load.h" )
|
||||
foreach( LIB ${ARGN} )
|
||||
add_to_depend_libs( ${prog_name} ${depend_file} ${LIB} )
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
endif()
|
||||
11
thirdparty/Pangolin/CMakeModules/CreateMethodCallFile.cmake
vendored
Normal file
11
thirdparty/Pangolin/CMakeModules/CreateMethodCallFile.cmake
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
macro( CreateMethodCallFile filename namespace function symbols)
|
||||
file(WRITE ${filename} "// CMake generated file. Do Not Edit.\n\n#pragma once\n\nnamespace ${namespace} {\n\n")
|
||||
foreach( symbol ${symbols} )
|
||||
file(APPEND ${filename} "void ${symbol}();\n")
|
||||
endforeach()
|
||||
file(APPEND ${filename} "\ninline bool ${function}()\n{\n")
|
||||
foreach( symbol ${symbols} )
|
||||
file(APPEND ${filename} " ${symbol}();\n")
|
||||
endforeach()
|
||||
file(APPEND ${filename} " return true;\n}\n\n} // ${namespace}\n")
|
||||
endmacro()
|
||||
32
thirdparty/Pangolin/CMakeModules/EmbedBinaryFiles.cmake
vendored
Normal file
32
thirdparty/Pangolin/CMakeModules/EmbedBinaryFiles.cmake
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
# Creates C resources file from files in given directory
|
||||
# Based on http://stackoverflow.com/a/27206982
|
||||
function(embed_binary_files file_glob output)
|
||||
# Collect input files
|
||||
file(GLOB bins ${file_glob})
|
||||
# Stop when output file is newer than all binary files
|
||||
set(output_newer_than_bins 1)
|
||||
foreach(bin ${bins})
|
||||
if(bin IS_NEWER_THAN output)
|
||||
set(output_newer_than_bins 0)
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
if(output_newer_than_bins)
|
||||
return()
|
||||
endif()
|
||||
# Create empty output file
|
||||
file(WRITE ${output} "")
|
||||
# Iterate through input files
|
||||
foreach(bin ${bins})
|
||||
# Get short filename
|
||||
string(REGEX MATCH "([^/]+)$" filename ${bin})
|
||||
# Replace filename spaces & extension separator for C compatibility
|
||||
string(REGEX REPLACE "\\.| " "_" filename ${filename})
|
||||
# Read hex data from file
|
||||
file(READ ${bin} filedata HEX)
|
||||
# Convert hex data for C compatibility
|
||||
string(REGEX REPLACE "([0-9a-f][0-9a-f])" "0x\\1," filedata ${filedata})
|
||||
# Append data to output file
|
||||
file(APPEND ${output} "extern const unsigned char ${filename}[] = {${filedata}};\nextern const unsigned ${filename}_size = sizeof(${filename});\n")
|
||||
endforeach()
|
||||
endfunction()
|
||||
32
thirdparty/Pangolin/CMakeModules/FindDC1394.cmake
vendored
Normal file
32
thirdparty/Pangolin/CMakeModules/FindDC1394.cmake
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
# Try to find the dc1394 v2 lib and include files
|
||||
#
|
||||
# DC1394_INCLUDE_DIR
|
||||
# DC1394_LIBRARIES
|
||||
# DC1394_FOUND
|
||||
|
||||
FIND_PATH( DC1394_INCLUDE_DIR dc1394/control.h
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
)
|
||||
|
||||
FIND_LIBRARY( DC1394_LIBRARY dc1394
|
||||
/usr/lib64
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
)
|
||||
|
||||
IF(DC1394_INCLUDE_DIR AND DC1394_LIBRARY)
|
||||
SET( DC1394_FOUND TRUE )
|
||||
SET( DC1394_LIBRARIES ${DC1394_LIBRARY} )
|
||||
ENDIF(DC1394_INCLUDE_DIR AND DC1394_LIBRARY)
|
||||
|
||||
IF(DC1394_FOUND)
|
||||
IF(NOT DC1394_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found DC1394: ${DC1394_LIBRARY}")
|
||||
ENDIF(NOT DC1394_FIND_QUIETLY)
|
||||
ELSE(DC1394_FOUND)
|
||||
IF(DC1394_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find libdc1394")
|
||||
ENDIF(DC1394_FIND_REQUIRED)
|
||||
ENDIF(DC1394_FOUND)
|
||||
|
||||
43
thirdparty/Pangolin/CMakeModules/FindDepthSense.cmake
vendored
Normal file
43
thirdparty/Pangolin/CMakeModules/FindDepthSense.cmake
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
# Try to find the DepthSense SDK For SoftKinetic Cameras
|
||||
#
|
||||
# DepthSense_INCLUDE_DIRS
|
||||
# DepthSense_LIBRARIES
|
||||
# DepthSense_FOUND
|
||||
|
||||
FIND_PATH( DepthSense_INCLUDE_DIR DepthSense.hxx
|
||||
PATHS
|
||||
"${PROGRAM_FILES}/SoftKinetic/DepthSenseSDK/include"
|
||||
"${PROGRAM_FILES}/Meta/DepthSenseSDK/include"
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
/opt/softkinetic/DepthSenseSDK/include
|
||||
)
|
||||
|
||||
FIND_LIBRARY( DepthSense_LIBRARY DepthSense
|
||||
PATHS
|
||||
"${PROGRAM_FILES}/SoftKinetic/DepthSenseSDK/lib"
|
||||
"${PROGRAM_FILES}/Meta/DepthSenseSDK/lib"
|
||||
/usr/lib64
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/opt/local/lib
|
||||
/opt/softkinetic/DepthSenseSDK/lib
|
||||
)
|
||||
|
||||
IF(DepthSense_INCLUDE_DIR AND DepthSense_LIBRARY)
|
||||
SET( DepthSense_FOUND TRUE )
|
||||
SET( DepthSense_LIBRARIES ${DepthSense_LIBRARY} )
|
||||
SET( DepthSense_INCLUDE_DIRS ${DepthSense_INCLUDE_DIR} )
|
||||
ENDIF()
|
||||
|
||||
IF(DepthSense_FOUND)
|
||||
IF(NOT DepthSense_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found DepthSense: ${DepthSense_LIBRARY}")
|
||||
ENDIF()
|
||||
ELSE()
|
||||
IF(DepthSense_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find DepthSense")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
83
thirdparty/Pangolin/CMakeModules/FindEigen.cmake
vendored
Normal file
83
thirdparty/Pangolin/CMakeModules/FindEigen.cmake
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
# - Try to find Eigen lib
|
||||
#
|
||||
# This module supports requiring a minimum version, e.g. you can do
|
||||
# find_package(Eigen 3.1.2)
|
||||
# to require version 3.1.2 or newer of Eigen.
|
||||
#
|
||||
# Once done this will define
|
||||
#
|
||||
# EIGEN_FOUND - system has eigen lib with correct version
|
||||
# EIGEN_INCLUDE_DIR - the eigen include directory
|
||||
# EIGEN_VERSION - eigen version
|
||||
|
||||
# Copyright (c) 2006, 2007 Montel Laurent, <montel@kde.org>
|
||||
# Copyright (c) 2008, 2009 Gael Guennebaud, <g.gael@free.fr>
|
||||
# Copyright (c) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>
|
||||
# Redistribution and use is allowed according to the terms of the 2-clause BSD license.
|
||||
|
||||
if(NOT Eigen_FIND_VERSION)
|
||||
if(NOT Eigen_FIND_VERSION_MAJOR)
|
||||
set(Eigen_FIND_VERSION_MAJOR 2)
|
||||
endif(NOT Eigen_FIND_VERSION_MAJOR)
|
||||
if(NOT Eigen_FIND_VERSION_MINOR)
|
||||
set(Eigen_FIND_VERSION_MINOR 91)
|
||||
endif(NOT Eigen_FIND_VERSION_MINOR)
|
||||
if(NOT Eigen_FIND_VERSION_PATCH)
|
||||
set(Eigen_FIND_VERSION_PATCH 0)
|
||||
endif(NOT Eigen_FIND_VERSION_PATCH)
|
||||
|
||||
set(Eigen_FIND_VERSION "${Eigen_FIND_VERSION_MAJOR}.${Eigen_FIND_VERSION_MINOR}.${Eigen_FIND_VERSION_PATCH}")
|
||||
endif(NOT Eigen_FIND_VERSION)
|
||||
|
||||
macro(_eigen3_check_version)
|
||||
file(READ "${EIGEN_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header)
|
||||
|
||||
string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen3_world_version_match "${_eigen3_version_header}")
|
||||
set(Eigen_WORLD_VERSION "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match "${_eigen3_version_header}")
|
||||
set(Eigen_MAJOR_VERSION "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match "${_eigen3_version_header}")
|
||||
set(Eigen_MINOR_VERSION "${CMAKE_MATCH_1}")
|
||||
|
||||
set(EIGEN_VERSION ${Eigen_WORLD_VERSION}.${Eigen_MAJOR_VERSION}.${Eigen_MINOR_VERSION})
|
||||
if(${EIGEN_VERSION} VERSION_LESS ${Eigen_FIND_VERSION})
|
||||
set(EIGEN_VERSION_OK FALSE)
|
||||
else(${EIGEN_VERSION} VERSION_LESS ${Eigen_FIND_VERSION})
|
||||
set(EIGEN_VERSION_OK TRUE)
|
||||
endif(${EIGEN_VERSION} VERSION_LESS ${Eigen_FIND_VERSION})
|
||||
|
||||
if(NOT EIGEN_VERSION_OK)
|
||||
message(STATUS "Eigen version ${EIGEN_VERSION} found in ${EIGEN_INCLUDE_DIR}, "
|
||||
"but at least version ${Eigen_FIND_VERSION} is required")
|
||||
endif(NOT EIGEN_VERSION_OK)
|
||||
endmacro(_eigen3_check_version)
|
||||
|
||||
if (EIGEN_INCLUDE_DIR)
|
||||
# in cache already
|
||||
_eigen3_check_version()
|
||||
set(EIGEN_FOUND ${EIGEN_VERSION_OK})
|
||||
else()
|
||||
find_path(EIGEN_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library
|
||||
PATHS
|
||||
third_party/eigen
|
||||
../eigen
|
||||
../../eigen
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
${CMAKE_INSTALL_PREFIX}/include
|
||||
${KDE4_INCLUDE_DIR}
|
||||
PATH_SUFFIXES eigen3 eigen
|
||||
)
|
||||
|
||||
if(EIGEN_INCLUDE_DIR)
|
||||
_eigen3_check_version()
|
||||
endif(EIGEN_INCLUDE_DIR)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Eigen DEFAULT_MSG EIGEN_INCLUDE_DIR EIGEN_VERSION_OK)
|
||||
|
||||
mark_as_advanced(EIGEN_INCLUDE_DIR)
|
||||
endif()
|
||||
|
||||
# In case anyone relies on the plural form.
|
||||
set(EIGEN_INCLUDE_DIRS "${EIGEN_INCLUDE_DIR}")
|
||||
97
thirdparty/Pangolin/CMakeModules/FindFFMPEG.cmake
vendored
Normal file
97
thirdparty/Pangolin/CMakeModules/FindFFMPEG.cmake
vendored
Normal file
@@ -0,0 +1,97 @@
|
||||
# Try to find the ffmpeg libraries and headers for avcodec avformat swscale
|
||||
#
|
||||
# FFMPEG_INCLUDE_DIRS
|
||||
# FFMPEG_LIBRARIES
|
||||
# FFMPEG_FOUND
|
||||
|
||||
# Find header files
|
||||
FIND_PATH(
|
||||
AVCODEC_INCLUDE_DIR libavcodec/avcodec.h
|
||||
/usr/include /usr/local/include /opt/local/include /usr/include/x86_64-linux-gnu
|
||||
)
|
||||
FIND_PATH(
|
||||
AVFORMAT_INCLUDE_DIR libavformat/avformat.h
|
||||
/usr/include /usr/local/include /opt/local/include /usr/include/x86_64-linux-gnu
|
||||
)
|
||||
FIND_PATH(
|
||||
AVDEVICE_INCLUDE_DIR libavdevice/avdevice.h
|
||||
/usr/include /usr/local/include /opt/local/include /usr/include/x86_64-linux-gnu
|
||||
)
|
||||
FIND_PATH(
|
||||
AVUTIL_INCLUDE_DIR libavutil/avutil.h
|
||||
/usr/include /usr/local/include /opt/local/include /usr/include/x86_64-linux-gnu
|
||||
)
|
||||
FIND_PATH(
|
||||
SWSCALE_INCLUDE_DIR libswscale/swscale.h
|
||||
/usr/include /usr/local/include /opt/local/include /usr/include/x86_64-linux-gnu
|
||||
)
|
||||
|
||||
# Find Library files
|
||||
FIND_LIBRARY(
|
||||
AVCODEC_LIBRARY
|
||||
NAMES avcodec
|
||||
PATH /usr/lib /usr/local/lib /opt/local/lib /usr/lib/x86_64-linux-gnu
|
||||
)
|
||||
FIND_LIBRARY(
|
||||
AVFORMAT_LIBRARY
|
||||
NAMES avformat
|
||||
PATH /usr/lib /usr/local/lib /opt/local/lib /usr/lib/x86_64-linux-gnu
|
||||
)
|
||||
FIND_LIBRARY(
|
||||
AVDEVICE_LIBRARY
|
||||
NAMES avdevice
|
||||
PATH /usr/lib /usr/local/lib /opt/local/lib /usr/lib/x86_64-linux-gnu
|
||||
)
|
||||
FIND_LIBRARY(
|
||||
AVUTIL_LIBRARY
|
||||
NAMES avutil
|
||||
PATH /usr/lib /usr/local/lib /opt/local/lib /usr/lib/x86_64-linux-gnu
|
||||
)
|
||||
FIND_LIBRARY(
|
||||
SWSCALE_LIBRARY
|
||||
NAMES swscale
|
||||
PATH /usr/lib /usr/local/lib /opt/local/lib /usr/lib/x86_64-linux-gnu
|
||||
)
|
||||
|
||||
IF( EXISTS "${AVUTIL_INCLUDE_DIR}/libavutil/pixdesc.h" )
|
||||
SET( AVUTIL_HAVE_PIXDESC TRUE)
|
||||
endif()
|
||||
|
||||
IF(AVCODEC_INCLUDE_DIR AND AVFORMAT_INCLUDE_DIR AND AVUTIL_INCLUDE_DIR AND AVDEVICE_INCLUDE_DIR AND SWSCALE_INCLUDE_DIR AND AVCODEC_LIBRARY AND AVFORMAT_LIBRARY AND AVUTIL_LIBRARY AND SWSCALE_LIBRARY AND AVDEVICE_LIBRARY AND AVUTIL_HAVE_PIXDESC)
|
||||
SET(FFMPEG_FOUND TRUE)
|
||||
SET(FFMPEG_LIBRARIES ${AVCODEC_LIBRARY} ${AVFORMAT_LIBRARY} ${AVUTIL_LIBRARY} ${SWSCALE_LIBRARY} ${AVDEVICE_LIBRARY})
|
||||
SET(FFMPEG_INCLUDE_DIRS ${AVCODEC_INCLUDE_DIR} ${AVFORMAT_INCLUDE_DIR} ${AVUTIL_INCLUDE_DIR} ${SWSCALE_INCLUDE_DIR} ${AVDEVICE_INCLUDE_DIR})
|
||||
|
||||
include(CheckCXXSourceCompiles)
|
||||
|
||||
SET(CMAKE_REQUIRED_INCLUDES ${FFMPEG_INCLUDE_DIRS})
|
||||
|
||||
CHECK_CXX_SOURCE_COMPILES(
|
||||
"#include \"${AVCODEC_INCLUDE_DIR}/libavformat/avformat.h\"
|
||||
int main() {
|
||||
sizeof(AVFormatContext::max_analyze_duration);
|
||||
}" HAVE_FFMPEG_MAX_ANALYZE_DURATION
|
||||
)
|
||||
CHECK_CXX_SOURCE_COMPILES(
|
||||
"#include \"${AVCODEC_INCLUDE_DIR}/libavformat/avformat.h\"
|
||||
int main() {
|
||||
&avformat_alloc_output_context2;
|
||||
}" HAVE_FFMPEG_AVFORMAT_ALLOC_OUTPUT_CONTEXT2
|
||||
)
|
||||
CHECK_CXX_SOURCE_COMPILES(
|
||||
"#include \"${AVCODEC_INCLUDE_DIR}/libavutil/pixdesc.h\"
|
||||
int main() {
|
||||
AVPixelFormat test = AV_PIX_FMT_GRAY8;
|
||||
}" HAVE_FFMPEG_AVPIXELFORMAT
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
IF (FFMPEG_FOUND)
|
||||
IF (NOT FFMPEG_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found FFMPEG: ${FFMPEG_LIBRARIES}")
|
||||
ENDIF (NOT FFMPEG_FIND_QUIETLY)
|
||||
ELSE (FFMPEG_FOUND)
|
||||
IF (FFMPEG_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find FFMPEG")
|
||||
ENDIF (FFMPEG_FIND_REQUIRED)
|
||||
ENDIF (FFMPEG_FOUND)
|
||||
44
thirdparty/Pangolin/CMakeModules/FindFREEGLUT.cmake
vendored
Normal file
44
thirdparty/Pangolin/CMakeModules/FindFREEGLUT.cmake
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
# Try to find the FREEGLUT library
|
||||
#
|
||||
# FREEGLUT_INCLUDE_DIR
|
||||
# FREEGLUT_LIBRARY
|
||||
# FREEGLUT_FOUND
|
||||
|
||||
FIND_PATH(
|
||||
FREEGLUT_INCLUDE_DIR GL/freeglut.h
|
||||
${CMAKE_INCLUDE_PATH}
|
||||
$ENV{include}
|
||||
${OPENGL_INCLUDE_DIR}
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
)
|
||||
|
||||
SET(STORE_CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK})
|
||||
SET(CMAKE_FIND_FRAMEWORK NEVER)
|
||||
|
||||
FIND_LIBRARY(
|
||||
FREEGLUT_LIBRARY
|
||||
NAMES freeglut_static freeglut glut
|
||||
PATH
|
||||
/opt/local/lib
|
||||
${CMAKE_LIBRARY_PATH}
|
||||
$ENV{lib}
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
)
|
||||
|
||||
SET(CMAKE_FIND_FRAMEWORK ${STORE_CMAKE_FIND_FRAMEWORK})
|
||||
|
||||
IF (FREEGLUT_INCLUDE_DIR AND FREEGLUT_LIBRARY)
|
||||
SET(FREEGLUT_FOUND TRUE)
|
||||
ENDIF (FREEGLUT_INCLUDE_DIR AND FREEGLUT_LIBRARY)
|
||||
|
||||
IF (FREEGLUT_FOUND)
|
||||
IF (NOT FREEGLUT_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found FREEGLUT: ${FREEGLUT_LIBRARY}")
|
||||
ENDIF (NOT FREEGLUT_FIND_QUIETLY)
|
||||
ELSE (FREEGLUT_FOUND)
|
||||
IF (FREEGLUT_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find FREEGLUT")
|
||||
ENDIF (FREEGLUT_FIND_REQUIRED)
|
||||
ENDIF (FREEGLUT_FOUND)
|
||||
53
thirdparty/Pangolin/CMakeModules/FindGLEW.cmake
vendored
Normal file
53
thirdparty/Pangolin/CMakeModules/FindGLEW.cmake
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
#
|
||||
# Try to find GLEW library and include path.
|
||||
# Once done this will define
|
||||
#
|
||||
# GLEW_FOUND
|
||||
# GLEW_INCLUDE_DIR
|
||||
# GLEW_LIBRARY
|
||||
#
|
||||
|
||||
IF (WIN32)
|
||||
FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h
|
||||
$ENV{PROGRAMFILES}/GLEW/include
|
||||
${PROJECT_SOURCE_DIR}/src/nvgl/glew/include
|
||||
DOC "The directory where GL/glew.h resides")
|
||||
FIND_LIBRARY( GLEW_LIBRARY
|
||||
NAMES glew GLEW glew32 glew32s
|
||||
PATHS
|
||||
$ENV{PROGRAMFILES}/GLEW/lib
|
||||
${PROJECT_SOURCE_DIR}/src/nvgl/glew/bin
|
||||
${PROJECT_SOURCE_DIR}/src/nvgl/glew/lib
|
||||
DOC "The GLEW library")
|
||||
ELSE (WIN32)
|
||||
FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/sw/include
|
||||
/opt/local/include
|
||||
DOC "The directory where GL/glew.h resides")
|
||||
FIND_LIBRARY( GLEW_LIBRARY
|
||||
NAMES GLEW glew
|
||||
PATHS
|
||||
/usr/lib64
|
||||
/usr/lib
|
||||
/usr/local/lib64
|
||||
/usr/local/lib
|
||||
/sw/lib
|
||||
/opt/local/lib
|
||||
DOC "The GLEW library")
|
||||
ENDIF (WIN32)
|
||||
|
||||
IF (GLEW_INCLUDE_DIR AND GLEW_LIBRARY)
|
||||
SET( GLEW_FOUND TRUE )
|
||||
ENDIF (GLEW_INCLUDE_DIR AND GLEW_LIBRARY)
|
||||
|
||||
IF (GLEW_FOUND)
|
||||
IF (NOT GLEW_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found GLEW: ${GLEW_LIBRARY}")
|
||||
ENDIF (NOT GLEW_FIND_QUIETLY)
|
||||
ELSE (GLEW_FOUND)
|
||||
IF (GLEW_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find GLEW")
|
||||
ENDIF (GLEW_FIND_REQUIRED)
|
||||
ENDIF (GLEW_FOUND)
|
||||
38
thirdparty/Pangolin/CMakeModules/FindGLUES.cmake
vendored
Normal file
38
thirdparty/Pangolin/CMakeModules/FindGLUES.cmake
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
# Try to find the GLUES lib and include files
|
||||
#
|
||||
# GLUES_INCLUDE_DIR
|
||||
# GLUES_LIBRARIES
|
||||
# GLUES_FOUND
|
||||
|
||||
FIND_PATH( GLUES_INCLUDE_DIR glues/glues.h
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/opt/include
|
||||
/opt/local/include
|
||||
${CMAKE_INSTALL_PREFIX}/include
|
||||
)
|
||||
|
||||
FIND_LIBRARY( GLUES_LIBRARY glues
|
||||
/usr/lib64
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/opt/local/lib
|
||||
/opt/local/lib64
|
||||
${CMAKE_INSTALL_PREFIX}/lib
|
||||
)
|
||||
|
||||
IF(GLUES_INCLUDE_DIR AND GLUES_LIBRARY)
|
||||
SET( GLUES_FOUND TRUE )
|
||||
SET( GLUES_LIBRARIES ${GLUES_LIBRARY} )
|
||||
ENDIF(GLUES_INCLUDE_DIR AND GLUES_LIBRARY)
|
||||
|
||||
IF(GLUES_FOUND)
|
||||
IF(NOT GLUES_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found GLUES: ${GLUES_LIBRARY}")
|
||||
ENDIF(NOT GLUES_FIND_QUIETLY)
|
||||
ELSE(GLUES_FOUND)
|
||||
IF(GLUES_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find GLUES")
|
||||
ENDIF(GLUES_FIND_REQUIRED)
|
||||
ENDIF(GLUES_FOUND)
|
||||
|
||||
33
thirdparty/Pangolin/CMakeModules/FindLibRealSense.cmake
vendored
Normal file
33
thirdparty/Pangolin/CMakeModules/FindLibRealSense.cmake
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
# -*- mode: cmake; -*-
|
||||
###############################################################################
|
||||
# Find librealsense https://github.com/IntelRealSense/librealsense
|
||||
#
|
||||
# This sets the following variables:
|
||||
# LIBREALSENSE_FOUND - True if OPENNI was found.
|
||||
# LIBREALSENSE_INCLUDE_DIRS - Directories containing the OPENNI include files.
|
||||
# LIBREALSENSE_LIBRARIES - Libraries needed to use OPENNI.
|
||||
# LIBREALSENSE_DEFINITIONS - Compiler flags for OPENNI.
|
||||
#
|
||||
# File forked from augmented_dev, project of alantrrs
|
||||
# (https://github.com/alantrrs/augmented_dev).
|
||||
|
||||
find_package(PkgConfig)
|
||||
if(${CMAKE_VERSION} VERSION_LESS 2.8.2)
|
||||
endif()
|
||||
|
||||
#add a hint so that it can find it without the pkg-config
|
||||
find_path(LIBREALSENSE_INCLUDE_DIR librealsense/rs.h
|
||||
HINTS /usr/include/ /usr/local/include)
|
||||
#add a hint so that it can find it without the pkg-config
|
||||
find_library(LIBREALSENSE_LIBRARY
|
||||
NAMES librealsense.so
|
||||
HINTS /usr/lib /usr/local/lib )
|
||||
|
||||
set(LIBREALSENSE_INCLUDE_DIRS ${LIBREALSENSE_INCLUDE_DIR})
|
||||
set(LIBREALSENSE_LIBRARIES ${LIBREALSENSE_LIBRARY})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LibRealSense DEFAULT_MSG
|
||||
LIBREALSENSE_LIBRARY LIBREALSENSE_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(LIBREALSENSE_LIBRARY LIBREALSENSE_INCLUDE_DIR)
|
||||
33
thirdparty/Pangolin/CMakeModules/FindLibRealSense2.cmake
vendored
Normal file
33
thirdparty/Pangolin/CMakeModules/FindLibRealSense2.cmake
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
# -*- mode: cmake; -*-
|
||||
###############################################################################
|
||||
# Find librealsense2 https://github.com/IntelRealSense/librealsense
|
||||
#
|
||||
# This sets the following variables:
|
||||
# LIBREALSENSE2_FOUND - True if LIBREALSENSE2 was found.
|
||||
# LIBREALSENSE2_INCLUDE_DIRS - Directories containing the LIBREALSENSE2 include files.
|
||||
# LIBREALSENSE2_LIBRARIES - Libraries needed to use LIBREALSENSE2.
|
||||
# LIBREALSENSE2_DEFINITIONS - Compiler flags for LIBREALSENSE2.
|
||||
#
|
||||
# File forked from augmented_dev, project of alantrrs
|
||||
# (https://github.com/alantrrs/augmented_dev).
|
||||
|
||||
find_package(PkgConfig)
|
||||
if(${CMAKE_VERSION} VERSION_LESS 2.8.2)
|
||||
endif()
|
||||
|
||||
#add a hint so that it can find it without the pkg-config
|
||||
find_path(LIBREALSENSE2_INCLUDE_DIR librealsense2/rs.h
|
||||
HINTS /usr/include/ /usr/local/include)
|
||||
#add a hint so that it can find it without the pkg-config
|
||||
find_library(LIBREALSENSE2_LIBRARY
|
||||
NAMES librealsense2.so
|
||||
HINTS /usr/lib /usr/local/lib )
|
||||
|
||||
set(LIBREALSENSE2_INCLUDE_DIRS ${LIBREALSENSE2_INCLUDE_DIR})
|
||||
set(LIBREALSENSE2_LIBRARIES ${LIBREALSENSE2_LIBRARY})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LibRealSense2 DEFAULT_MSG
|
||||
LIBREALSENSE2_LIBRARY LIBREALSENSE2_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(LIBREALSENSE2_LIBRARY LIBREALSENSE2_INCLUDE_DIR)
|
||||
26
thirdparty/Pangolin/CMakeModules/FindLz4.cmake
vendored
Normal file
26
thirdparty/Pangolin/CMakeModules/FindLz4.cmake
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
|
||||
find_path(Lz4_INCLUDE_DIRS
|
||||
NAMES lz4frame.h
|
||||
PATHS
|
||||
/opt/local/include
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
)
|
||||
|
||||
find_library(Lz4_LIBRARIES
|
||||
NAMES lz4
|
||||
PATHS
|
||||
/usr/local/lib
|
||||
/opt/local/lib
|
||||
/user/local/lib
|
||||
/usr/lib
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Lz4 REQUIRED_VARS Lz4_LIBRARIES Lz4_INCLUDE_DIRS)
|
||||
|
||||
mark_as_advanced(
|
||||
Lz4_INCLUDE_DIRS
|
||||
Lz4_LIBRARIES
|
||||
Lz4_FOUND
|
||||
)
|
||||
20
thirdparty/Pangolin/CMakeModules/FindMediaFoundation.cmake
vendored
Normal file
20
thirdparty/Pangolin/CMakeModules/FindMediaFoundation.cmake
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
# - Find MediaFoundation
|
||||
# Find the Windows SDK MediaFoundation libraries
|
||||
#
|
||||
# MediaFoundation_LIBRARIES - List of libraries when using MediaFoundation
|
||||
# MediaFoundation_FOUND - True if MediaFoundation found
|
||||
|
||||
IF (MSVC)
|
||||
SET( MediaFoundation_LIBRARIES mf.lib mfplat.lib mfreadwrite.lib mfuuid.lib strmiids.lib )
|
||||
SET( MediaFoundation_FOUND true )
|
||||
ENDIF (MSVC)
|
||||
|
||||
IF (MediaFoundation_FOUND)
|
||||
IF (NOT MediaFoundation_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found MediaFoundation: ${MediaFoundation_LIBRARIES}")
|
||||
ENDIF (NOT MediaFoundation_FIND_QUIETLY)
|
||||
ELSE (MediaFoundation_FOUND)
|
||||
IF (MediaFoundation_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find MediaFoundation")
|
||||
ENDIF (MediaFoundation_FIND_REQUIRED)
|
||||
ENDIF (MediaFoundation_FOUND)
|
||||
63
thirdparty/Pangolin/CMakeModules/FindOculus.cmake
vendored
Normal file
63
thirdparty/Pangolin/CMakeModules/FindOculus.cmake
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
# - Try to find Oculus Rift SDK
|
||||
#
|
||||
# Oculus_FOUND - system has libuvc
|
||||
# Oculus_INCLUDE_DIRS - the libuvc include directories
|
||||
# Oculus_LIBRARIES - link these to use libuvc
|
||||
|
||||
FIND_PATH(
|
||||
Oculus_INCLUDE_DIRS
|
||||
NAMES OVR.h
|
||||
PATHS
|
||||
${CMAKE_SOURCE_DIR}/../LibOVR/Include
|
||||
${CMAKE_SOURCE_DIR}/../OculusSDK/LibOVR/Include
|
||||
/usr/include/LibOVR/Include
|
||||
/usr/local/include/LibOVR/Include
|
||||
/opt/local/include/LibOVR/Include
|
||||
/usr/include/
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(
|
||||
Oculus_LIBRARIES
|
||||
NAMES ovr
|
||||
PATHS
|
||||
${CMAKE_SOURCE_DIR}/../LibOVR/Lib/MacOS/Release
|
||||
${CMAKE_SOURCE_DIR}/../OculusSDK/LibOVR/Lib/Linux/Release/x86_64
|
||||
/usr/include/LibOVR/Lib
|
||||
/usr/local/include/LibOVR/Lib
|
||||
/opt/local/include/LibOVR/Lib
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/opt/local/lib
|
||||
)
|
||||
|
||||
IF(Oculus_INCLUDE_DIRS AND Oculus_LIBRARIES)
|
||||
IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
find_library(CARBON_LIBRARIES NAMES Carbon)
|
||||
find_library(IOKIT_LIBRARIES NAMES IOKit)
|
||||
list(APPEND Oculus_LIBRARIES ${CARBON_LIBRARIES})
|
||||
list(APPEND Oculus_LIBRARIES ${IOKIT_LIBRARIES})
|
||||
SET(Oculus_FOUND TRUE)
|
||||
ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
FIND_PACKAGE(Xrandr QUIET)
|
||||
IF( Xrandr_FOUND )
|
||||
list(APPEND Oculus_LIBRARIES ${Xrandr_LIBRARIES} -ludev -lXrandr -lXinerama )
|
||||
SET(Oculus_FOUND TRUE)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDIF(Oculus_INCLUDE_DIRS AND Oculus_LIBRARIES)
|
||||
|
||||
|
||||
|
||||
IF(Oculus_FOUND)
|
||||
IF(NOT Oculus_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found Oculus: ${Oculus_LIBRARIES}")
|
||||
MESSAGE(STATUS "Found Oculus: ${Oculus_INCLUDE_DIRS}")
|
||||
ENDIF(NOT Oculus_FIND_QUIETLY)
|
||||
ELSE(Oculus_FOUND)
|
||||
message(STATUS "Oculus NOT found")
|
||||
IF(Oculus_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find Oculus")
|
||||
ENDIF(Oculus_FIND_REQUIRED)
|
||||
ENDIF(Oculus_FOUND)
|
||||
33
thirdparty/Pangolin/CMakeModules/FindOpenEXR.cmake
vendored
Normal file
33
thirdparty/Pangolin/CMakeModules/FindOpenEXR.cmake
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
# Try to find the OpenEXR v2 lib and include files
|
||||
#
|
||||
# OpenEXR_INCLUDE_DIR
|
||||
# OpenEXR_LIBRARIES
|
||||
# OpenEXR_FOUND
|
||||
|
||||
FIND_PATH( OpenEXR_INCLUDE_DIR ImfHeader.h
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
PATH_SUFFIXES OpenEXR
|
||||
)
|
||||
|
||||
FIND_LIBRARY( OpenEXR_LIBRARY IlmImf
|
||||
/usr/lib64
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
)
|
||||
|
||||
IF(OpenEXR_INCLUDE_DIR AND OpenEXR_LIBRARY)
|
||||
SET( OpenEXR_FOUND TRUE )
|
||||
SET( OpenEXR_LIBRARIES ${OpenEXR_LIBRARY} )
|
||||
ENDIF()
|
||||
|
||||
IF(OpenEXR_FOUND)
|
||||
IF(NOT OpenEXR_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found OpenEXR: ${OpenEXR_LIBRARY}")
|
||||
ENDIF(NOT OpenEXR_FIND_QUIETLY)
|
||||
ELSE(OpenEXR_FOUND)
|
||||
IF(OpenEXR_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find libOpenEXR")
|
||||
ENDIF(OpenEXR_FIND_REQUIRED)
|
||||
ENDIF(OpenEXR_FOUND)
|
||||
|
||||
49
thirdparty/Pangolin/CMakeModules/FindOpenNI.cmake
vendored
Normal file
49
thirdparty/Pangolin/CMakeModules/FindOpenNI.cmake
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
# -*- mode: cmake; -*-
|
||||
###############################################################################
|
||||
# Find OpenNI
|
||||
#
|
||||
# This sets the following variables:
|
||||
# OPENNI_FOUND - True if OPENNI was found.
|
||||
# OPENNI_INCLUDE_DIRS - Directories containing the OPENNI include files.
|
||||
# OPENNI_LIBRARIES - Libraries needed to use OPENNI.
|
||||
# OPENNI_DEFINITIONS - Compiler flags for OPENNI.
|
||||
#
|
||||
# File forked from augmented_dev, project of alantrrs
|
||||
# (https://github.com/alantrrs/augmented_dev).
|
||||
|
||||
find_package(PkgConfig)
|
||||
if(${CMAKE_VERSION} VERSION_LESS 2.8.2)
|
||||
pkg_check_modules(PC_OPENNI openni-dev)
|
||||
else()
|
||||
pkg_check_modules(PC_OPENNI QUIET openni-dev)
|
||||
endif()
|
||||
|
||||
set(OPENNI_DEFINITIONS ${PC_OPENNI_CFLAGS_OTHER})
|
||||
|
||||
#using the 64bit version of OpenNi if generating for 64bit
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(PROGRAMFILES_ "$ENV{PROGRAMW6432}")
|
||||
set(OPENNI_SUFFIX "64")
|
||||
else(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(PROGRAMFILES_ "$ENV{PROGRAMFILES}")
|
||||
set(OPENNI_SUFFIX "")
|
||||
endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
|
||||
#add a hint so that it can find it without the pkg-config
|
||||
find_path(OPENNI_INCLUDE_DIR XnStatus.h
|
||||
HINTS ${PC_OPENNI_INCLUDEDIR} ${PC_OPENNI_INCLUDE_DIRS} /usr/include/ni /usr/include/openni
|
||||
"${PROGRAMFILES_}/OpenNI/Include"
|
||||
PATH_SUFFIXES openni)
|
||||
#add a hint so that it can find it without the pkg-config
|
||||
find_library(OPENNI_LIBRARY
|
||||
NAMES OpenNI64 OpenNI
|
||||
HINTS ${PC_OPENNI_LIBDIR} ${PC_OPENNI_LIBRARY_DIRS} /usr/lib "${PROGRAMFILES_}/OpenNI/Lib${OPENNI_SUFFIX}")
|
||||
|
||||
set(OPENNI_INCLUDE_DIRS ${OPENNI_INCLUDE_DIR})
|
||||
set(OPENNI_LIBRARIES ${OPENNI_LIBRARY})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(OpenNI DEFAULT_MSG
|
||||
OPENNI_LIBRARY OPENNI_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(OPENNI_LIBRARY OPENNI_INCLUDE_DIR)
|
||||
59
thirdparty/Pangolin/CMakeModules/FindOpenNI2.cmake
vendored
Normal file
59
thirdparty/Pangolin/CMakeModules/FindOpenNI2.cmake
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
###############################################################################
|
||||
# Find OpenNI2
|
||||
#
|
||||
# This sets the following variables:
|
||||
# OPENNI2_FOUND - True if OPENNI was found.
|
||||
# OPENNI2_INCLUDE_DIRS - Directories containing the OPENNI include files.
|
||||
# OPENNI2_LIBRARIES - Libraries needed to use OPENNI.
|
||||
|
||||
find_package(PkgConfig)
|
||||
if(${CMAKE_VERSION} VERSION_LESS 2.8.2)
|
||||
pkg_check_modules(PC_OPENNI openni2-dev)
|
||||
else()
|
||||
pkg_check_modules(PC_OPENNI QUIET openni2-dev)
|
||||
endif()
|
||||
|
||||
set(OPENNI2_DEFINITIONS ${PC_OPENNI_CFLAGS_OTHER})
|
||||
|
||||
#add a hint so that it can find it without the pkg-config
|
||||
find_path(OPENNI2_INCLUDE_DIR OpenNI.h
|
||||
HINTS
|
||||
${PC_OPENNI_INCLUDEDIR}
|
||||
${PC_OPENNI_INCLUDE_DIRS}
|
||||
PATHS
|
||||
"${PROGRAM_FILES}/OpenNI2/Include"
|
||||
"${CMAKE_SOURCE_DIR}/../OpenNI2/Include"
|
||||
/usr/include
|
||||
/user/include
|
||||
PATH_SUFFIXES openni2 ni2
|
||||
)
|
||||
|
||||
if(${CMAKE_CL_64})
|
||||
set(OPENNI_PATH_SUFFIXES lib64 lib)
|
||||
else()
|
||||
set(OPENNI_PATH_SUFFIXES lib)
|
||||
endif()
|
||||
|
||||
#add a hint so that it can find it without the pkg-config
|
||||
find_library(OPENNI2_LIBRARY
|
||||
NAMES OpenNI2
|
||||
HINTS
|
||||
${PC_OPENNI_LIBDIR}
|
||||
${PC_OPENNI_LIBRARY_DIRS}
|
||||
PATHS
|
||||
"${PROGRAM_FILES}/OpenNI2/Redist"
|
||||
"${PROGRAM_FILES}/OpenNI2"
|
||||
"${CMAKE_SOURCE_DIR}/../OpenNI2/Bin/x64-Release"
|
||||
/usr/lib
|
||||
/user/lib
|
||||
PATH_SUFFIXES ${OPENNI_PATH_SUFFIXES}
|
||||
)
|
||||
|
||||
set(OPENNI2_INCLUDE_DIRS ${OPENNI2_INCLUDE_DIR})
|
||||
set(OPENNI2_LIBRARIES ${OPENNI2_LIBRARY})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(OpenNI2 DEFAULT_MSG
|
||||
OPENNI2_LIBRARY OPENNI2_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(OPENNI2_LIBRARY OPENNI2_INCLUDE_DIR)
|
||||
143
thirdparty/Pangolin/CMakeModules/FindPleora.cmake
vendored
Normal file
143
thirdparty/Pangolin/CMakeModules/FindPleora.cmake
vendored
Normal file
@@ -0,0 +1,143 @@
|
||||
# - Try to find Pleora SDK
|
||||
#
|
||||
# Pleora_FOUND - system has pleora eUSB SDK
|
||||
# Pleora_INCLUDE_DIRS - the pleora eUSB SDK include directories
|
||||
# Pleora_LIBRARIES - link these to use pleora eUSB SDK
|
||||
# Pleora_BASE_DIR - set env varivales to this to use pleora eUSB SDK
|
||||
|
||||
set( INCLUDE_SEARCH_PATHS
|
||||
"/opt/pleora/ebus_sdk/Ubuntu-12.04-x86_64/include"
|
||||
"/opt/pleora/ebus_sdk/Ubuntu-14.04-x86_64/include"
|
||||
"$ENV{ProgramFiles}/Pleora Technologies Inc/eBUS SDK/Includes"
|
||||
)
|
||||
|
||||
set( LIBRARIES_SEARCH_PATHS
|
||||
"/opt/pleora/ebus_sdk/Ubuntu-12.04-x86_64/lib"
|
||||
"/opt/pleora/ebus_sdk/Ubuntu-14.04-x86_64/lib"
|
||||
"$ENV{ProgramFiles}/Pleora Technologies Inc/eBUS SDK/Libraries"
|
||||
)
|
||||
|
||||
set( GENAPI_SEARCH_PATHS
|
||||
"/opt/pleora/ebus_sdk/Ubuntu-12.04-x86_64/lib/genicam/bin/Linux64_x64"
|
||||
"/opt/pleora/ebus_sdk/Ubuntu-12.04-x86_64/lib/genicam/bin/Linux32_ARM"
|
||||
"/opt/pleora/ebus_sdk/Ubuntu-14.04-x86_64/lib/genicam/bin/Linux64_x64"
|
||||
"/opt/pleora/ebus_sdk/Ubuntu-14.04-x86_64/lib/genicam/bin/Linux32_ARM"
|
||||
"$ENV{ProgramW6432}/GenICam_v2_4/library/CPP/lib/Win64_x64"
|
||||
)
|
||||
|
||||
IF (${CMAKE_CL_64})
|
||||
set (LIB_NAME_SUFFIX "64")
|
||||
ELSE()
|
||||
set (LIB_NAME_SUFFIX "")
|
||||
ENDIF()
|
||||
|
||||
# Find header files
|
||||
FIND_PATH(
|
||||
PVBASE_INCLUDE_DIR PvBase.h
|
||||
HINTS ${PC_PLEORA_DIR}/include
|
||||
PATHS ${INCLUDE_SEARCH_PATHS}
|
||||
)
|
||||
FIND_PATH(
|
||||
PVDEVICE_INCLUDE_DIR PvDevice.h
|
||||
HINTS ${PC_PLEORA_DIR}/include
|
||||
PATHS ${INCLUDE_SEARCH_PATHS}
|
||||
)
|
||||
FIND_PATH(
|
||||
PVBUFFER_INCLUDE_DIR PvBuffer.h
|
||||
HINTS ${PC_PLEORA_DIR}/include
|
||||
PATHS ${INCLUDE_SEARCH_PATHS}
|
||||
)
|
||||
FIND_PATH(
|
||||
PVGENICAM_INCLUDE_DIR PvGenICamLib.h
|
||||
HINTS ${PC_PLEORA_DIR}/include
|
||||
PATHS ${INCLUDE_SEARCH_PATHS}
|
||||
)
|
||||
FIND_PATH(
|
||||
PVSTREAM_INCLUDE_DIR PvStream.h
|
||||
HINTS ${PC_PLEORA_DIR}/include
|
||||
PATHS ${INCLUDE_SEARCH_PATHS}
|
||||
)
|
||||
FIND_PATH(
|
||||
PVTRANSMITTER_INCLUDE_DIR PvTransmitterLib.h
|
||||
HINTS ${PC_PLEORA_DIR}/include
|
||||
PATHS ${INCLUDE_SEARCH_PATHS}
|
||||
)
|
||||
FIND_PATH(
|
||||
PVVIRTUALDEVICE_INCLUDE_DIR PvVirtualDeviceLib.h
|
||||
HINTS ${PC_PLEORA_DIR}/include
|
||||
PATHS ${INCLUDE_SEARCH_PATHS}
|
||||
)
|
||||
FIND_PATH(
|
||||
PVSAMPLEUTILS_INCLUDE_DIR PvSampleUtils.h
|
||||
HINTS ${PC_PLEORA_DIR}/include
|
||||
PATHS ${INCLUDE_SEARCH_PATHS}
|
||||
)
|
||||
|
||||
# Find Library files
|
||||
FIND_LIBRARY(
|
||||
PVBASE_LIBRARY
|
||||
NAMES "PvBase${LIB_NAME_SUFFIX}"
|
||||
HINTS ${PC_PLEORA_DIR}/lib
|
||||
PATH ${LIBRARIES_SEARCH_PATHS}
|
||||
)
|
||||
FIND_LIBRARY(
|
||||
PVDEVICE_LIBRARY
|
||||
NAMES "PvDevice${LIB_NAME_SUFFIX}"
|
||||
HINTS ${PC_PLEORA_DIR}/lib
|
||||
PATH ${LIBRARIES_SEARCH_PATHS}
|
||||
)
|
||||
|
||||
FIND_LIBRARY(
|
||||
PVBUFFER_LIBRARY
|
||||
NAMES "PvBuffer${LIB_NAME_SUFFIX}"
|
||||
HINTS ${PC_PLEORA_DIR}/lib
|
||||
PATH ${LIBRARIES_SEARCH_PATHS}
|
||||
)
|
||||
FIND_LIBRARY(
|
||||
PVGENICAM_LIBRARY
|
||||
NAMES "PvGenICam${LIB_NAME_SUFFIX}"
|
||||
HINTS ${PC_PLEORA_DIR}/lib
|
||||
PATH ${LIBRARIES_SEARCH_PATHS}
|
||||
)
|
||||
FIND_LIBRARY(
|
||||
PVSTREAM_LIBRARY
|
||||
NAMES "PvStream${LIB_NAME_SUFFIX}"
|
||||
HINTS ${PC_PLEORA_DIR}/lib
|
||||
PATH ${LIBRARIES_SEARCH_PATHS}
|
||||
)
|
||||
FIND_LIBRARY(
|
||||
PVTRANSMITTER_LIBRARY
|
||||
NAMES "PvTransmitter${LIB_NAME_SUFFIX}"
|
||||
HINTS ${PC_PLEORA_DIR}/lib
|
||||
PATH ${LIBRARIES_SEARCH_PATHS}
|
||||
)
|
||||
FIND_LIBRARY(
|
||||
PVVIRTUALDEVICE_LIBRARY
|
||||
NAMES "PvVirtualDevice${LIB_NAME_SUFFIX}"
|
||||
HINTS ${PC_PLEORA_DIR}/lib
|
||||
PATH ${LIBRARIES_SEARCH_PATHS}
|
||||
)
|
||||
FIND_LIBRARY(
|
||||
GENAPI_LIBRARY
|
||||
NAMES GenApi_gcc40_v2_4 GenApi_gcc43_v2_4 GenApi_MD_VC80_v2_4
|
||||
HINTS ${PC_GENAPI_LIBRARY_DIR}
|
||||
PATH ${GENAPI_SEARCH_PATHS}
|
||||
)
|
||||
|
||||
IF(PVBASE_INCLUDE_DIR AND PVDEVICE_INCLUDE_DIR AND PVBUFFER_INCLUDE_DIR AND PVGENICAM_INCLUDE_DIR AND PVSTREAM_INCLUDE_DIR AND PVTRANSMITTER_INCLUDE_DIR AND PVVIRTUALDEVICE_INCLUDE_DIR AND PVSAMPLEUTILS_INCLUDE_DIR AND PVBASE_LIBRARY AND PVDEVICE_LIBRARY AND PVBUFFER_LIBRARY AND PVGENICAM_LIBRARY AND PVSTREAM_LIBRARY AND PVTRANSMITTER_LIBRARY AND PVVIRTUALDEVICE_LIBRARY AND GENAPI_LIBRARY)
|
||||
SET(Pleora_FOUND TRUE)
|
||||
string(REGEX REPLACE "include$" "" Pleora_BASE_DIR ${PVBASE_INCLUDE_DIR})
|
||||
SET(Pleora_LIBRARIES ${PVBASE_LIBRARY} ${PVDEVICE_LIBRARY} ${PVBUFFER_LIBRARY} ${PVGENICAM_LIBRARY} ${PVSTREAM_LIBRARY} ${PVTRANSMITTER_LIBRARY} ${PVVIRTUALDEVICE_LIBRARY} ${GENAPI_LIBRARY})
|
||||
SET(Pleora_INCLUDE_DIRS ${PVBASE_INCLUDE_DIR} ${PVDEVICE_INCLUDE_DIR} ${PVBUFFER_INCLUDE_DIR} ${PVGENICAM_INCLUDE_DIR} ${PVSTREAM_INCLUDE_DIR} ${PVTRANSMITTER_INCLUDE_DIR} ${PVVIRTUALDEVICE_INCLUDE_DIR} ${PVSAMPLEUTILS_INCLUDE_DIR})
|
||||
ENDIF()
|
||||
|
||||
|
||||
IF (Pleora_FOUND)
|
||||
IF (NOT Pleora_FIND_QUIETLY)
|
||||
message(STATUS "Found Pleora: ${Pleora_LIBRARIES}")
|
||||
ENDIF (NOT Pleora_FIND_QUIETLY)
|
||||
ELSE (Pleora_FOUND)
|
||||
IF (Pleora_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could not find Pleora")
|
||||
ENDIF (Pleora_FIND_REQUIRED)
|
||||
ENDIF (Pleora_FOUND)
|
||||
31
thirdparty/Pangolin/CMakeModules/FindROBOTVISION.cmake
vendored
Normal file
31
thirdparty/Pangolin/CMakeModules/FindROBOTVISION.cmake
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
# - Try to find librobotvision
|
||||
#
|
||||
# ROBOTVISION_FOUND - system has librobotvision
|
||||
# ROBOTVISION_INCLUDE_DIR - the librobotvision include directories
|
||||
# ROBOTVISION_LIBRARY - link these to use librobotvision
|
||||
|
||||
FIND_PATH(
|
||||
ROBOTVISION_INCLUDE_DIR
|
||||
NAMES robotvision/bundle_adjuster.h
|
||||
PATHS ${CMAKE_SOURCE_DIR}/.. /usr/include/robotvision /usr/local/include/robotvision
|
||||
)
|
||||
|
||||
FIND_LIBRARY(
|
||||
ROBOTVISION_LIBRARY
|
||||
NAMES robotvision
|
||||
PATHS ${CMAKE_SOURCE_DIR}/../robotvision/release /usr/lib /usr/local/lib
|
||||
)
|
||||
|
||||
IF (ROBOTVISION_INCLUDE_DIR AND ROBOTVISION_LIBRARY)
|
||||
SET(ROBOTVISION_FOUND TRUE)
|
||||
ENDIF (ROBOTVISION_INCLUDE_DIR AND ROBOTVISION_LIBRARY)
|
||||
|
||||
IF (ROBOTVISION_FOUND)
|
||||
IF (NOT ROBOTVISION_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found ROBOTVISION: ${ROBOTVISION_LIBRARY}")
|
||||
ENDIF (NOT ROBOTVISION_FIND_QUIETLY)
|
||||
ELSE (ROBOTVISION_FOUND)
|
||||
IF (ROBOTVISION_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find ROBOTVISION")
|
||||
ENDIF (ROBOTVISION_FIND_REQUIRED)
|
||||
ENDIF (ROBOTVISION_FOUND)
|
||||
58
thirdparty/Pangolin/CMakeModules/FindTeliCam.cmake
vendored
Normal file
58
thirdparty/Pangolin/CMakeModules/FindTeliCam.cmake
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
###############################################################################
|
||||
# Find Toshiba TeliCam
|
||||
#
|
||||
# This sets the following variables:
|
||||
# TeliCam_FOUND - True if TeliCam was found.
|
||||
# TeliCam_INCLUDE_DIRS - Directories containing the TeliCam include files.
|
||||
# TeliCam_LIBRARIES - Libraries needed to use TeliCam.
|
||||
|
||||
find_path(
|
||||
TeliCam_INCLUDE_DIR TeliCamApi.h
|
||||
PATHS
|
||||
"${PROGRAM_FILES}/Toshiba Teli/TeliCamSDK/TeliCamApi/Include"
|
||||
"${CMAKE_SOURCE_DIR}/../TeliCamSDK/TeliCamApi/Include"
|
||||
/usr/include
|
||||
/user/include
|
||||
/opt/TeliCamSDK/include
|
||||
PATH_SUFFIXES TeliCam
|
||||
)
|
||||
|
||||
if(${CMAKE_CL_64})
|
||||
set(TELI_PATH_SUFFIXES x64)
|
||||
else()
|
||||
set(TELI_PATH_SUFFIXES x86)
|
||||
endif()
|
||||
|
||||
find_library(
|
||||
TeliCamApi_LIBRARY
|
||||
NAMES TeliCamApi TeliCamApi64 TeliCamApi_64
|
||||
PATHS
|
||||
"${PROGRAM_FILES}/Toshiba Teli/TeliCamSDK/TeliCamApi/lib"
|
||||
"${CMAKE_SOURCE_DIR}/../TeliCamSDK/TeliCamApi/lib"
|
||||
/usr/lib
|
||||
/user/lib
|
||||
/opt/TeliCamSDK/lib
|
||||
PATH_SUFFIXES ${TELI_PATH_SUFFIXES}
|
||||
)
|
||||
|
||||
find_library(
|
||||
TeliCamUtl_LIBRARY
|
||||
NAMES TeliCamUtl TeliCamUtl64 TeliCamUtl_64
|
||||
PATHS
|
||||
"${PROGRAM_FILES}/Toshiba Teli/TeliCamSDK/TeliCamApi/lib"
|
||||
"${CMAKE_SOURCE_DIR}/../TeliCamSDK/TeliCamApi/lib"
|
||||
/usr/lib
|
||||
/user/lib
|
||||
/opt/TeliCamSDK/lib
|
||||
PATH_SUFFIXES ${TELI_PATH_SUFFIXES}
|
||||
)
|
||||
|
||||
set(TeliCam_INCLUDE_DIRS ${TeliCam_INCLUDE_DIR})
|
||||
set(TeliCam_LIBRARY "${TeliCamApi_LIBRARY}" "${TeliCamUtl_LIBRARY}")
|
||||
set(TeliCam_LIBRARIES ${TeliCam_LIBRARY})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args( TeliCam
|
||||
FOUND_VAR TeliCam_FOUND
|
||||
REQUIRED_VARS TeliCamApi_LIBRARY TeliCamUtl_LIBRARY TeliCam_INCLUDE_DIR
|
||||
)
|
||||
28
thirdparty/Pangolin/CMakeModules/FindTooN.cmake
vendored
Normal file
28
thirdparty/Pangolin/CMakeModules/FindTooN.cmake
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
# - Try to find libTooN
|
||||
#
|
||||
# TooN_FOUND - system has libTooN
|
||||
# TooN_INCLUDE_DIR - the libTooN include directories
|
||||
|
||||
FIND_PATH(
|
||||
TooN_INCLUDE_DIR
|
||||
NAMES TooN/TooN.h
|
||||
PATHS
|
||||
${CMAKE_SOURCE_DIR}
|
||||
${CMAKE_SOURCE_DIR}/..
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
)
|
||||
|
||||
IF(TooN_INCLUDE_DIR)
|
||||
SET(TooN_FOUND TRUE)
|
||||
ENDIF()
|
||||
|
||||
IF(TooN_FOUND)
|
||||
IF(NOT TooN_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found TooN: ${TooN_INCLUDE_DIR}")
|
||||
ENDIF()
|
||||
ELSE()
|
||||
IF(TooN_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find TooN")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
66
thirdparty/Pangolin/CMakeModules/FindWayland.cmake
vendored
Normal file
66
thirdparty/Pangolin/CMakeModules/FindWayland.cmake
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
# Try to find Wayland on a Unix system
|
||||
#
|
||||
# This will define:
|
||||
#
|
||||
# WAYLAND_FOUND - True if Wayland is found
|
||||
# WAYLAND_LIBRARIES - Link these to use Wayland
|
||||
# WAYLAND_INCLUDE_DIR - Include directory for Wayland
|
||||
# WAYLAND_DEFINITIONS - Compiler flags for using Wayland
|
||||
#
|
||||
# In addition the following more fine grained variables will be defined:
|
||||
#
|
||||
# WAYLAND_CLIENT_FOUND WAYLAND_CLIENT_INCLUDE_DIR WAYLAND_CLIENT_LIBRARIES
|
||||
# WAYLAND_SERVER_FOUND WAYLAND_SERVER_INCLUDE_DIR WAYLAND_SERVER_LIBRARIES
|
||||
# WAYLAND_EGL_FOUND WAYLAND_EGL_INCLUDE_DIR WAYLAND_EGL_LIBRARIES
|
||||
#
|
||||
# Copyright (c) 2013 Martin Gräßlin <mgraesslin@kde.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
IF (NOT WIN32)
|
||||
IF (WAYLAND_INCLUDE_DIR AND WAYLAND_LIBRARIES)
|
||||
# In the cache already
|
||||
SET(WAYLAND_FIND_QUIETLY TRUE)
|
||||
ENDIF ()
|
||||
|
||||
# Use pkg-config to get the directories and then use these values
|
||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||
FIND_PACKAGE(PkgConfig)
|
||||
PKG_CHECK_MODULES(PKG_WAYLAND QUIET wayland-client wayland-server wayland-egl wayland-cursor)
|
||||
|
||||
SET(WAYLAND_DEFINITIONS ${PKG_WAYLAND_CFLAGS})
|
||||
|
||||
FIND_PATH(WAYLAND_CLIENT_INCLUDE_DIR NAMES wayland-client.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS})
|
||||
FIND_PATH(WAYLAND_SERVER_INCLUDE_DIR NAMES wayland-server.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS})
|
||||
FIND_PATH(WAYLAND_EGL_INCLUDE_DIR NAMES wayland-egl.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS})
|
||||
FIND_PATH(WAYLAND_CURSOR_INCLUDE_DIR NAMES wayland-cursor.h HINTS ${PKG_WAYLAND_INCLUDE_DIRS})
|
||||
|
||||
FIND_LIBRARY(WAYLAND_CLIENT_LIBRARIES NAMES wayland-client HINTS ${PKG_WAYLAND_LIBRARY_DIRS})
|
||||
FIND_LIBRARY(WAYLAND_SERVER_LIBRARIES NAMES wayland-server HINTS ${PKG_WAYLAND_LIBRARY_DIRS})
|
||||
FIND_LIBRARY(WAYLAND_EGL_LIBRARIES NAMES wayland-egl HINTS ${PKG_WAYLAND_LIBRARY_DIRS})
|
||||
FIND_LIBRARY(WAYLAND_CURSOR_LIBRARIES NAMES wayland-cursor HINTS ${PKG_WAYLAND_LIBRARY_DIRS})
|
||||
|
||||
set(WAYLAND_INCLUDE_DIR ${WAYLAND_CLIENT_INCLUDE_DIR} ${WAYLAND_SERVER_INCLUDE_DIR} ${WAYLAND_EGL_INCLUDE_DIR} ${WAYLAND_CURSOR_INCLUDE_DIR})
|
||||
|
||||
set(WAYLAND_LIBRARIES ${WAYLAND_CLIENT_LIBRARIES} ${WAYLAND_SERVER_LIBRARIES} ${WAYLAND_EGL_LIBRARIES} ${WAYLAND_CURSOR_LIBRARIES})
|
||||
|
||||
list(REMOVE_DUPLICATES WAYLAND_INCLUDE_DIR)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND_CLIENT DEFAULT_MSG WAYLAND_CLIENT_LIBRARIES WAYLAND_CLIENT_INCLUDE_DIR)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND_SERVER DEFAULT_MSG WAYLAND_SERVER_LIBRARIES WAYLAND_SERVER_INCLUDE_DIR)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND_EGL DEFAULT_MSG WAYLAND_EGL_LIBRARIES WAYLAND_EGL_INCLUDE_DIR)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND_CURSOR DEFAULT_MSG WAYLAND_CURSOR_LIBRARIES WAYLAND_CURSOR_INCLUDE_DIR)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND DEFAULT_MSG WAYLAND_LIBRARIES WAYLAND_INCLUDE_DIR)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
WAYLAND_INCLUDE_DIR WAYLAND_LIBRARIES
|
||||
WAYLAND_CLIENT_INCLUDE_DIR WAYLAND_CLIENT_LIBRARIES
|
||||
WAYLAND_SERVER_INCLUDE_DIR WAYLAND_SERVER_LIBRARIES
|
||||
WAYLAND_EGL_INCLUDE_DIR WAYLAND_EGL_LIBRARIES
|
||||
WAYLAND_CURSOR_INCLUDE_DIR WAYLAND_CURSOR_LIBRARIES
|
||||
)
|
||||
|
||||
ENDIF ()
|
||||
32
thirdparty/Pangolin/CMakeModules/FindXrandr.cmake
vendored
Normal file
32
thirdparty/Pangolin/CMakeModules/FindXrandr.cmake
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
# - Try to find Xrandr
|
||||
#
|
||||
# Xrandr_FOUND - system has libXrandr
|
||||
# Xrandr_INCLUDE_DIRS - the libXrandr include directories
|
||||
# Xrandr_LIBRARIES - link these to use libXrandr
|
||||
|
||||
FIND_PATH(
|
||||
Xrandr_INCLUDE_DIRS
|
||||
NAMES X11/extensions/Xrandr.h
|
||||
PATH_SUFFIXES X11/extensions
|
||||
DOC "The Xrandr include directory"
|
||||
)
|
||||
|
||||
FIND_LIBRARY(
|
||||
Xrandr_LIBRARIES
|
||||
NAMES Xrandr
|
||||
DOC "The Xrandr library"
|
||||
)
|
||||
|
||||
IF (Xrandr_INCLUDE_DIRS AND Xrandr_LIBRARIES)
|
||||
SET(Xrandr_FOUND TRUE)
|
||||
ENDIF (Xrandr_INCLUDE_DIRS AND Xrandr_LIBRARIES)
|
||||
|
||||
IF (Xrandr_FOUND)
|
||||
IF (NOT Xrandr_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found Xrandr: ${Xrandr_LIBRARIES}")
|
||||
ENDIF (NOT Xrandr_FIND_QUIETLY)
|
||||
ELSE (Xrandr_FOUND)
|
||||
IF (Xrandr_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find Xrandr")
|
||||
ENDIF (Xrandr_FIND_REQUIRED)
|
||||
ENDIF (Xrandr_FOUND)
|
||||
42
thirdparty/Pangolin/CMakeModules/Findlibusb1.cmake
vendored
Normal file
42
thirdparty/Pangolin/CMakeModules/Findlibusb1.cmake
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
# - Try to find libusb1
|
||||
#
|
||||
# libusb1_FOUND - system has libusb1
|
||||
# libusb1_INCLUDE_DIRS - the libusb1 include directories
|
||||
# libusb1_LIBRARIES - link these to use libusb1
|
||||
|
||||
FIND_PATH(
|
||||
libusb1_INCLUDE_DIRS
|
||||
NAMES libusb-1.0/libusb.h
|
||||
PATHS
|
||||
c:/dev/sysroot32/usr/include
|
||||
${CMAKE_SOURCE_DIR}/../libusb1/include
|
||||
/usr/include/
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(
|
||||
libusb1_LIBRARIES
|
||||
NAMES libusb-1.0
|
||||
PATHS
|
||||
c:/dev/sysroot32/usr/lib
|
||||
${CMAKE_SOURCE_DIR}/../libusb1/lib
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/opt/local/lib
|
||||
)
|
||||
|
||||
IF(libusb1_INCLUDE_DIRS AND libusb1_LIBRARIES)
|
||||
SET(libusb1_FOUND TRUE)
|
||||
ENDIF(libusb1_INCLUDE_DIRS AND libusb1_LIBRARIES)
|
||||
|
||||
IF(libusb1_FOUND)
|
||||
IF(NOT libusb1_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found libusb1: ${libusb1_LIBRARIES}")
|
||||
ENDIF(NOT libusb1_FIND_QUIETLY)
|
||||
ELSE(libusb1_FOUND)
|
||||
message(STATUS "libusb1 NOT found")
|
||||
IF(libusb1_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find libusb1")
|
||||
ENDIF(libusb1_FIND_REQUIRED)
|
||||
ENDIF(libusb1_FOUND)
|
||||
42
thirdparty/Pangolin/CMakeModules/Findpthread.cmake
vendored
Normal file
42
thirdparty/Pangolin/CMakeModules/Findpthread.cmake
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
# - Try to find pthread
|
||||
#
|
||||
# pthread_FOUND - system has pthread
|
||||
# pthread_INCLUDE_DIRS - the pthread include directories
|
||||
# pthread_LIBRARIES - link these to use pthread
|
||||
|
||||
FIND_PATH(
|
||||
pthread_INCLUDE_DIRS
|
||||
NAMES pthread.h
|
||||
PATHS
|
||||
c:/dev/sysroot32/usr/include
|
||||
${CMAKE_SOURCE_DIR}/../pthread/include
|
||||
/usr/include/
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(
|
||||
pthread_LIBRARIES
|
||||
NAMES pthreadVSE2 pthread
|
||||
PATHS
|
||||
c:/dev/sysroot32/usr/lib
|
||||
${CMAKE_SOURCE_DIR}/../pthread/lib
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/opt/local/lib
|
||||
)
|
||||
|
||||
IF(pthread_INCLUDE_DIRS AND pthread_LIBRARIES)
|
||||
SET(pthread_FOUND TRUE)
|
||||
ENDIF(pthread_INCLUDE_DIRS AND pthread_LIBRARIES)
|
||||
|
||||
IF(pthread_FOUND)
|
||||
IF(NOT pthread_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found pthread: ${pthread_LIBRARIES}")
|
||||
ENDIF(NOT pthread_FIND_QUIETLY)
|
||||
ELSE(pthread_FOUND)
|
||||
message(STATUS "pthread NOT found")
|
||||
IF(pthread_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find pthread")
|
||||
ENDIF(pthread_FIND_REQUIRED)
|
||||
ENDIF(pthread_FOUND)
|
||||
39
thirdparty/Pangolin/CMakeModules/Finduvc.cmake
vendored
Normal file
39
thirdparty/Pangolin/CMakeModules/Finduvc.cmake
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
# - Try to find uvc
|
||||
#
|
||||
# uvc_FOUND - system has libuvc
|
||||
# uvc_INCLUDE_DIRS - the libuvc include directories
|
||||
# uvc_LIBRARIES - link these to use libuvc
|
||||
|
||||
FIND_PATH(
|
||||
uvc_INCLUDE_DIRS
|
||||
NAMES libuvc/libuvc.h
|
||||
PATHS
|
||||
${CMAKE_SOURCE_DIR}/..
|
||||
/usr/include/
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(
|
||||
uvc_LIBRARIES
|
||||
NAMES uvc
|
||||
PATHS
|
||||
${CMAKE_SOURCE_DIR}/../uvc/build
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/opt/local/lib
|
||||
)
|
||||
|
||||
IF (uvc_INCLUDE_DIRS AND uvc_LIBRARIES)
|
||||
SET(uvc_FOUND TRUE)
|
||||
ENDIF (uvc_INCLUDE_DIRS AND uvc_LIBRARIES)
|
||||
|
||||
IF (uvc_FOUND)
|
||||
IF (NOT uvc_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found uvc: ${uvc_LIBRARIES}")
|
||||
ENDIF (NOT uvc_FIND_QUIETLY)
|
||||
ELSE (uvc_FOUND)
|
||||
IF (uvc_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find uvc")
|
||||
ENDIF (uvc_FIND_REQUIRED)
|
||||
ENDIF (uvc_FOUND)
|
||||
35
thirdparty/Pangolin/CMakeModules/Findzstd.cmake
vendored
Normal file
35
thirdparty/Pangolin/CMakeModules/Findzstd.cmake
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
###############################################################################
|
||||
# Find Toshiba TeliCam
|
||||
#
|
||||
# This sets the following variables:
|
||||
# TeliCam_FOUND - True if TeliCam was found.
|
||||
# TeliCam_INCLUDE_DIRS - Directories containing the TeliCam include files.
|
||||
# TeliCam_LIBRARIES - Libraries needed to use TeliCam.
|
||||
|
||||
find_path(
|
||||
zstd_INCLUDE_DIR zstd.h
|
||||
PATHS
|
||||
/opt/local/include
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
PATH_SUFFIXES TeliCam
|
||||
)
|
||||
|
||||
find_library(
|
||||
zstd_LIBRARY
|
||||
NAMES zstd
|
||||
PATHS
|
||||
/opt/local/lib
|
||||
/user/local/lib
|
||||
/usr/lib
|
||||
)
|
||||
|
||||
# Plural forms
|
||||
set(zstd_INCLUDE_DIRS ${zstd_INCLUDE_DIR})
|
||||
set(zstd_LIBRARIES ${zstd_LIBRARY})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args( zstd
|
||||
FOUND_VAR zstd_FOUND
|
||||
REQUIRED_VARS zstd_INCLUDE_DIR zstd_LIBRARY
|
||||
)
|
||||
56
thirdparty/Pangolin/CMakeModules/SetPlatformVars.cmake
vendored
Normal file
56
thirdparty/Pangolin/CMakeModules/SetPlatformVars.cmake
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
## Compiler configuration
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUCC)
|
||||
SET(_GCC_ 1)
|
||||
ENDIF()
|
||||
|
||||
IF(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
|
||||
SET(_CLANG_ 1)
|
||||
ENDIF()
|
||||
|
||||
IF(MSVC)
|
||||
SET(_MSVC_ 1)
|
||||
ENDIF()
|
||||
|
||||
## Platform configuration
|
||||
|
||||
IF(WIN32 OR WIN64)
|
||||
SET(_WIN_ 1)
|
||||
ENDIF()
|
||||
|
||||
IF(UNIX)
|
||||
SET(_UNIX_ 1)
|
||||
ENDIF()
|
||||
|
||||
IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
SET(_OSX_ 1)
|
||||
ENDIF()
|
||||
|
||||
IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
SET(_LINUX_ 1)
|
||||
ENDIF()
|
||||
|
||||
IF(ANDROID)
|
||||
SET(_ANDROID_ 1)
|
||||
ENDIF()
|
||||
|
||||
IF(IOS)
|
||||
SET(_APPLE_IOS_ 1)
|
||||
ENDIF()
|
||||
|
||||
|
||||
|
||||
## Default search paths
|
||||
|
||||
IF(_WIN_)
|
||||
IF(${CMAKE_CL_64})
|
||||
LIST(APPEND CMAKE_INCLUDE_PATH "c:/dev/sysroot64/usr/include")
|
||||
LIST(APPEND CMAKE_LIBRARY_PATH "c:/dev/sysroot64/usr/lib")
|
||||
LIST(APPEND CMAKE_LIBRARY_PATH "c:/dev/sysroot64/usr/bin")
|
||||
set(PROGRAM_FILES "$ENV{PROGRAMW6432}" )
|
||||
ELSE()
|
||||
LIST(APPEND CMAKE_INCLUDE_PATH "c:/dev/sysroot32/usr/include")
|
||||
LIST(APPEND CMAKE_LIBRARY_PATH "c:/dev/sysroot32/usr/lib")
|
||||
LIST(APPEND CMAKE_LIBRARY_PATH "c:/dev/sysroot32/usr/bin")
|
||||
set(PROGRAM_FILES "$ENV{PROGRAMFILES}" )
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
Reference in New Issue
Block a user