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

Fix use of FindYAML.cmake and FindJSONCPP without pkg-config #79

Merged
merged 3 commits into from
Apr 30, 2020
Merged
Show file tree
Hide file tree
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
11 changes: 5 additions & 6 deletions cmake/FindJSONCPP.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ else()
if(JSONCPP_FOUND)
ign_pkg_config_entry(JSONCPP jsoncpp)
else()
ign_pkg_check_modules(JSONCPP jsoncpp)
ign_pkg_check_modules_quiet(JSONCPP jsoncpp)
set(JSONCPP_TARGET JSONCPP::JSONCPP)

# If that failed, then fall back to manual detection.
Expand Down Expand Up @@ -70,11 +70,10 @@ else()
include(IgnImportTarget)
ign_import_target(JSONCPP)
endif()

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
JSONCPP
REQUIRED_VARS JSONCPP_FOUND)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
JSONCPP
REQUIRED_VARS JSONCPP_FOUND)
endif()
endif()
12 changes: 6 additions & 6 deletions cmake/FindYAML.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ if(YAML_FIND_VERSION AND NOT YAML_FIND_VERSION VERSION_EQUAL "0.1")
"but you requested version ${YAML_FIND_VERSION}.")
else()
include(IgnPkgConfig)
ign_pkg_check_modules(YAML yaml-0.1)
ign_pkg_check_modules_quiet(YAML yaml-0.1)

# If that failed, then fall back to manual detection.
if(NOT YAML_FOUND)
Expand Down Expand Up @@ -87,10 +87,10 @@ else()
INTERFACE_COMPILE_DEFINITIONS "YAML_DECLARE_STATIC"
)
endif()

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
YAML
REQUIRED_VARS YAML_FOUND)
endif()

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
YAML
REQUIRED_VARS YAML_FOUND)
endif()