mirror of
https://github.com/conan-io/conan-center-index.git
synced 2025-11-30 07:05:11 +00:00
(#8571) civetweb: add version 1.15
This commit is contained in:
@@ -1,14 +1,17 @@
|
||||
sources:
|
||||
"1.13":
|
||||
url: "https://github.com/civetweb/civetweb/archive/v1.13.tar.gz"
|
||||
sha256: "a7ccc76c2f1b5f4e8d855eb328ed542f8fe3b882a6da868781799a98f4acdedc"
|
||||
"1.15":
|
||||
url: "https://github.com/civetweb/civetweb/archive/v1.15.tar.gz"
|
||||
sha256: "90a533422944ab327a4fbb9969f0845d0dba05354f9cacce3a5005fa59f593b9"
|
||||
"1.14":
|
||||
url: "https://github.com/civetweb/civetweb/archive/v1.14.tar.gz"
|
||||
sha256: "d02d7ab091c8b4edf21fc13a03c6db08a8a8b8605e35e0073251b9d88443c653"
|
||||
patches:
|
||||
"1.13":
|
||||
- patch_file: "patches/0001-fix-install-bundle.patch"
|
||||
base_path: "source_subfolder"
|
||||
url: "https://github.com/civetweb/civetweb/archive/v1.13.tar.gz"
|
||||
sha256: "a7ccc76c2f1b5f4e8d855eb328ed542f8fe3b882a6da868781799a98f4acdedc"
|
||||
patches:
|
||||
"1.14":
|
||||
- patch_file: "patches/0001-fix-install-bundle.patch"
|
||||
base_path: "source_subfolder"
|
||||
"1.13":
|
||||
- patch_file: "patches/0001-fix-install-bundle.patch"
|
||||
base_path: "source_subfolder"
|
||||
|
||||
@@ -11,9 +11,8 @@ class CivetwebConan(ConanFile):
|
||||
homepage = "https://github.com/civetweb/civetweb"
|
||||
url = "https://github.com/conan-io/conan-center-index"
|
||||
description = "Embedded C/C++ web server"
|
||||
topics = ("conan", "civetweb", "web-server", "embedded")
|
||||
exports_sources = ["CMakeLists.txt", "patches/**"]
|
||||
generators = "cmake", "cmake_find_package"
|
||||
topics = ("civetweb", "web-server", "embedded")
|
||||
generators = "cmake", "cmake_find_package", "cmake_find_package_multi"
|
||||
settings = "os", "compiler", "build_type", "arch"
|
||||
options = {
|
||||
"shared" : [True, False],
|
||||
@@ -44,6 +43,11 @@ class CivetwebConan(ConanFile):
|
||||
def _build_subfolder(self):
|
||||
return "build_subfolder"
|
||||
|
||||
def export_sources(self):
|
||||
self.copy("CMakeLists.txt")
|
||||
for patch in self.conan_data.get("patches", {}).get(self.version, []):
|
||||
self.copy(patch["patch_file"])
|
||||
|
||||
def config_options(self):
|
||||
if self.settings.os == "Windows":
|
||||
del self.options.fPIC
|
||||
@@ -59,7 +63,7 @@ class CivetwebConan(ConanFile):
|
||||
|
||||
def requirements(self):
|
||||
if self.options.with_ssl:
|
||||
self.requires("openssl/1.1.1l")
|
||||
self.requires("openssl/1.1.1m")
|
||||
|
||||
def validate(self):
|
||||
if self.options.get_safe("ssl_dynamic_loading") and not self.options["openssl"].shared:
|
||||
@@ -107,8 +111,10 @@ class CivetwebConan(ConanFile):
|
||||
def package_info(self):
|
||||
self.cpp_info.names["cmake_find_package"] = "civetweb"
|
||||
self.cpp_info.names["cmake_find_package_multi"] = "civetweb"
|
||||
self.cpp_info.set_property("cmake_target_name", "civetweb::civetweb")
|
||||
self.cpp_info.components["_civetweb"].names["cmake_find_package"] = "civetweb"
|
||||
self.cpp_info.components["_civetweb"].names["cmake_find_package_multi"] = "civetweb"
|
||||
self.cpp_info.components["_civetweb"].set_property("cmake_target_name", "civetweb::civetweb")
|
||||
self.cpp_info.components["_civetweb"].libs = ["civetweb"]
|
||||
if self.settings.os == "Linux":
|
||||
self.cpp_info.components["_civetweb"].system_libs.extend(["rt", "pthread"])
|
||||
@@ -126,6 +132,7 @@ class CivetwebConan(ConanFile):
|
||||
if self.options.with_cxx:
|
||||
self.cpp_info.components["civetweb-cpp"].names["cmake_find_package"] = "civetweb-cpp"
|
||||
self.cpp_info.components["civetweb-cpp"].names["cmake_find_package_multi"] = "civetweb-cpp"
|
||||
self.cpp_info.components["civetweb-cpp"].set_property("cmake_target_name", "civetweb::civetweb-cpp")
|
||||
self.cpp_info.components["civetweb-cpp"].libs = ["civetweb-cpp"]
|
||||
self.cpp_info.components["civetweb-cpp"].requires = ["_civetweb"]
|
||||
if self.settings.os == "Linux":
|
||||
|
||||
@@ -2,7 +2,9 @@ cmake_minimum_required(VERSION 3.1)
|
||||
project(test_package CXX)
|
||||
|
||||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
|
||||
conan_basic_setup()
|
||||
conan_basic_setup(TARGETS)
|
||||
|
||||
find_package(civetweb CONFIG REQUIRED)
|
||||
|
||||
add_executable(${PROJECT_NAME} test_package.cpp)
|
||||
target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS})
|
||||
target_link_libraries(${PROJECT_NAME} civetweb::civetweb)
|
||||
|
||||
@@ -4,7 +4,7 @@ from conans import ConanFile, tools, CMake
|
||||
|
||||
class TestPackageConan(ConanFile):
|
||||
settings = "os", "compiler", "build_type", "arch"
|
||||
generators = "cmake"
|
||||
generators = "cmake", "cmake_find_package_multi"
|
||||
|
||||
def build(self):
|
||||
cmake = CMake(self)
|
||||
@@ -12,6 +12,6 @@ class TestPackageConan(ConanFile):
|
||||
cmake.build()
|
||||
|
||||
def test(self):
|
||||
if not tools.cross_building(self.settings):
|
||||
if not tools.cross_building(self):
|
||||
bin_path = os.path.join("bin", "test_package")
|
||||
self.run(bin_path, run_environment=True)
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
versions:
|
||||
"1.13":
|
||||
"1.15":
|
||||
folder: all
|
||||
"1.14":
|
||||
folder: all
|
||||
"1.13":
|
||||
folder: all
|
||||
|
||||
Reference in New Issue
Block a user