Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup: using vcpkg and settings for VS local compilation #59

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
build*
vcpkg/
vcpkg_installed/
11 changes: 6 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
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}")

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})



Expand Down
30 changes: 30 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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:
13 changes: 8 additions & 5 deletions src/processPointClouds.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
#ifndef PROCESSPOINTCLOUDS_H_
#define PROCESSPOINTCLOUDS_H_

#include <iostream>
#include <string>
#include <vector>
#include <ctime>
#include <chrono>

#include <pcl/io/pcd_io.h>
#include <pcl/common/common.h>
#include <pcl/filters/extract_indices.h>
Expand All @@ -12,11 +18,8 @@
#include <pcl/segmentation/sac_segmentation.h>
#include <pcl/segmentation/extract_clusters.h>
#include <pcl/common/transforms.h>
#include <iostream>
#include <string>
#include <vector>
#include <ctime>
#include <chrono>
#include <boost/filesystem.hpp>

#include "render/box.h"

template<typename PointT>
Expand Down
11 changes: 11 additions & 0 deletions vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"dependencies": [
{
"name": "pcl",
"features": ["visualization"]
},
"spdlog",
"fmt"
],
"builtin-baseline": "4f746bc66438fce2b900c3ba6094a483b871b045"
}
Loading