From b841d47b2c908c0ae3f3df4331dd33d022350fa0 Mon Sep 17 00:00:00 2001 From: VR Date: Sun, 3 Nov 2024 11:56:21 -0500 Subject: [PATCH 1/7] init makefile --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..ac9c0c21 --- /dev/null +++ b/Makefile @@ -0,0 +1,7 @@ +SHELL := /bin/bash +LINUX_RELEASE := $(shell lsb_release -c | cut -f2) + +BASE.DIR=$(PWD) +DOWNLOADS.DIR=$(BASE.DIR)/downloads +VCPKG.ROOT=$(BASE.DIR)/vcpkg +VCPKG.BIN=$(VCPKG.ROOT)/vcpkg \ No newline at end of file From 713dcff39e5c875d2eece9dc952a385724a9d5f5 Mon Sep 17 00:00:00 2001 From: VR Date: Sun, 3 Nov 2024 12:16:35 -0500 Subject: [PATCH 2/7] ignore file --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .gitignore 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 From 325c42b0eae7cd8c7b6e39ead6a9b9a3cce02bc7 Mon Sep 17 00:00:00 2001 From: VR Date: Sun, 3 Nov 2024 12:29:17 -0500 Subject: [PATCH 3/7] deps file --- vcpkg.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 vcpkg.json diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 00000000..f2aff130 --- /dev/null +++ b/vcpkg.json @@ -0,0 +1,7 @@ +{ + "dependencies": [ + "pcl", + "fmt", + "spdlog" + ] +} From e9a6815456389691068a7e89436f5082477f77cc Mon Sep 17 00:00:00 2001 From: VR Date: Sun, 3 Nov 2024 12:30:09 -0500 Subject: [PATCH 4/7] upd baseline for dependencies --- Makefile | 16 ++++++++++++++-- vcpkg.json | 11 ++++++----- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index ac9c0c21..67aa4de5 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,18 @@ SHELL := /bin/bash LINUX_RELEASE := $(shell lsb_release -c | cut -f2) BASE.DIR=$(PWD) -DOWNLOADS.DIR=$(BASE.DIR)/downloads +BUILD.DIR=$(BASE.DIR)/build VCPKG.ROOT=$(BASE.DIR)/vcpkg -VCPKG.BIN=$(VCPKG.ROOT)/vcpkg \ No newline at end of file +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 + +build: + rm -rf $(BUILD.DIR) && mkdir -p $(BUILD.DIR) + cd $(BUILD.DIR) && cmake .. && make + +.FORCE: \ No newline at end of file diff --git a/vcpkg.json b/vcpkg.json index f2aff130..5678e012 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -1,7 +1,8 @@ { - "dependencies": [ - "pcl", - "fmt", - "spdlog" - ] + "dependencies": [ + "pcl", + "fmt", + "spdlog" + ], + "builtin-baseline": "4f746bc66438fce2b900c3ba6094a483b871b045" } From 041ecea2c0f32b4ddc31e7706ba0d38e350bba1c Mon Sep 17 00:00:00 2001 From: VR Date: Sun, 3 Nov 2024 13:38:52 -0500 Subject: [PATCH 5/7] libraries are installed --- Makefile | 8 ++++++++ vcpkg.json | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 67aa4de5..56aa2547 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,14 @@ vcpkg: .FORCE baseline: .FORCE $(VCPKG.BIN) x-update-baseline --add-initial-baseline +# dynamic build will allow for debugging capability +TRIPLET.NAME=x64-linux-dynamic +ifdef CIRCLECI # static build for CCI + TRIPLET.NAME=x64-linux-release +endif +libraries: .FORCE + export VCPKG_BINARY_SOURCES=$(CACHE) && export VCPKG_BUILD_TYPE=release && $(VCPKG.BIN) install --vcpkg-root=$(VCPKG.ROOT) --enforce-port-checks --host-triplet=$(TRIPLET.NAME) --triplet=$(TRIPLET.NAME) + build: rm -rf $(BUILD.DIR) && mkdir -p $(BUILD.DIR) cd $(BUILD.DIR) && cmake .. && make diff --git a/vcpkg.json b/vcpkg.json index 5678e012..5a92fa9d 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -1,8 +1,8 @@ { "dependencies": [ "pcl", - "fmt", - "spdlog" + "spdlog", + "fmt" ], "builtin-baseline": "4f746bc66438fce2b900c3ba6094a483b871b045" } From 68eac4dce675297a36852bc5200ea6e9a1eea0d5 Mon Sep 17 00:00:00 2001 From: VR Date: Sun, 3 Nov 2024 17:30:37 -0500 Subject: [PATCH 6/7] libraries compile with vtk --- Makefile | 14 ++++++-------- vcpkg.json | 5 ++++- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 56aa2547..311c8298 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,6 @@ SHELL := /bin/bash LINUX_RELEASE := $(shell lsb_release -c | cut -f2) BASE.DIR=$(PWD) -BUILD.DIR=$(BASE.DIR)/build VCPKG.ROOT=$(BASE.DIR)/vcpkg VCPKG.BIN=$(VCPKG.ROOT)/vcpkg @@ -13,15 +12,14 @@ baseline: .FORCE $(VCPKG.BIN) x-update-baseline --add-initial-baseline # dynamic build will allow for debugging capability -TRIPLET.NAME=x64-linux-dynamic -ifdef CIRCLECI # static build for CCI - TRIPLET.NAME=x64-linux-release -endif +TRIPLET.NAME=x64-linux libraries: .FORCE - export VCPKG_BINARY_SOURCES=$(CACHE) && export VCPKG_BUILD_TYPE=release && $(VCPKG.BIN) install --vcpkg-root=$(VCPKG.ROOT) --enforce-port-checks --host-triplet=$(TRIPLET.NAME) --triplet=$(TRIPLET.NAME) + $(VCPKG.BIN) install --vcpkg-root=$(VCPKG.ROOT) --enforce-port-checks --host-triplet=$(TRIPLET.NAME) --triplet=$(TRIPLET.NAME) -build: +BUILD.DIR=$(BASE.DIR)/build_cmd +build: .FORCE rm -rf $(BUILD.DIR) && mkdir -p $(BUILD.DIR) - cd $(BUILD.DIR) && cmake .. && make + 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 . && VERBOSE=1 make install .FORCE: \ No newline at end of file diff --git a/vcpkg.json b/vcpkg.json index 5a92fa9d..df68283a 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -1,6 +1,9 @@ { "dependencies": [ - "pcl", + { + "name": "pcl", + "features": ["visualization"] + }, "spdlog", "fmt" ], From 4692fbeeee7cda3f50cfe73fba3ba7a89c431288 Mon Sep 17 00:00:00 2001 From: VR Date: Sun, 3 Nov 2024 17:50:02 -0500 Subject: [PATCH 7/7] fix build: include boost filesystem, app builds and runs using makefile --- CMakeLists.txt | 11 ++++++----- Makefile | 7 ++++++- src/processPointClouds.h | 13 ++++++++----- 3 files changed, 20 insertions(+), 11 deletions(-) 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 index 311c8298..5bdb809e 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,11 @@ 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 . && VERBOSE=1 make install + 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