Skip to content

Commit

Permalink
Simplify code layout into single cmakelists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
mp3guy committed Apr 30, 2019
1 parent 25f9bd0 commit e4e7217
Show file tree
Hide file tree
Showing 119 changed files with 23 additions and 174 deletions.
16 changes: 9 additions & 7 deletions GUI/src/CMakeLists.txt → CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ cmake_minimum_required(VERSION 2.6.0)

project(ElasticFusion)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}")
set(Pangolin_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../third-party/Pangolin/build/src" CACHE PATH "Pangolin build directory")
set(OPENNI2_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../third-party/OpenNI2/Include" CACHE PATH "OpenNI2 Include directory")
set(OPENNI2_LIBRARY "${CMAKE_CURRENT_SOURCE_DIR}/../../third-party/OpenNI2/Bin/x64-Release/libOpenNI2.so" CACHE PATH "OpenNI2 library")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules")

set(Pangolin_DIR "${CMAKE_CURRENT_SOURCE_DIR}/third-party/Pangolin/build/src" CACHE PATH "Pangolin build directory")
set(OPENNI2_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/third-party/OpenNI2/Include" CACHE PATH "OpenNI2 Include directory")
set(OPENNI2_LIBRARY "${CMAKE_CURRENT_SOURCE_DIR}/third-party/OpenNI2/Bin/x64-Release/libOpenNI2.so" CACHE PATH "OpenNI2 library")

find_package(LAPACK REQUIRED)
find_package(BLAS REQUIRED)
Expand All @@ -14,16 +15,15 @@ find_package(JPEG REQUIRED)
find_package(Pangolin 0.1 REQUIRED)
find_package(CUDA REQUIRED)
find_package(OpenNI2 REQUIRED)
find_package(efusion REQUIRED)
find_package(SuiteSparse REQUIRED)

include_directories(${JPEG_INCLUDE_DIR})
include_directories(${ZLIB_INCLUDE_DIR})
include_directories(${EIGEN_INCLUDE_DIRS})
include_directories(${Pangolin_INCLUDE_DIRS})
include_directories(${CUDA_INCLUDE_DIRS})
include_directories(${EFUSION_INCLUDE_DIR})
include_directories(${OPENNI2_INCLUDE_DIR})
include_directories(${SUITESPARSE_INCLUDE_DIRS})

if(WITH_REALSENSE)
include_directories(${REALSENSE_INCLUDE_DIR})
Expand All @@ -39,6 +39,8 @@ add_definitions(-Dlinux=1)
set(CMAKE_CXX_FLAGS ${ADDITIONAL_CMAKE_CXX_FLAGS} "-O3 -msse2 -msse3 -Wall -std=c++11")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -std=c++11")

add_subdirectory(Core)

add_executable(ElasticFusion
${srcs}
${tools_srcs}
Expand All @@ -47,12 +49,12 @@ add_executable(ElasticFusion
)

target_link_libraries(ElasticFusion
efusion
${ZLIB_LIBRARY}
${JPEG_LIBRARY}
${Pangolin_LIBRARIES}
${CUDA_LIBRARIES}
${EXTRA_LIBS}
${EFUSION_LIBRARY}
${OPENNI2_LIBRARY}
${SUITESPARSE_LIBRARIES}
${BLAS_LIBRARIES}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions GUI/src/FindOpenNI2.cmake → CMakeModules/FindOpenNI2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ find_path(OPENNI2_INCLUDE_DIR OpenNI.h
${PC_OPENNI_INCLUDE_DIRS}
PATHS
"${PROGRAM_FILES}/OpenNI2/Include"
"${CMAKE_SOURCE_DIR}/../third-party/OpenNI2/Include"
"${CMAKE_SOURCE_DIR}/../../third-party/OpenNI2/Include"
"${CMAKE_SOURCE_DIR}/../OpenNI2/Include"
"${CMAKE_SOURCE_DIR}/../../OpenNI2/Include"
"${CMAKE_SOURCE_DIR}/../../../OpenNI2/Include"
Expand Down
File renamed without changes.
File renamed without changes.
9 changes: 1 addition & 8 deletions Core/src/CMakeLists.txt → Core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,8 @@ cmake_minimum_required(VERSION 2.6.0)

project(libefusion)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}")
set(Pangolin_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../third-party/Pangolin/build/src" CACHE PATH "Pangolin build directory")
set(efusion_SHADER_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Shaders" CACHE PATH "Where the shaders live")

find_package(Pangolin 0.1 REQUIRED)
find_package(CUDA REQUIRED)
find_package(SuiteSparse REQUIRED)

include_directories(${Pangolin_INCLUDE_DIRS})
include_directories(${CUDA_INCLUDE_DIRS})
include_directories(${EIGEN_INCLUDE_DIRS})
Expand All @@ -24,8 +18,7 @@ file(GLOB containers Cuda/containers/*.cpp)
set(CUDA_ARCH_BIN "52" CACHE STRING "Specify 'real' GPU arch to build binaries for, BIN(PTX) format is supported. Example: 1.3 2.1(1.3) or 13 21(13)")
set(CUDA_ARCH_PTX "" CACHE STRING "Specify 'virtual' PTX arch to build PTX intermediate code for. Example: 1.0 1.2 or 10 12")

SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR})
include(CudaComputeTargetFlags.cmake)
include("${CMAKE_MODULE_PATH}/CudaComputeTargetFlags.cmake")
APPEND_TARGET_ARCH_FLAGS()

set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-Xcompiler;-fPIC;")
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
120 changes: 0 additions & 120 deletions GUI/src/FindSuiteSparse.cmake

This file was deleted.

28 changes: 0 additions & 28 deletions GUI/src/Findefusion.cmake

This file was deleted.

File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions GUI/src/MainController.h → MainController.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
*
*/

#include <ElasticFusion.h>
#include <Utils/Parse.h>
#include "Core/ElasticFusion.h"
#include "Core/Utils/Parse.h"

#include "Tools/GUI.h"
#include "Tools/GroundTruthOdometry.h"
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions GUI/src/Tools/GUI.h → Tools/GUI.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
#include <pangolin/gl/gl.h>
#include <pangolin/gl/gldraw.h>
#include <map>
#include <GPUTexture.h>
#include <Utils/Intrinsics.h>
#include <Shaders/Shaders.h>
#include "../Core/GPUTexture.h"
#include "../Core/Utils/Intrinsics.h"
#include "../Core/Shaders/Shaders.h"

#define GL_GPU_MEM_INFO_CURRENT_AVAILABLE_MEM_NVX 0x9049

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <iostream>
#include <fstream>
#include <map>
#include <Utils/OdometryProvider.h>
#include "../Core/Utils/OdometryProvider.h"

class GroundTruthOdometry
{
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion GUI/src/Tools/LiveLogReader.h → Tools/LiveLogReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <chrono>
#include <thread>

#include <Utils/Parse.h>
#include "../Core/Utils/Parse.h"

#include "LogReader.h"
#include "CameraInterface.h"
Expand Down
4 changes: 2 additions & 2 deletions GUI/src/Tools/LogReader.h → Tools/LogReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
#include <string>
#include <zlib.h>
#include <poll.h>
#include <Utils/Img.h>
#include <Utils/Resolution.h>
#include "../Core/Utils/Img.h"
#include "../Core/Utils/Resolution.h"

#include "JPEGLoader.h"

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions GUI/src/Tools/RawLogReader.h → Tools/RawLogReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#ifndef RAWLOGREADER_H_
#define RAWLOGREADER_H_

#include <Utils/Resolution.h>
#include <Utils/Stopwatch.h>
#include "../Core/Utils/Resolution.h"
#include "../Core/Utils/Stopwatch.h"
#include <pangolin/utils/file_utils.h>

#include "LogReader.h"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit e4e7217

Please sign in to comment.