I am trying to configure PCL With visual studio but I am facing an error when using cmake. I am using pcl 1.8 with VS 2013 and cmake 3.14. I could successfully did the configuration step but when I move to generate, I do face add_executable error.
this is my cmakelists
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
project(cloud_viewer)
find_package(PCL 1.2 REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
add_executable (cloud_viewer cloud_viewer.cpp)
target_link_libraries (cloud_viewer ${PCL_LIBRARIES})
This is the error I get:
CMake Error at CMakeLists.txt:11 (add_executable): Cannot find source file: cloud_viewer.cpp Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx CMake Error at CMakeLists.txt:11 (add_executable): No SOURCES given to target: cloud_viewer
Image that shows both CMakelists.txt and cloud_viewer being in the same folder
Could anyone help me solving it. thanks in advance.
cloud_viewer.cpp
right next to theCMakeLists.txt
– Guillaume Racicot