Created
February 5, 2016 16:17
-
-
Save Ram-Z/75048857163337844f7e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.0) | |
include(ExternalProject) | |
set(CUSTOM_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/prefix") | |
set(boost_components | |
filesystem | |
system | |
chrono | |
iostreams | |
thread) | |
foreach(comp ${boost_components}) | |
list(APPEND boost_with_args --with-${comp}) | |
endforeach(comp) | |
ExternalProject_Add(boost | |
URL http://downloads.sourceforge.net/project/boost/boost/1.60.0/boost_1_60_0.tar.bz2 | |
SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/boost" | |
INSTALL_DIR "${CUSTOM_PREFIX_PATH}" | |
CONFIGURE_COMMAND ./bootstrap.sh --prefix=<INSTALL_DIR> | |
BUILD_COMMAND ./b2 cxxflags="-std=c++11" ${boost_with_args} | |
INSTALL_COMMAND ./b2 cxxflags="-std=c++11" ${boost_with_args} install | |
BUILD_IN_SOURCE 1 | |
) | |
ExternalProject_Add(pcl | |
DEPENDS boost | |
URL https://github.com/PointCloudLibrary/pcl/archive/pcl-1.7.2.tar.gz | |
CMAKE_ARGS | |
-DCMAKE_PREFIX_PATH:PATH=${CUSTOM_PREFIX_PATH} | |
-DCMAKE_INSTALL_PREFIX:PATH=${CUSTOM_PREFIX_PATH} | |
-DBUILD_SHARED_LIBS:BOOL=ON | |
-DBOOST_ROOT=${CUSTOM_PREFIX_PATH} | |
-DBOOST_INCLUDEDIR=${CUSTOM_PREFIX_PATH}/include | |
-DBOOST_LIBRARYDIR=${CUSTOM_PREFIX_PATH}/lib | |
-DBoost_DEBUG=ON | |
-DBUILD_apps=OFF | |
-DBUILD_common=ON | |
-DBUILD_examples=OFF | |
-DBUILD_features=OFF | |
-DBUILD_filters=OFF | |
-DBUILD_geometry=OFF | |
-DBUILD_global_tests=OFF | |
-DBUILD_io=OFF | |
-DBUILD_kdtree=OFF | |
-DBUILD_keypoints=OFF | |
-DBUILD_octree=OFF | |
-DBUILD_outofcore=OFF | |
-DBUILD_people=OFF | |
-DBUILD_recognition=OFF | |
-DBUILD_registration=OFF | |
-DBUILD_sample_consensus=OFF | |
-DBUILD_search=OFF | |
-DBUILD_segmentation=OFF | |
-DBUILD_surface=OFF | |
-DBUILD_surface_on_nurbs=OFF | |
-DBUILD_tools=OFF | |
-DBUILD_tracking=OFF | |
-DBUILD_visualization=OFF | |
-DWITH_VTK=OFF | |
-Wno-dev | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment