Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an override flag to force vendored build #21

Merged
merged 1 commit into from
Feb 4, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ cmake_minimum_required(VERSION 3.5)

project(yaml_cpp_vendor)

option(FORCE_BUILD_VENDOR_PKG
"Build yaml-cpp from source, even if system-installed package is available"
OFF)

find_package(ament_cmake REQUIRED)

set(PACKAGE_VERSION "1.0.0")
Expand Down Expand Up @@ -69,7 +73,7 @@ endmacro()
# when building workspace A.
# This should only find a system installed yaml-cpp and thus the environment hook isn't needed.
find_package(yaml-cpp 0.6 QUIET NO_CMAKE_PACKAGE_REGISTRY)
if(NOT yaml-cpp_FOUND)
if(FORCE_BUILD_VENDOR_PKG OR NOT yaml-cpp_FOUND)
build_yaml_cpp()

if(WIN32)
Expand Down