title: How to link Folly in CLion on Mac OS
body: <p>I installed <a href="https://github.com/facebook/folly" rel="nofollow noreferrer">folly</a> by attempting both ways of installation.</p>
  
  <pre><code>brew install folly
  ./build/bootstrap-osx-homebrew.sh
  </code></pre>
  
  <p>I have verified that it's installed correctly at the location <code>/usr/local/Cellar/folly/2017.10.23.00</code>.</p>
  
  <p>Now I'm trying to use it in a HelloWorld project in <code>CLion</code>. Here is my <code>CMakeLists.txt</code> file.</p>
  
  <pre><code>cmake_minimum_required(VERSION 3.7)
  project(HelloWorld)
  message(STATUS "start running cmake....")
  set(folly_DIR /usr/local/Cellar/folly/2017.10.23.00)
  find_package(Boost 1.66)
  find_package(folly 2017.10.23.00)
  set(CMAKE_CXX_STANDARD 14)
  
  if(Boost_FOUND)
      message(STATUS "Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIRS}")
      message(STATUS "Boost_LIBRARIES: ${Boost_LIBRARIES}")
      message(STATUS "Boost_VERSION: ${Boost_VERSION}")
  
      include_directories(${Boost_INCLUDE_DIRS})
  endif()
  
  if(folly_FOUND)
      message(STATUS "folly_INCLUDE_DIRS: ${folly_INCLUDE_DIRS}")
      message(STATUS "folly_LIBRARIES: ${folly_LIBRARIES}")
      message(STATUS "folly_VERSION: ${folly_VERSION}")
  
      include_directories(${folly_INCLUDE_DIRS})
  endif()
  
  set(SOURCE_FILES main.cpp)
  add_executable(HelloWorld ${SOURCE_FILES})
  
  if(Boost_FOUND)
      target_link_libraries(HelloWorld ${Boost_LIBRARIES})
  endif()
  if(folly_FOUND)
      target_link_libraries(HelloWorld ${folly_LIBRARIES})
  endif()
  </code></pre>
  
  <p>The error I get is:</p>
  
  <pre><code>  By not providing "Findfolly.cmake" in CMAKE_MODULE_PATH this project has
    asked CMake to find a package configuration file provided by "folly", but
    CMake did not find one.
  
    Could not find a package configuration file provided by "folly" (requested
    version 2017.10.23.00) with any of the following names:
  
      follyConfig.cmake
      folly-config.cmake
  
    Add the installation prefix of "folly" to CMAKE_PREFIX_PATH or set
    "folly_DIR" to a directory containing one of the above files.  If "folly"
    provides a separate development package or SDK, be sure it has been
    installed.
  </code></pre>
  
  <p>I'm setting <code>folly_DIR</code> right at the top but it's still unable to find. What am I doing wrong?</p>