udacity / SFND_Lidar_Obstacle_Detection

374 stars 523 forks source link

Build fails on Windows as it can't find libraries installed with vcpkg #55

Open cr0mwell opened 5 months ago

cr0mwell commented 5 months ago

Hi!

I faced the following issue when trying to build the project on Windows 10:

-- Selecting Windows SDK version 10.0.22621.0 to target Windows 6.2.9200.
CMake Error at CMakeLists.txt:16 (find_package):
  By not providing "FindPCL.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "PCL", but
  CMake did not find one.

  Could not find a package configuration file provided by "PCL" (requested
  version 1.11) with any of the following names:

    PCLConfig.cmake
    pcl-config.cmake

  Add the installation prefix of "PCL" to CMAKE_PREFIX_PATH or set "PCL_DIR"
  to a directory containing one of the above files.  If "PCL" provides a
  separate development package or SDK, be sure it has been installed.

Obviously, the toolchain file from vcpkg should be included within the CmakeLists.txt before running find_package() command: include(/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake)