Blob Blame History Raw
Index: rstudio-2022.07.2-576/src/cpp/CMakeLists.txt
===================================================================
--- rstudio-2022.07.2-576.orig/src/cpp/CMakeLists.txt
+++ rstudio-2022.07.2-576/src/cpp/CMakeLists.txt
@@ -218,11 +218,14 @@ else()
    find_package(yaml-cpp REQUIRED)
 endif()
 
-if(NOT EXISTS "${YAML_CPP_INCLUDE_DIR}")
-   message(FATAL_ERROR "yaml-cpp not found (re-run dependencies script to install)")
+if(yaml-cpp_FOUND AND NOT YAML_CPP_LIBRARIES)
+   # Assume yaml was found by config instead by module.
+   set(YAML_CPP_LIBRARIES yaml-cpp)
 endif()
 
-include_directories(SYSTEM "${YAML_CPP_INCLUDE_DIR}")
+if(YAML_CPP_INCLUDE_DIR)
+	include_directories(SYSTEM "${YAML_CPP_INCLUDE_DIR}")
+endif()
 
 # determine whether we should statically link boost. we always do this
 # unless we are building a non-packaged build on linux (in which case