title: CMake project in Visual Studio: How to add additional include and library directories?
body: <p>I am developing <strong>C++</strong> code using <strong>VisualStudio</strong> 2019.</p>
  
  <p>I am using <strong>CMake</strong> to configure the project.</p>
  
  <p>I need to use <strong>boost</strong> library which is compiled on my remote machine.</p>
  
  <p>In <strong>console application</strong>, I can put the path of the include files I need when I go to the <strong>Properties</strong> of the project under <strong>Additional Include Directories</strong> field.
  And under <strong>Additional Include Directories</strong> I can put the path of boost library.</p>
  
  <p>Now I can not find <strong>Properties</strong> when I right-click on my project to add what I need.</p>
  
  <p>My <em>boost include directory</em> is under <em>/home/ubuntu/boost_1_70_0</em></p>
  
  <p>My <em>boost libraries directory</em> is under <em>/home/ubuntu/boost_1_70_0/stage</em></p>
  
  <p>How can add them in my CMake project? </p>
  
  <p>Thank you!</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>This is my CMakelists.txt file:</p>
  
  <pre><code># CMakeList.txt : CMake project for CMakeProject1, include source and define
  # project specific logic here.
  #
  cmake_minimum_required (VERSION 3.8)
  
  # Add source to this project's executable.
  add_executable (CMakeProject1 "CMakeProject1.cpp" "CMakeProject1.h")
  
  
  set(Boost_USE_STATIC_LIBS ON) 
  set(Boost_USE_MULTITHREADED OFF)  
  set(Boost_USE_STATIC_RUNTIME OFF) 
  find_package(Boost 1.70.0 REQUIRED COMPONENTS lambda) 
  
  if(Boost_FOUND)
      include_directories(${Boost_INCLUDE_DIRS}) 
      add_executable(CMakeProject1 CMakeProject1.cpp) 
      target_link_libraries(CMakeProject1 ${Boost_LIBRARIES})
  endif()
  
  # TODO: Add tests and install targets if needed.
  </code></pre>
  
  <p>And this is my .cpp file:</p>
  
  <pre><code>#include "CMakeProject1.h"
  #include &lt;iostream&gt;
  #include &lt;iterator&gt;
  #include &lt;algorithm&gt;
  #include &lt;boost/lambda/lambda.hpp&gt;
  using namespace std;
  
  int main()
  {
      typedef std::istream_iterator&lt;int&gt; in;
  
      std::cout &lt;&lt; "Type in any number: ";
  
      std::for_each(
          in(std::cin), in(), std::cout
          &lt;&lt; (boost::lambda::_1 * 10)
          &lt;&lt; "\nType in another number: ");
  }
  </code></pre>
  
  <p>The path of my boost directory is: <em>/home/ubuntu/boost_1_70_0</em></p>
  
  <p>The path of my boost libraries is: <em>/home/ubuntu/boost_1_70_0/stage</em></p>
  
  <p>When I run the .cpp file this CMake error occurs: </p>
  
  <blockquote>
    <p>Error     CMake Error at CMakeProject1/CMakeLists.txt:13 (find_package): 
    Could not find a package configuration file provided by "Boost"
    (requested   version 1.70.0) with any of the following names:</p>
  
  <pre><code>BoostConfig.cmake
  boost-config.cmake
  </code></pre>
    
    <p>Add the installation prefix of "Boost" to CMAKE_PREFIX_PATH or set<br>
    "Boost_DIR" to a directory containing one of the above files.  If
    "Boost"   provides a separate development package or SDK, be sure it
    has been   installed.</p>
  </blockquote>