Skip to content

Instantly share code, notes, and snippets.

@UnaNancyOwen
Last active April 26, 2023 09:27
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save UnaNancyOwen/f4dcd74ab870a0fc9e7a to your computer and use it in GitHub Desktop.
Save UnaNancyOwen/f4dcd74ab870a0fc9e7a to your computer and use it in GitHub Desktop.
Basic CMakeLists for PCL
cmake_minimum_required( VERSION 2.8 )
# Create Project
project( solution )
add_executable( project main.cpp )
# Set StartUp Project (Option)
# (This setting is able to enable by using CMake 3.6.0 RC1 or later.)
set_property( DIRECTORY PROPERTY VS_STARTUP_PROJECT "project" )
# Find Packages
find_package( PCL 1.8 REQUIRED )
if( PCL_FOUND )
# [C/C++]>[General]>[Additional Include Directories]
include_directories( ${PCL_INCLUDE_DIRS} )
# [C/C++]>[Preprocessor]>[Preprocessor Definitions]
add_definitions( ${PCL_DEFINITIONS} )
# For Use Not PreCompiled Features
#add_definitions( -DPCL_NO_PRECOMPILE )
# [Linker]>[General]>[Additional Library Directories]
link_directories( ${PCL_LIBRARY_DIRS} )
# [Linker]>[Input]>[Additional Dependencies]
target_link_libraries( project ${PCL_LIBRARIES} )
endif()
#include <iostream>
int main( int argc, char* argv[] )
{
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment