"examples/community/img2img_inpainting.py" did not exist on "ce31f83d8c44c977dcf8413c99b8a6cb7f189c07"
Unverified Commit 7d066556 authored by SpaceIm's avatar SpaceIm Committed by GitHub
Browse files

Allow yaml-cpp to be installed from another project (#1007)

Changes YAML_CPP_INSTALL from a cmake_dependent_option to an option.

Fixes #756, #847, and #1011.
parent 0e6e98e8
......@@ -9,6 +9,11 @@ endif()
project(YAML_CPP VERSION 0.7.0 LANGUAGES CXX)
set(YAML_CPP_MAIN_PROJECT OFF)
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
set(YAML_CPP_MAIN_PROJECT ON)
endif()
include(CMakePackageConfigHelpers)
include(CMakeDependentOption)
include(CheckCXXCompilerFlag)
......@@ -17,6 +22,7 @@ include(GNUInstallDirs)
option(YAML_CPP_BUILD_CONTRIB "Enable yaml-cpp contrib in library" ON)
option(YAML_CPP_BUILD_TOOLS "Enable parse tools" ON)
option(YAML_BUILD_SHARED_LIBS "Build yaml-cpp shared library" ${BUILD_SHARED_LIBS})
option(YAML_CPP_INSTALL "Enable generation of yaml-cpp install targets" ${YAML_CPP_MAIN_PROJECT})
option(YAML_CPP_FORMAT_SOURCE "Format source" ON)
if (YAML_CPP_BUILD_TESTS)
......@@ -30,9 +36,6 @@ endif()
cmake_dependent_option(YAML_CPP_BUILD_TESTS
"Enable yaml-cpp tests" ON
"BUILD_TESTING;CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR" OFF)
cmake_dependent_option(YAML_CPP_INSTALL
"Enable generation of yaml-cpp install targets" ON
"CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR" OFF)
cmake_dependent_option(YAML_MSVC_SHARED_RT
"MSVC: Build yaml-cpp with shared runtime libs (/MD)" ON
"CMAKE_SYSTEM_NAME MATCHES Windows" OFF)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment