diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..f7ac57f7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +build* +vcpkg/ +vcpkg_installed/ \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index b3be6263..6a60adc0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 2.8 FATAL_ERROR) -add_definitions(-std=c++11) +add_definitions(-std=c++17) set(CXX_FLAGS "-Wall") set(CMAKE_CXX_FLAGS, "${CXX_FLAGS}") @@ -8,15 +8,16 @@ set(CMAKE_CXX_FLAGS, "${CXX_FLAGS}") project(playback) find_package(PCL 1.2 REQUIRED) +find_package(Boost COMPONENTS filesystem REQUIRED) -include_directories(${PCL_INCLUDE_DIRS}) -link_directories(${PCL_LIBRARY_DIRS}) -add_definitions(${PCL_DEFINITIONS}) +include_directories(${PCL_INCLUDE_DIRS} ${BOOST_INCLUDE_DIRS}) +link_directories(${PCL_LIBRARY_DIRS} ${Boost_LIBRARY_DIRS}) +add_definitions(${PCL_DEFINITIONS} ${Boost_DEFINITIONS}) list(REMOVE_ITEM PCL_LIBRARIES "vtkproj4") add_executable (environment src/environment.cpp src/render/render.cpp src/processPointClouds.cpp) -target_link_libraries (environment ${PCL_LIBRARIES}) +target_link_libraries (environment ${PCL_LIBRARIES} ${Boost_LIBRARIES}) diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..5bdb809e --- /dev/null +++ b/Makefile @@ -0,0 +1,30 @@ +SHELL := /bin/bash +LINUX_RELEASE := $(shell lsb_release -c | cut -f2) + +BASE.DIR=$(PWD) +VCPKG.ROOT=$(BASE.DIR)/vcpkg +VCPKG.BIN=$(VCPKG.ROOT)/vcpkg + +vcpkg: .FORCE + rm -rf $(VCPKG.ROOT) && git clone https://github.com/microsoft/vcpkg.git && cd $(BASE.DIR)/vcpkg && ./bootstrap-vcpkg.sh -disableMetrics + +baseline: .FORCE + $(VCPKG.BIN) x-update-baseline --add-initial-baseline + +# dynamic build will allow for debugging capability +TRIPLET.NAME=x64-linux +libraries: .FORCE + $(VCPKG.BIN) install --vcpkg-root=$(VCPKG.ROOT) --enforce-port-checks --host-triplet=$(TRIPLET.NAME) --triplet=$(TRIPLET.NAME) + +BUILD.DIR=$(BASE.DIR)/build_cmd +build: .FORCE + rm -rf $(BUILD.DIR) && mkdir -p $(BUILD.DIR) + cmake $(BASE.DIR) -B$(BUILD.DIR) -DCMAKE_TOOLCHAIN_FILE=$(VCPKG.ROOT)/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=$(TRIPLET.NAME) -DVCPKG_HOST_TRIPLET=$(TRIPLET.NAME) -DVCPKG_BUILD_TYPE=release -DVCPKG_INSTALLED_DIR=$(BASE.DIR)/vcpkg_installed -DCMAKE_INSTALL_PREFIX=$(INSTALL.DIR) -DBUILD_SHARED_LIBS=0 -DSKIP_TESTS=0 && \ + cd $(BUILD.DIR) && cmake --build . + +APP.BIN=$(BUILD.DIR)/environment +run: .FORCE + export LD_LIBRARY_PATH=$(BASE.DIR)/vcpkg_installed/$(TRIPLET.NAME)/lib:$(BASE.DIR)/vcpkg_installed/$(TRIPLET.NAME)/debug/lib:$(INSTALL.DIR)/lib && \ + $(APP.BIN) + +.FORCE: \ No newline at end of file diff --git a/src/processPointClouds.h b/src/processPointClouds.h index a83dc983..c6d3553e 100644 --- a/src/processPointClouds.h +++ b/src/processPointClouds.h @@ -3,6 +3,12 @@ #ifndef PROCESSPOINTCLOUDS_H_ #define PROCESSPOINTCLOUDS_H_ +#include +#include +#include +#include +#include + #include #include #include @@ -12,11 +18,8 @@ #include #include #include -#include -#include -#include -#include -#include +#include + #include "render/box.h" template diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 00000000..df68283a --- /dev/null +++ b/vcpkg.json @@ -0,0 +1,11 @@ +{ + "dependencies": [ + { + "name": "pcl", + "features": ["visualization"] + }, + "spdlog", + "fmt" + ], + "builtin-baseline": "4f746bc66438fce2b900c3ba6094a483b871b045" +}