0

I m having 2 versions of PCL in my UBUNTU 20.04 system, 1.9 and 1.12. In a project I want to use 1.9 version but

include_directories(${PCL_INCLUDE_DIRS})

above line includes version 1.12 in the project. Where is the PCL_INCLUDE_DIRS value stored and how to update it?

surajj4837
  • 49
  • 1
  • 10

1 Answers1

0

You are giving very few details to go on. However, in your CmakeLists.txt you presumably have a line like

find_package(PCL REQUIRED)

This looks for an installed version of PCL on your system, and if it finds one, then it sets the variables like PCL_INCLUDE_DIRS.

Since you have multiple versions installed, it is presumably finding a different version than what you want. If you want a specific version, then you could try

find_package(PCL 1.9 EXACT REQUIRED)
bremen_matt
  • 6,902
  • 7
  • 42
  • 90
  • So `PCL_INCLUDE_DIRS` cannot be set manually? – surajj4837 Jul 23 '21 at 09:58
  • That is a variable that is set by the find_package command. I think the find_package command also sets some other variables like the library directories. In any case, these are all just variables. You can of course override them by using the 'set' command... 'set(PCL_INCLUDE_DIRS home/blah)'. Just make sure to do that after any find_package command, or your variable will be overridden. – bremen_matt Jul 24 '21 at 08:26