-
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a9190fc
commit e7e0529
Showing
2 changed files
with
47 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
from conan import ConanFile | ||
from conan.tools.system import package_manager | ||
from conan.tools.gnu import PkgConfig | ||
|
||
|
||
class SysConfigOpenSSLConan(ConanFile): | ||
name = "openssl" | ||
version = "system" | ||
description = "cross-platform virtual conan package for the OpenSSL support" | ||
package_type = "shared-library" | ||
settings = "os", "arch", "compiler", "build_type" | ||
|
||
def layout(self): | ||
pass | ||
|
||
def package_id(self): | ||
self.info.clear() | ||
|
||
def system_requirements(self): | ||
apt = package_manager.Apt(self) | ||
apt.install(["libssl-dev"], check=True) | ||
|
||
pacman = package_manager.PacMan(self) | ||
pacman.install(["openssl"], check=True) | ||
|
||
def package_info(self): | ||
self.cpp_info.filenames["cmake_find_package"] = "openssl_system" | ||
self.cpp_info.filenames["cmake_find_package_multi"] = "openssl_system" | ||
|
||
self.cpp_info.set_property("cmake_file_name", "openssl_system") | ||
|
||
self.cpp_info.bindirs = [] | ||
self.cpp_info.includedirs = [] | ||
self.cpp_info.libdirs = [] | ||
|
||
if self.settings.os == "Macos": | ||
self.cpp_info.frameworks.append("libssl") | ||
self.cpp_info.frameworks.append("libcrypto") | ||
elif self.settings.os == "Windows": | ||
self.cpp_info.system_libs = ["libssl", "libcrypto"] | ||
elif self.settings.os in ["Linux", "FreeBSD"]: | ||
pkg_config = PkgConfig(self, 'openssl') | ||
pkg_config.fill_cpp_info(self.cpp_info, is_system=self.settings.os != "FreeBSD") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters