Skip to content

Commit 0bff4d8

Browse files
author
Mark Jan van Kampen
committed
Fixes requirements
1 parent a3eb3a4 commit 0bff4d8

File tree

4 files changed

+9
-62
lines changed

4 files changed

+9
-62
lines changed

recipes/rapidcheck/all/conanfile.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ def package(self):
9494
self._create_cmake_module_alias_targets(
9595
os.path.join(self.package_folder, self._module_file_rel_path),
9696
{"rapidcheck": "rapidcheck::rapidcheck",
97-
"rapidcheck_catch":"rapidcheck::catch",
98-
"rapidcheck_gmock": "rapidcheck::gmock",
99-
"rapidcheck_gtest": "rapidcheck::gtest"}
97+
"rapidcheck_catch":"rapidcheck::rapidcheck_catch",
98+
"rapidcheck_gmock": "rapidcheck::rapidcheck_gmock",
99+
"rapidcheck_gtest": "rapidcheck::rapidcheck_gtest"}
100100
)
101101

102102
@staticmethod
@@ -137,12 +137,9 @@ def package_info(self):
137137
self.cpp_info.components["core"].defines.append("RC_DONT_USE_RTTI")
138138

139139
if self.options.enable_catch:
140-
self.cpp_info.components["core"].requires.append("catch2::catch2")
141-
self.cpp_info.components["catch"].requires = ["core", "catch2::catch2"]
140+
self.cpp_info.components["rapidcheck_catch"].requires = ["core", "catch2::catch2"]
142141
if self.options.enable_gmock:
143-
self.cpp_info.components["core"].requires.append("gtest::gtest")
144-
self.cpp_info.components["gmock"].requires = ["core"]
142+
self.cpp_info.components["rapidcheck_gmock"].requires = ["core", "gtest::gtest"]
145143
if self.options.enable_gtest:
146-
self.cpp_info.components["core"].requires.append("gtest::gtest")
147-
self.cpp_info.components["gtest"].requires = ["core"]
144+
self.cpp_info.components["rapidcheck_gtest"].requires = ["core", "gtest::gtest"]
148145

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/CMakeLists.txt b/CMakeLists.txt
2-
index 92bc63c7df2cb87b5e5672a7651dbb4eafa3aaa7..c57b700157360f4b5a2e280167e821f567bb31ea 100644
2+
index 92bc63c7df2cb87b5e5672a7651dbb4eafa3aaa7..14000896cd4e6ebcde3f2154b85caf4f5cca056b 100644
33
--- a/CMakeLists.txt
44
+++ b/CMakeLists.txt
55
@@ -106,8 +106,6 @@ if(RC_ENABLE_RTTI)
@@ -11,20 +11,3 @@ index 92bc63c7df2cb87b5e5672a7651dbb4eafa3aaa7..c57b700157360f4b5a2e280167e821f5
1111
if(RC_ENABLE_TESTS)
1212
enable_testing()
1313
add_subdirectory(test)
14-
@@ -117,6 +115,16 @@ if(RC_ENABLE_EXAMPLES)
15-
add_subdirectory(examples)
16-
endif()
17-
18-
+if (RC_ENABLE_CATCH)
19-
+ find_package(Catch2 REQUIRED)
20-
+ target_link_libraries(rapidcheck PUBLIC Catch2::Catch2)
21-
+endif()
22-
+
23-
+if (RC_ENABLE_GMOCK OR RC_ENABLE_GTEST)
24-
+ find_package(GTest REQUIRED)
25-
+ target_link_libraries(rapidcheck PUBLIC GTest::GTest)
26-
+endif()
27-
+
28-
add_subdirectory(extras)
29-
30-
# Install the export file specifying all the targets for RapidCheck
Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/CMakeLists.txt b/CMakeLists.txt
2-
index 9f583afc171fab0a6894ffd64a0c787fd806bbaa..da2389500c99e4e4b59c772ee25285e2a9607de5 100644
2+
index 9f583afc171fab0a6894ffd64a0c787fd806bbaa..ea31145f55fe1010fe36739c17a655309db552f1 100644
33
--- a/CMakeLists.txt
44
+++ b/CMakeLists.txt
55
@@ -106,8 +106,6 @@ if(NOT RC_ENABLE_RTTI)
@@ -11,19 +11,3 @@ index 9f583afc171fab0a6894ffd64a0c787fd806bbaa..da2389500c99e4e4b59c772ee25285e2
1111
if(RC_ENABLE_TESTS)
1212
enable_testing()
1313
add_subdirectory(test)
14-
@@ -116,6 +114,15 @@ endif()
15-
if(RC_ENABLE_EXAMPLES)
16-
add_subdirectory(examples)
17-
endif()
18-
+if (RC_ENABLE_CATCH)
19-
+ find_package(Catch2 REQUIRED)
20-
+ target_link_libraries(rapidcheck PUBLIC Catch2::Catch2)
21-
+endif()
22-
+
23-
+if (RC_ENABLE_GMOCK OR RC_ENABLE_GTEST)
24-
+ find_package(GTest REQUIRED)
25-
+ target_link_libraries(rapidcheck PUBLIC GTest::GTest)
26-
+endif()
27-
28-
add_subdirectory(extras)
29-
Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/CMakeLists.txt b/CMakeLists.txt
2-
index 15c46d01288dce235179b791770187f5a38230ab..0c47308162af09841789ff9791b11839d524f852 100644
2+
index 15c46d01288dce235179b791770187f5a38230ab..1805354a744931086622c41fa5a640c283142adc 100644
33
--- a/CMakeLists.txt
44
+++ b/CMakeLists.txt
55
@@ -111,8 +111,6 @@ if(NOT RC_ENABLE_RTTI)
@@ -11,20 +11,3 @@ index 15c46d01288dce235179b791770187f5a38230ab..0c47308162af09841789ff9791b11839
1111
if(RC_ENABLE_TESTS)
1212
enable_testing()
1313
add_subdirectory(test)
14-
@@ -122,6 +120,16 @@ if(RC_ENABLE_EXAMPLES)
15-
add_subdirectory(examples)
16-
endif()
17-
18-
+if (RC_ENABLE_CATCH)
19-
+ find_package(Catch2 REQUIRED)
20-
+ target_link_libraries(rapidcheck PUBLIC Catch2::Catch2)
21-
+endif()
22-
+
23-
+if (RC_ENABLE_GMOCK OR RC_ENABLE_GTEST)
24-
+ find_package(GTest REQUIRED)
25-
+ target_link_libraries(rapidcheck PUBLIC GTest::GTest)
26-
+endif()
27-
+
28-
add_subdirectory(extras)
29-
30-
# Install the export file specifying all the targets for RapidCheck

0 commit comments

Comments
 (0)