Skip to content
Snippets Groups Projects
Commit 0b1a9f8e authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

Move FindYamlCpp.cmake to within the wolf project

parent b4e1c356
No related branches found
No related tags found
No related merge requests found
......@@ -7,9 +7,6 @@ if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
# MAC OSX RPATH
SET(CMAKE_MACOSX_RPATH 1)
# The project name and the type of project
PROJECT(wolf)
......@@ -43,6 +40,9 @@ endif()
ADD_SUBDIRECTORY(src)
# MAC OSX RPATH
SET(CMAKE_MACOSX_RPATH 1)
FIND_PACKAGE(Doxygen)
FIND_PATH(IRI_DOC_DIR doxygen.conf ${CMAKE_SOURCE_DIR}/doc/iri_doc/)
......
# Locate yaml-cpp
#
# This module defines
# YAMLCPP_FOUND, if false, do not try to link to yaml-cpp
# YAMLCPP_LIBNAME, name of yaml library
# YAMLCPP_LIBRARY, where to find yaml-cpp
# YAMLCPP_LIBRARY_RELEASE, where to find Release or RelWithDebInfo yaml-cpp
# YAMLCPP_LIBRARY_DEBUG, where to find Debug yaml-cpp
# YAMLCPP_INCLUDE_DIR, where to find yaml.h
# YAMLCPP_LIBRARY_DIR, the directories to find YAMLCPP_LIBRARY
#
# By default, the dynamic libraries of yaml-cpp will be found. To find the static ones instead,
# you must set the YAMLCPP_USE_STATIC_LIBS variable to TRUE before calling find_package(YamlCpp ...)
# attempt to find static library first if this is set
if(YAMLCPP_USE_STATIC_LIBS)
set(YAMLCPP_STATIC libyaml-cpp.a)
set(YAMLCPP_STATIC_DEBUG libyaml-cpp-dbg.a)
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") ### Set Yaml libary name for Windows
set(YAMLCPP_LIBNAME "libyaml-cppmd" CACHE STRING "Name of YAML library")
set(YAMLCPP_LIBNAME optimized ${YAMLCPP_LIBNAME} debug ${YAMLCPP_LIBNAME}d)
else() ### Set Yaml libary name for Unix, Linux, OS X, etc
set(YAMLCPP_LIBNAME "yaml-cpp" CACHE STRING "Name of YAML library")
endif()
# find the yaml-cpp include directory
find_path(YAMLCPP_INCLUDE_DIR
NAMES yaml-cpp/yaml.h
PATH_SUFFIXES include
PATHS
${PROJECT_SOURCE_DIR}/dependencies/yaml-cpp-0.5.1/include
~/Library/Frameworks/yaml-cpp/include/
/Library/Frameworks/yaml-cpp/include/
/usr/local/include/
/usr/include/
/sw/yaml-cpp/ # Fink
/opt/local/yaml-cpp/ # DarwinPorts
/opt/csw/yaml-cpp/ # Blastwave
/opt/yaml-cpp/)
# find the release yaml-cpp library
find_library(YAMLCPP_LIBRARY_RELEASE
NAMES ${YAMLCPP_STATIC} yaml-cpp libyaml-cppmd.lib
PATH_SUFFIXES lib64 lib Release RelWithDebInfo
PATHS
${PROJECT_SOURCE_DIR}/dependencies/yaml-cpp-0.5.1/
${PROJECT_SOURCE_DIR}/dependencies/yaml-cpp-0.5.1/build
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt)
# find the debug yaml-cpp library
find_library(YAMLCPP_LIBRARY_DEBUG
NAMES ${YAMLCPP_STATIC_DEBUG} yaml-cpp-dbg libyaml-cppmdd.lib
PATH_SUFFIXES lib64 lib Debug
PATHS
${PROJECT_SOURCE_DIR}/dependencies/yaml-cpp-0.5.1/
${PROJECT_SOURCE_DIR}/dependencies/yaml-cpp-0.5.1/build
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt)
# set library vars
set(YAMLCPP_LIBRARY ${YAMLCPP_LIBRARY_RELEASE})
if(CMAKE_BUILD_TYPE MATCHES Debug AND EXISTS ${YAMLCPP_LIBRARY_DEBUG})
set(YAMLCPP_LIBRARY ${YAMLCPP_LIBRARY_DEBUG})
endif()
get_filename_component(YAMLCPP_LIBRARY_RELEASE_DIR ${YAMLCPP_LIBRARY_RELEASE} PATH)
get_filename_component(YAMLCPP_LIBRARY_DEBUG_DIR ${YAMLCPP_LIBRARY_DEBUG} PATH)
set(YAMLCPP_LIBRARY_DIR ${YAMLCPP_LIBRARY_RELEASE_DIR} ${YAMLCPP_LIBRARY_DEBUG_DIR})
# handle the QUIETLY and REQUIRED arguments and set YAMLCPP_FOUND to TRUE if all listed variables are TRUE
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(YamlCpp DEFAULT_MSG
YAMLCPP_INCLUDE_DIR
YAMLCPP_LIBRARY
YAMLCPP_LIBRARY_DIR)
mark_as_advanced(
YAMLCPP_INCLUDE_DIR
YAMLCPP_LIBRARY_DIR
YAMLCPP_LIBRARY
YAMLCPP_LIBRARY_RELEASE
YAMLCPP_LIBRARY_RELEASE_DIR
YAMLCPP_LIBRARY_DEBUG
YAMLCPP_LIBRARY_DEBUG_DIR)
......@@ -3,6 +3,9 @@
MESSAGE("Starting WOLF CMakeLists ...")
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
#CMAKE modules
SET(CMAKE_MODULE_PATH ../cmake_modules)
#find dependencies.
FIND_PACKAGE(Ceres QUIET) #Ceres is not required
IF(Ceres_FOUND)
......
......@@ -10,7 +10,7 @@ namespace wolf
{
//Constructor
ProcessorBrisk::ProcessorBrisk(ProcessorImageParameters _params) :
ProcessorBrisk::ProcessorBrisk(ProcessorImageParameters& _params) :
ProcessorTrackerFeature(PRC_TRACKER_BRISK),
detector_(_params.detector.threshold, _params.detector.octaves, _params.descriptor.pattern_scale),
descriptor_(_params.detector.threshold, _params.detector.octaves, _params.descriptor.pattern_scale),
......
......@@ -88,7 +88,7 @@ class ProcessorBrisk : public ProcessorTrackerFeature
std::list<cv::Point> tracker_candidates_;
public:
ProcessorBrisk(ProcessorImageParameters _params);
ProcessorBrisk(ProcessorImageParameters& _params);
// ProcessorBrisk(cv::FeatureDetector* _det_ptr, cv::DescriptorExtractor* _desc_ext_ptr, cv::DescriptorMatcher* _match_ptr, ProcessorImageParameters_params) :
// detector_ptr_(_det_ptr)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment