|
@@ -7,14 +7,21 @@ package("quickcpplib")
|
|
add_urls("https://github.com/ned14/quickcpplib.git")
|
|
add_urls("https://github.com/ned14/quickcpplib.git")
|
|
add_versions("20221116", "52163d5a198f1d0a2583e683f090778686f9f998")
|
|
add_versions("20221116", "52163d5a198f1d0a2583e683f090778686f9f998")
|
|
|
|
|
|
- add_deps("cmake")
|
|
|
|
|
|
+ add_configs("header_only", {description = "Use header only version. (not supported atm)", default = false, type = "boolean", readonly = true})
|
|
|
|
|
|
|
|
+ add_deps("cmake")
|
|
on_install(function (package)
|
|
on_install(function (package)
|
|
- local configs = {}
|
|
|
|
- table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
|
|
|
|
|
|
+ local configs = {"-DPROJECT_IS_DEPENDENCY=ON"}
|
|
io.replace("CMakeLists.txt", "include(QuickCppLibMakeStandardTests)", "", {plain = true})
|
|
io.replace("CMakeLists.txt", "include(QuickCppLibMakeStandardTests)", "", {plain = true})
|
|
io.replace("CMakeLists.txt", "include(QuickCppLibMakeDoxygen)", "", {plain = true})
|
|
io.replace("CMakeLists.txt", "include(QuickCppLibMakeDoxygen)", "", {plain = true})
|
|
- import("package.tools.cmake").install(package, configs)
|
|
|
|
|
|
+ table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
|
|
|
|
+ local target = "quickcpplib_"
|
|
|
|
+ if package:config("header_only") then
|
|
|
|
+ target = target .. "hl"
|
|
|
|
+ else
|
|
|
|
+ target = target .. (package:config("shared") and "_dl" or "_sl")
|
|
|
|
+ end
|
|
|
|
+ import("package.tools.cmake").install(package, configs, { target = target })
|
|
end)
|
|
end)
|
|
|
|
|
|
on_test(function (package)
|
|
on_test(function (package)
|