Skip to content

Commit

Permalink
initial framework
Browse files Browse the repository at this point in the history
  • Loading branch information
cdcseacave committed May 20, 2015
1 parent e09c560 commit ee1b00f
Show file tree
Hide file tree
Showing 67 changed files with 36,549 additions and 365 deletions.
112 changes: 112 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# CMake powered build system for OpenMVS

########################################################################
#
# Project-wide settings
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.2)

# Find dependencies:
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/build/Modules)

# Name of the project.
#
# CMake files in this project can refer to the root source directory
# as ${OpenMVS_SOURCE_DIR} and to the root binary directory as
# ${OpenMVS_BINARY_DIR}.
PROJECT(OpenMVS)

# fix CMake IntDir variable
if(MSVC AND "${MSVC_VERSION}" STRGREATER "1500")
set(CMAKE_CFG_INTDIR "$(Platform)/$(Configuration)")
endif()
set(COTIRE_INTDIR "cotire")

# Define helper functions and macros.
cmake_policy(SET CMP0011 OLD)
INCLUDE(build/Utils.cmake)
INCLUDE(build/Cotire.cmake)

# Init sesion with macros defined in Utils.cmake
GetOperatingSystemArchitectureBitness(SYSTEM)
ComposePackageLibSuffix()
ConfigCompilerAndLinker()

# List config options
SET(OpenMVS_USE_NONFREE ON CACHE BOOL "Build non-free (patented) functionality also")
SET(OpenMVS_USE_FAST_FLOAT2INT ON CACHE BOOL "Use an optimized code to convert real numbers to int")
SET(OpenMVS_USE_FAST_INVSQRT OFF CACHE BOOL "Use an optimized code to compute the inverse square root (slower in fact on modern compilers)")
SET(OpenMVS_USE_FAST_CBRT ON CACHE BOOL "Use an optimized code to compute the cubic root")
SET(OpenMVS_USE_SSE ON CACHE BOOL "Enable SSE optimizations")
SET(OpenMVS_USE_BOOST ON CACHE BOOL "Enable BOOST library")
SET(OpenMVS_USE_CERES ON CACHE BOOL "Enable CERES library")
SET(OpenMVS_USE_OPENMP ON CACHE BOOL "Enable OpenMP library")
SET(OpenMVS_USE_BREAKPAD ON CACHE BOOL "Enable BreakPad library")

include_directories("${OpenMVS_SOURCE_DIR}")

# Find required packages
if(OpenMVS_USE_OPENMP)
FIND_PACKAGE(OpenMP)
if(OPENMP_FOUND)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
add_definitions(-D_USE_OPENMP)
else()
message("-- Can't find OpenMP. Continuing without it.")
endif()
endif()

if(OpenMVS_USE_BREAKPAD)
FIND_PACKAGE(BREAKPAD)
if(BREAKPAD_FOUND)
include_directories(${BREAKPAD_INCLUDE_DIRS})
add_definitions(-D_USE_BREAKPAD)
else()
message("-- Can't find BreakPad. Continuing without it.")
endif()
endif()

FIND_PACKAGE(Boost ${SYSTEM_PACKAGE_REQUIRED})
if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
add_definitions(${Boost_DEFINITIONS})
link_directories(${Boost_LIBRARY_DIRS})
endif()

FIND_PACKAGE(Eigen ${SYSTEM_PACKAGE_REQUIRED})
if(EIGEN_FOUND)
include_directories(${EIGEN_INCLUDE_DIRS})
add_definitions(${EIGEN_DEFINITIONS})
endif()

FIND_PACKAGE(OpenCV ${SYSTEM_PACKAGE_REQUIRED})
if(OpenCV_FOUND)
include_directories(${OpenCV_INCLUDE_DIRS})
add_definitions(${OpenCV_DEFINITIONS})
endif()

# Set defines
SET(OpenMVS_DEFINITIONS "")
if(OpenMVS_USE_NONFREE)
LIST(APPEND OpenMVS_DEFINITIONS -D_USE_NONFREE)
endif()
if(OpenMVS_USE_FAST_FLOAT2INT)
LIST(APPEND OpenMVS_DEFINITIONS -D_USE_FAST_FLOAT2INT)
endif()
if(OpenMVS_USE_FAST_INVSQRT)
LIST(APPEND OpenMVS_DEFINITIONS -D_USE_FAST_INVSQRT)
endif()
if(OpenMVS_USE_FAST_CBRT)
LIST(APPEND OpenMVS_DEFINITIONS -D_USE_FAST_CBRT)
endif()
if(OpenMVS_USE_SSE)
LIST(APPEND OpenMVS_DEFINITIONS -D_USE_SSE)
endif()
if(OpenMVS_USE_BOOST)
LIST(APPEND OpenMVS_DEFINITIONS -D_USE_BOOST)
endif()
ADD_DEFINITIONS(${OpenMVS_DEFINITIONS})

# Add modules
ADD_SUBDIRECTORY(libs)
ADD_SUBDIRECTORY(apps)
ADD_SUBDIRECTORY(docs)
33 changes: 33 additions & 0 deletions COPYRIGHT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

## OpenMVS License

* __OpenMVS - open Multi-View Stereo reconstruction__<br />
Copyright OpenMVS authors
Licensed under the AGPL license.

## Included third parties licence details

This program includes works distributed under the terms of another license(s) and other copyright notice(s).

* __ceres-solver__<br />
<[http://ceres-solver.org/](http://ceres-solver.org/)><br />
Copyright 2015 Google Inc. All rights reserved.
Licensed under the [New BSD licence](http://ceres-solver.org/license.html).

* __eigen__<br />
Copyright (c) Eigen authors.
Distributed under the [MPL2 license](http://opensource.org/licenses/MPL-2.0).
Compiled with EIGEN_MPL2_ONLY to ensure MPL2 compatible code.

* __OpenCV__<br />
Copyright (c) 2015, Itseez.
Licensed under the [BSD license](http://opensource.org/licenses/bsd-license.php).

* __Boost__<br />
Copyright Beman Dawes, David Abrahams, 1998-2005.
Copyright Rene Rivera 2004-2007.
Licensed under a [Boost license](http://www.boost.org/users/license.html).

* __CGAL__<br />
Copyright (c) 1995-2015 The CGAL Project. All rights reserved.
Licensed under the [GPL](http://www.gnu.org/copyleft/gpl.html)/[LGPL license](http://www.gnu.org/copyleft/lesser.html).
Loading

0 comments on commit ee1b00f

Please sign in to comment.