Skip to content

Commit

Permalink
use cmake_find_package_multi (see conan-io/conan#8538 (comment))
Browse files Browse the repository at this point in the history
  • Loading branch information
garethsb committed Aug 9, 2021
1 parent 5707463 commit 88f26c6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Sandbox/conan-recipe/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ class NmosCppConan(ConanFile):
default_options = {"fPIC": True}

exports_sources = ["CMakeLists.txt"]
# is this the right choice of generators?
generators = "cmake", "cmake_find_package"
# use cmake_find_package_multi and prefer config-file packages
generators = "cmake", "cmake_find_package_multi"
_cmake = None

_source_subfolder = "source_subfolder"
Expand All @@ -45,6 +45,10 @@ def _configure_cmake(self):
if self._cmake:
return self._cmake
self._cmake = CMake(self)
# prefer config-file packages created by cmake_find_package_multi
# over any system-installed find-module packages
self._cmake.definitions["CMAKE_FIND_PACKAGE_PREFER_CONFIG"] = True
# no need to build unit tests
self._cmake.definitions["BUILD_TESTS"] = False
# the examples (nmos-cpp-registry and nmos-cpp-node) are useful utilities for users
self._cmake.definitions["BUILD_TESTS"] = True
Expand Down

0 comments on commit 88f26c6

Please sign in to comment.