|
@@ -31,12 +31,20 @@ package("catch2")
|
|
on_load(function (package)
|
|
on_load(function (package)
|
|
if package:version():ge("3.0") then
|
|
if package:version():ge("3.0") then
|
|
package:add("deps", "cmake")
|
|
package:add("deps", "cmake")
|
|
- package:add("links", "Catch2Main", "Catch2")
|
|
|
|
|
|
+ package:add("components", "main", "lib")
|
|
else
|
|
else
|
|
package:set("kind", "library", {headeronly = true})
|
|
package:set("kind", "library", {headeronly = true})
|
|
end
|
|
end
|
|
end)
|
|
end)
|
|
|
|
|
|
|
|
+ on_component("main", function (package, component)
|
|
|
|
+ component:add("links", "Catch2Main")
|
|
|
|
+ end)
|
|
|
|
+
|
|
|
|
+ on_component("lib", function (package, component)
|
|
|
|
+ component:add("links", "Catch2")
|
|
|
|
+ end)
|
|
|
|
+
|
|
on_install(function (package)
|
|
on_install(function (package)
|
|
if package:version():ge("3.0") then
|
|
if package:version():ge("3.0") then
|
|
local configs = {"-DCATCH_INSTALL_DOCS=OFF", "-DCATCH_BUILD_TESTING=OFF", "-DCATCH_BUILD_EXAMPLES=OFF"}
|
|
local configs = {"-DCATCH_INSTALL_DOCS=OFF", "-DCATCH_BUILD_TESTING=OFF", "-DCATCH_BUILD_EXAMPLES=OFF"}
|