File indexing completed on 2025-01-12 12:24:06
0001 from conans import ConanFile, CMake, tools 0002 0003 class KArchiveConan(ConanFile): 0004 name = "KArchive" 0005 version = "5.37.0" 0006 license = "LGPL-2.1" 0007 url = "https://api.kde.org/frameworks/karchive/html/index.html" 0008 settings = "os", "compiler", "build_type", "arch" 0009 0010 # build this as shared library by default, but static builds are an option 0011 options = {"shared": [True, False]} 0012 default_options = "shared=True" 0013 generators = "cmake" 0014 exports_sources = "*" 0015 0016 def build(self): 0017 cmake = CMake(self) 0018 0019 # change the library install dir to just "lib" as that's what Conan expects in its packages 0020 args = ['-DCMAKE_INSTALL_PREFIX="%s"' % self.package_folder, 0021 '-DKDE_INSTALL_LIBDIR=lib'] 0022 self.run('cmake %s %s %s' % (self.source_folder, cmake.command_line, " ".join(args))) 0023 self.run("cmake --build . --target install %s" % cmake.build_config) 0024 0025 def package(self): 0026 # ideally nothing here, cmake with install takes care of it 0027 pass 0028 0029 def package_info(self): 0030 self.cpp_info.libs = ["KF5Archive"] 0031 self.cpp_info.includedirs = ['include/KF5', 'include/KF5/KArchive']