-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add xml-security-c++ 2.0.4 #23848
base: master
Are you sure you want to change the base?
Add xml-security-c++ 2.0.4 #23848
Conversation
fa3ad93
to
bd2978d
Compare
This comment has been minimized.
This comment has been minimized.
bd2978d
to
ad17296
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
e3d8667
to
6758ada
Compare
This comment has been minimized.
This comment has been minimized.
6758ada
to
c84438b
Compare
Conan v1 pipeline ❌Failure in build 8 (
Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability. Conan v2 pipeline ❌
The v2 pipeline failed. Please, review the errors and note this is required for pull requests to be merged. In case this recipe is still not ported to Conan 2.x, please, ping See details:Failure in build 8 (
Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sivachandran Thank you for your Pull Request! Please, take a look in my review. I see this package has xalan-c as dependency (optional) too, but that package is not available in CCI yet.
@@ -0,0 +1,10 @@ | |||
sources: | |||
"2.0.4": | |||
url: "https://github.com/apache/santuario-cpp/archive/refs/tags/2.0.4.zip" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
url: "https://github.com/apache/santuario-cpp/archive/refs/tags/2.0.4.zip" | |
url: | |
- "https://www.apache.org/dyn/closer.lua/santuario/c-library/xml-security-c-2.0.4.tar.gz" | |
- "https://github.com/apache/santuario-cpp/archive/refs/tags/2.0.4.tar.gz" |
Please, prefer the official download page always. Use github as mirror in that case.
patches: | ||
"2.0.4": | ||
- patch_file: "patches/001-cmake-support.patch" | ||
patch_description: "adds cmake based build system" | ||
patch_type: "conan" | ||
patch_source: "https://github.com/sivachandran/santuario-cpp/tree/cmake/2.0.4-1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
patches: | |
"2.0.4": | |
- patch_file: "patches/001-cmake-support.patch" | |
patch_description: "adds cmake based build system" | |
patch_type: "conan" | |
patch_source: "https://github.com/sivachandran/santuario-cpp/tree/cmake/2.0.4-1" |
The upstream does not offer such support and the project is abandoned. Keeping this CMake support is turn this package as maintainer of third-party. Please, use Autotools instead. In case having trouble on Windows, you still case use the template as reference: https://github.com/conan-io/conan-center-index/blob/master/docs/package_templates/autotools_package/all/conanfile.py#L150
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried using autotools. But I'm getting the below error on Windows
C:\Projects\conan-xml-security-c> conan create . --build=missing -s build_type=Release --version 2.0.4
======== Exporting recipe to the cache ========
WARN: Name containing special chars is discouraged 'xml-security-c'
xml-security-c/2.0.4: Exporting package recipe: C:\Projects\conan-xml-security-c\conanfile.py
xml-security-c/2.0.4: exports: File 'conandata.yml' found. Exporting it...
xml-security-c/2.0.4: Copied 1 '.yml' file: conandata.yml
xml-security-c/2.0.4: Copied 1 '.py' file: conanfile.py
xml-security-c/2.0.4: Exported to cache folder: C:\Users\Administrator\.conan2\p\xml-s12fed80fd5ab6\e
xml-security-c/2.0.4: Exported: xml-security-c/2.0.4#43e2efddd056d3950821fd50be2f2dd2 (2024-05-18 09:34:52 UTC)
======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=14
compiler.runtime=dynamic
compiler.runtime_type=Release
compiler.version=192
os=Windows
Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=14
compiler.runtime=dynamic
compiler.runtime_type=Release
compiler.version=192
os=Windows
======== Computing dependency graph ========
Graph root
cli
Requirements
openssl/3.2.1#00ea0b8246cb6a0d086d8817ac9ac048 - Cache
pthreads4w/3.0.0#ea8d45b75654f91aa4ab10e871c35454 - Cache
xerces-c/3.2.5#eaa4f49d6f4fa9351c8b706957ef0a99 - Cache
xml-security-c/2.0.4#43e2efddd056d3950821fd50be2f2dd2 - Cache
zlib/1.3.1#f52e03ae3d251dec704634230cd806a2 - Cache
Build requirements
autoconf/2.71#f9307992909d7fb3df459340f1932809 - Cache
automake/1.16.5#058bda3e21c36c9aa8425daf3c1faf50 - Cache
m4/1.4.19#b38ced39a01e31fef5435bc634461fd2 - Cache
msys2/cci.latest#5a31efa2bde593541fd5ac3bcc50c01c - Cache
nasm/2.15.05#058c93b2214a49ca1cfe9f8f26205568 - Cache
strawberryperl/5.32.1.1#8f83d05a60363a422f9033e52d106b47 - Cache
Resolved version ranges
zlib/[>=1.2.11 <2]: zlib/1.3.1
======== Computing necessary packages ========
xml-security-c/2.0.4: Checking 2 compatible configurations
xml-security-c/2.0.4: Compatible configurations not found in cache, checking servers
xml-security-c/2.0.4: '64b88b1839166cafcddabc2563e835d7e8fda199': compiler.cppstd=17
xml-security-c/2.0.4: '09fd4cc139eaf24e3a7395b1b5a8abaad6519d05': compiler.cppstd=20
Requirements
openssl/3.2.1#00ea0b8246cb6a0d086d8817ac9ac048:63f1dea0b7251b96ae11d5714a52751997e79429#cc00cf34647e903fd04a46b729e11da7 - Cache
pthreads4w/3.0.0#ea8d45b75654f91aa4ab10e871c35454:b0d8d5da9e382229aa905c8fba3d4c33806cb8b3#a3f21f5411cf2a614e3927520d8c8439 - Cache
xerces-c/3.2.5#eaa4f49d6f4fa9351c8b706957ef0a99:3bac124c87d70e58e0363739da6dd562a72ff985#9b90c49617b679ee6f5782f2a4e80bfa - Cache
xml-security-c/2.0.4#43e2efddd056d3950821fd50be2f2dd2:12571c219c465a2b478da97e58fe4a527149ae00 - Build
zlib/1.3.1#f52e03ae3d251dec704634230cd806a2:41ad450120fdab2266b1185a967d298f7ae52595#6513303f73b00a3c69312b4bf7cdcd9e - Cache
Build requirements
autoconf/2.71#f9307992909d7fb3df459340f1932809:da39a3ee5e6b4b0d3255bfef95601890afd80709#5b77f70c17ad1741f5845d4e468a347e - Cache
automake/1.16.5#058bda3e21c36c9aa8425daf3c1faf50:ebec3dc6d7f6b907b3ada0c3d3cdc83613a2b715#07094da42a0b39fd4b34760c5f1f3e7d - Cache
m4/1.4.19#b38ced39a01e31fef5435bc634461fd2:723257509aee8a72faf021920c2874abc738e029#f9a0d644c9e90c7024f844416dbe7384 - Cache
msys2/cci.latest#5a31efa2bde593541fd5ac3bcc50c01c:956a88975bda9dfcc485e2861d71e74bd7e2b9a5#c99a611f14016fba4a51b85204f62fa3 - Cache
Skipped binaries
nasm/2.15.05, strawberryperl/5.32.1.1
======== Installing packages ========
msys2/cci.latest: Already installed! (1 of 9)
pthreads4w/3.0.0: Already installed! (2 of 9)
xerces-c/3.2.5: Already installed! (3 of 9)
zlib/1.3.1: Already installed! (4 of 9)
m4/1.4.19: Already installed! (5 of 9)
autoconf/2.71: Already installed! (6 of 9)
openssl/3.2.1: Already installed! (7 of 9)
automake/1.16.5: Already installed! (8 of 9)
-------- Installing package xml-security-c/2.0.4 (9 of 9) --------
xml-security-c/2.0.4: Building from source
xml-security-c/2.0.4: Package xml-security-c/2.0.4:12571c219c465a2b478da97e58fe4a527149ae00
xml-security-c/2.0.4: Copying sources to build folder
xml-security-c/2.0.4: Building your package in C:\Users\Administrator\.conan2\p\b\xml-s90217545e32e4\b
xml-security-c/2.0.4: Calling generate()
xml-security-c/2.0.4: Generators folder: C:\Users\Administrator\.conan2\p\b\xml-s90217545e32e4\b\build-release\conan
xml-security-c/2.0.4: Generating aggregated env files
xml-security-c/2.0.4: Generated aggregated env files: ['conanbuild.sh', 'conanbuild.bat', 'conanrun.bat']
xml-security-c/2.0.4: Calling build()
xml-security-c/2.0.4: Calling:
> "/c/users/administrator/.conan2/p/b/xml-s90217545e32e4/b/src/configure" --disable-shared --enable-static --prefix=/ --bindir=${prefix}/bin --sbindir=${prefix}/bin --libdir=${prefix}/lib --includedir=${prefix}/include --oldincludedir=${prefix}/include --enable-shared=no --enable-static=yes --disable-xkms --with-xalan --with-openssl
xml-security-c/2.0.4: RUN: "/c/users/administrator/.conan2/p/b/xml-s90217545e32e4/b/src/configure" --disable-shared --enable-static --prefix=/ --bindir=${prefix}/bin --sbindir=${prefix}/bin --libdir=${prefix}/lib --includedir=${prefix}/include --oldincludedir=${prefix}/include --enable-shared=no --enable-static=yes --disable-xkms --with-xalan --with-openssl
conanvcvars.bat: Activating environment Visual Studio 16 - amd64 - winsdk_version=None - vcvars_ver=14.2
[vcvarsall.bat] Environment initialized for: 'x64'
mkdir: cannot create directory ‘/dev/shm’: Read-only file system
Creating /dev/shm directory failed.
POSIX semaphores and POSIX shared memory will not work
mkdir: cannot create directory ‘/dev/mqueue’: Read-only file system
Creating /dev/mqueue directory failed.
POSIX message queues will not work
configure: loading site script /etc/config.site
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /c/users/administrator/.conan2/p/msys27f2f094a41efb/p/bin/msys64/usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports the include directive... yes (GNU style)
checking for gcc... /c/users/administrator/.conan2/p/autome371915acf95c/p/res/automake-1.16/compile cl -nologo
checking whether the C compiler works... yes
checking for C compiler default output file name... conftest.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... obj
checking whether the compiler supports GNU C... no
checking whether /c/users/administrator/.conan2/p/autome371915acf95c/p/res/automake-1.16/compile cl -nologo accepts -g... no
checking for /c/users/administrator/.conan2/p/autome371915acf95c/p/res/automake-1.16/compile cl -nologo option to enable C11 features... unsupported
checking for /c/users/administrator/.conan2/p/autome371915acf95c/p/res/automake-1.16/compile cl -nologo option to enable C99 features... unsupported
checking for /c/users/administrator/.conan2/p/autome371915acf95c/p/res/automake-1.16/compile cl -nologo option to enable C89 features... unsupported
checking whether /c/users/administrator/.conan2/p/autome371915acf95c/p/res/automake-1.16/compile cl -nologo understands -c and -o together... yes
checking dependency style of /c/users/administrator/.conan2/p/autome371915acf95c/p/res/automake-1.16/compile cl -nologo... msvc7
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... unknown
checking for _LARGE_FILES value needed for large files... unknown
checking whether the compiler supports GNU C... (cached) no
checking whether /c/users/administrator/.conan2/p/autome371915acf95c/p/res/automake-1.16/compile cl -nologo accepts -g... (cached) no
checking for /c/users/administrator/.conan2/p/autome371915acf95c/p/res/automake-1.16/compile cl -nologo option to enable C11 features... (cached) unsupported
checking for /c/users/administrator/.conan2/p/autome371915acf95c/p/res/automake-1.16/compile cl -nologo option to enable C99 features... (cached) unsupported
checking for /c/users/administrator/.conan2/p/autome371915acf95c/p/res/automake-1.16/compile cl -nologo option to enable C89 features... (cached) unsupported
checking whether /c/users/administrator/.conan2/p/autome371915acf95c/p/res/automake-1.16/compile cl -nologo understands -c and -o together... (cached) yes
checking dependency style of /c/users/administrator/.conan2/p/autome371915acf95c/p/res/automake-1.16/compile cl -nologo... (cached) msvc7
checking whether the compiler supports GNU C++... no
checking whether /c/users/administrator/.conan2/p/autome371915acf95c/p/res/automake-1.16/compile cl -nologo accepts -g... no
checking for /c/users/administrator/.conan2/p/autome371915acf95c/p/res/automake-1.16/compile cl -nologo option to enable C++11 features... none needed
checking dependency style of /c/users/administrator/.conan2/p/autome371915acf95c/p/res/automake-1.16/compile cl -nologo... msvc7
checking build system type... x86_64-w64-mingw32
checking host system type... x86_64-w64-mingw32
checking how to print strings... printf
checking for a sed that does not truncate output... /c/users/administrator/.conan2/p/msys27f2f094a41efb/p/bin/msys64/usr/bin/sed
checking for grep that handles long lines and -e... /c/users/administrator/.conan2/p/msys27f2f094a41efb/p/bin/msys64/usr/bin/grep
checking for egrep... /c/users/administrator/.conan2/p/msys27f2f094a41efb/p/bin/msys64/usr/bin/grep -E
checking for fgrep... /c/users/administrator/.conan2/p/msys27f2f094a41efb/p/bin/msys64/usr/bin/grep -F
checking for non-GNU ld... link -nologo
checking if the linker (link -nologo) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... dumpbin -symbols
checking the name lister (dumpbin -symbols) interface... MS dumpbin
checking whether ln -s works... no, using cp -pR
checking the maximum length of command line arguments... 8192
checking how to convert x86_64-w64-mingw32 file names to x86_64-w64-mingw32 format... func_convert_file_msys_to_w32
checking how to convert x86_64-w64-mingw32 file names to toolchain format... func_convert_file_msys_to_w32
checking for link -nologo option to reload object files... -r
checking for objdump... :
checking how to recognize dependent libraries... file_magic ^x86 archive import|^x86 DLL
checking for dlltool... dlltool
checking how to associate runtime and link libraries... func_cygming_dll_for_implib
checking for archiver @FILE support... no
checking for strip... :
checking for ranlib... :
checking command to parse dumpbin -symbols output from /c/users/administrator/.conan2/p/autome371915acf95c/p/res/automake-1.16/compile cl -nologo object... ok
checking for sysroot... no
checking for a working dd... /c/users/administrator/.conan2/p/msys27f2f094a41efb/p/bin/msys64/usr/bin/dd
checking how to truncate binary pipes... /c/users/administrator/.conan2/p/msys27f2f094a41efb/p/bin/msys64/usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... yes
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... no
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... no
checking for dlfcn.h... no
checking for objdir... .libs
checking for /c/users/administrator/.conan2/p/autome371915acf95c/p/res/automake-1.16/compile cl -nologo option to produce PIC... -DDLL_EXPORT -DPIC
checking if /c/users/administrator/.conan2/p/autome371915acf95c/p/res/automake-1.16/compile cl -nologo PIC flag -DDLL_EXPORT -DPIC works... yes
checking if /c/users/administrator/.conan2/p/autome371915acf95c/p/res/automake-1.16/compile cl -nologo static flag works... yes
checking if /c/users/administrator/.conan2/p/autome371915acf95c/p/res/automake-1.16/compile cl -nologo supports -c -o file.obj... yes
checking if /c/users/administrator/.conan2/p/autome371915acf95c/p/res/automake-1.16/compile cl -nologo supports -c -o file.obj... (cached) yes
checking whether the /c/users/administrator/.conan2/p/autome371915acf95c/p/res/automake-1.16/compile cl -nologo linker (link -nologo) supports shared libraries... yes
checking dynamic linker characteristics... Win32 link.exe
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... no
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... /c/users/administrator/.conan2/p/autome371915acf95c/p/res/automake-1.16/compile cl -nologo -E
checking whether the /c/users/administrator/.conan2/p/autome371915acf95c/p/res/automake-1.16/compile cl -nologo linker (link -nologo) supports shared libraries... yes
checking for /c/users/administrator/.conan2/p/autome371915acf95c/p/res/automake-1.16/compile cl -nologo option to produce PIC... -DDLL_EXPORT -DPIC
checking if /c/users/administrator/.conan2/p/autome371915acf95c/p/res/automake-1.16/compile cl -nologo PIC flag -DDLL_EXPORT -DPIC works... yes
checking if /c/users/administrator/.conan2/p/autome371915acf95c/p/res/automake-1.16/compile cl -nologo static flag works... yes
checking if /c/users/administrator/.conan2/p/autome371915acf95c/p/res/automake-1.16/compile cl -nologo supports -c -o file.obj... yes
checking if /c/users/administrator/.conan2/p/autome371915acf95c/p/res/automake-1.16/compile cl -nologo supports -c -o file.obj... (cached) yes
checking whether the /c/users/administrator/.conan2/p/autome371915acf95c/p/res/automake-1.16/compile cl -nologo linker (link -nologo) supports shared libraries... yes
checking dynamic linker characteristics... Win32 link.exe
checking how to hardcode library paths into programs... immediate
checking whether ln -s works... no, using cp -pR
checking for gawk... (cached) gawk
checking for autoconf... ${SHELL} '/c/users/administrator/.conan2/p/b/xml-s90217545e32e4/b/src/build-aux/missing' autoconf
checking how to run the C preprocessor... /c/users/administrator/.conan2/p/autome371915acf95c/p/res/automake-1.16/compile cl -nologo -E
checking whether /c/users/administrator/.conan2/p/autome371915acf95c/p/res/automake-1.16/compile cl -nologo is Clang... no
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -pthread... no
checking whether pthreads work with -pthreads... no
checking whether pthreads work with -mthreads... no
checking for the pthreads library -lpthread... no
checking whether pthreads work with --thread-safe... no
checking whether pthreads work with -mt... no
checking for pthread-config... no
configure: error: unable to find pthreads, currently this is required
xml-security-c/2.0.4: ERROR:
Package '12571c219c465a2b478da97e58fe4a527149ae00' build failed
xml-security-c/2.0.4: WARN: Build folder C:\Users\Administrator\.conan2\p\b\xml-s90217545e32e4\b\build-release
ERROR: xml-security-c/2.0.4: Error in build() method, line 128
autotools.configure()
ConanException: Error 1 while executing
I understand it is failing to find pthread but I defined pthread
as requirement
...
def requirements(self):
self.requires("xerces-c/3.2.5")
if self.options.with_openssl:
self.requires("openssl/3.2.1")
else:
self.requires("nss/3.93")
if is_msvc(self):
self.requires("pthreads4w/3.0.0")
def build_requirements(self):
if self._settings_build.os == "Windows":
self.win_bash = True
if not self.conf.get("tools.microsoft.bash:path", check_type=str):
self.tool_requires("msys2/cci.latest")
if is_msvc(self):
self.tool_requires("automake/1.16.5")
...
Am I missing something else? @uilianries
def export_sources(self): | ||
export_conandata_patches(self) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def export_sources(self): | |
export_conandata_patches(self) |
|
||
def requirements(self): | ||
self.requires("xerces-c/3.2.5") | ||
self.requires("openssl/3.2.1") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.requires("openssl/3.2.1") | |
self.requires("openssl/[>=1.1 <4]") |
Some packages support version ranges:
https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/dependencies.md#version-ranges
rmdir(self, os.path.join(self.package_folder, "cmake")) | ||
|
||
def package_info(self): | ||
self.cpp_info.libs = collect_libs(self) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.cpp_info.libs = collect_libs(self) | |
self.cpp_info.libs = collect_libs(self) |
Please, avoid collect_libs()
. List the expected library names instead. It's much clear when not reviewing, but also what to expected and giving maintenance.
# if package has an official FindPACKAGE.cmake listed in https://cmake.org/cmake/help/latest/manual/cmake-modules.7.html#find-modules | ||
# examples: bzip2, freetype, gdal, icu, libcurl, libjpeg, libpng, libtiff, openssl, sqlite3, zlib... | ||
# if package provides a CMake config file (package-config.cmake or packageConfig.cmake, with package::package target, usually installed in <prefix>/lib/cmake/<package>/) | ||
self.cpp_info.set_property("cmake_file_name", "XmlSecurityC") | ||
self.cpp_info.set_property("cmake_target_name", "XmlSecurityC::XmlSecurityC") | ||
# if package provides a pkgconfig file (package.pc, usually installed in <prefix>/lib/pkgconfig/) | ||
self.cpp_info.set_property("pkg_config_name", "xml-security-c.pc") | ||
|
||
# If they are needed on Linux, m, pthread and dl are usually needed on FreeBSD too | ||
if self.settings.os in ["Linux", "FreeBSD"]: | ||
self.cpp_info.system_libs.append("pthread") | ||
elif self.settings.os == "Macos": | ||
self.cpp_info.frameworks = ["CoreFoundation", "CoreServices"] | ||
|
||
# TODO: to remove in conan v2 once cmake_find_package_* generators removed | ||
if Version(conan_version).major < 2: | ||
self.cpp_info.names["cmake_find_package"] = "XmlSecurityC" | ||
self.cpp_info.names["cmake_find_package_multi"] = "XmlSecurity-C" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# if package has an official FindPACKAGE.cmake listed in https://cmake.org/cmake/help/latest/manual/cmake-modules.7.html#find-modules | |
# examples: bzip2, freetype, gdal, icu, libcurl, libjpeg, libpng, libtiff, openssl, sqlite3, zlib... | |
# if package provides a CMake config file (package-config.cmake or packageConfig.cmake, with package::package target, usually installed in <prefix>/lib/cmake/<package>/) | |
self.cpp_info.set_property("cmake_file_name", "XmlSecurityC") | |
self.cpp_info.set_property("cmake_target_name", "XmlSecurityC::XmlSecurityC") | |
# if package provides a pkgconfig file (package.pc, usually installed in <prefix>/lib/pkgconfig/) | |
self.cpp_info.set_property("pkg_config_name", "xml-security-c.pc") | |
# If they are needed on Linux, m, pthread and dl are usually needed on FreeBSD too | |
if self.settings.os in ["Linux", "FreeBSD"]: | |
self.cpp_info.system_libs.append("pthread") | |
elif self.settings.os == "Macos": | |
self.cpp_info.frameworks = ["CoreFoundation", "CoreServices"] | |
# TODO: to remove in conan v2 once cmake_find_package_* generators removed | |
if Version(conan_version).major < 2: | |
self.cpp_info.names["cmake_find_package"] = "XmlSecurityC" | |
self.cpp_info.names["cmake_find_package_multi"] = "XmlSecurity-C" | |
if self.settings.os in ["Linux", "FreeBSD"]: | |
self.cpp_info.system_libs.append("pthread") | |
elif self.settings.os == "Macos": | |
self.cpp_info.frameworks = ["CoreFoundation", "CoreServices"] |
When not having an official CMake file provided by the upstream, or present in the official CMake modules page, please use the package name instead. The package is used by default, so you don't need to declare it. This is the default behavior expected by any package in CCI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would avoid this file, instead, try to use the official support with autotools. In case having difficulties with Autotools, please, ping for help, the community will help you.
Specify library name and version: xml-security-c/2.0.4
To build on Windows, the autotools based build system is ported to cmake. Experimental features like NSS as Crypto Provider and XKMS subsystem are built.
I'm not the author.