mirror of
https://github.com/conan-io/conan-center-index.git
synced 2025-11-08 15:03:03 +00:00
(#15496) flex: Avoid CMakeDeps messing with Conan targets
* Avoid CMakeDeps messing with Conan targets * Getting back m4 as normal requires
This commit is contained in:
committed by
GitHub
parent
fc5e36d7c0
commit
747838f1fa
@@ -34,6 +34,11 @@ class FlexConan(ConanFile):
|
||||
def export_sources(self):
|
||||
export_conandata_patches(self)
|
||||
|
||||
def requirements(self):
|
||||
# Flex requires M4 to be compiled. If consumer does not have M4
|
||||
# installed, Conan will need to know that Flex requires it.
|
||||
self.requires("m4/1.4.19")
|
||||
|
||||
def build_requirements(self):
|
||||
self.tool_requires("m4/1.4.19")
|
||||
if hasattr(self, "settings_build") and cross_building(self):
|
||||
@@ -82,6 +87,8 @@ class FlexConan(ConanFile):
|
||||
def package_info(self):
|
||||
self.cpp_info.libs = ["fl"]
|
||||
self.cpp_info.system_libs = ["m"]
|
||||
# Avoid CMakeDeps messing with Conan targets
|
||||
self.cpp_info.set_property("cmake_find_mode", "none")
|
||||
|
||||
bindir = os.path.join(self.package_folder, "bin")
|
||||
self.output.info("Appending PATH environment variable: {}".format(bindir))
|
||||
|
||||
@@ -9,7 +9,7 @@ from conan.tools.cmake import CMake, cmake_layout
|
||||
|
||||
class TestPackageConan(ConanFile):
|
||||
settings = "os", "arch", "compiler", "build_type"
|
||||
generators = "CMakeToolchain", "VirtualBuildEnv", "VirtualRunEnv"
|
||||
generators = "CMakeToolchain", "VirtualBuildEnv", "VirtualRunEnv", "CMakeDeps"
|
||||
test_type = "explicit"
|
||||
|
||||
def requirements(self):
|
||||
|
||||
Reference in New Issue
Block a user