diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2023-09-07 11:38:59 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2023-09-07 11:38:59 +0200 |
| commit | 13cf6fe70cc68bd4d803385f5c6d7fe9c7691247 (patch) | |
| tree | e36644032f4c04134ec0754bb1bbbbe8df633954 /conanfile.py | |
| parent | 77bf36d5183eb11642bdff771750a38d1b8fa8bd (diff) | |
| download | wanda-13cf6fe70cc68bd4d803385f5c6d7fe9c7691247.tar.xz wanda-13cf6fe70cc68bd4d803385f5c6d7fe9c7691247.zip | |
build: add a build version without libraries
Diffstat (limited to 'conanfile.py')
| -rw-r--r-- | conanfile.py | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/conanfile.py b/conanfile.py index 5023db5..c54ac50 100644 --- a/conanfile.py +++ b/conanfile.py @@ -11,14 +11,21 @@ class Wanda(ConanFile): url = "https://github.com/fmorgner/wanda" license = "BSD 3-clause" description = "A wallpaper changer for the GNOME" + package_type = "library" scm = { "type": "git", "url": "auto", "revision": "auto", } generators = ("CMakeDeps",) - options = {"shared": [True, False]} - default_options = {"shared": False} + options = { + "nolibs": [True, False], + "shared": [True, False], + } + default_options = { + "nolibs": False, + "shared": False, + } settings = ( "os", "arch", @@ -30,7 +37,7 @@ class Wanda(ConanFile): tool_requires = ("cmake/[>=3.27]",) def requirements(self): - self.requires("boost/[~1.83]", transitive_headers=True, options={ + self.requires("boost/[~1.83]", transitive_headers=not self.options.nolibs, options={ "asio_no_deprecated": True, "system_no_deprecated": True, "header_only": True, @@ -38,7 +45,7 @@ class Wanda(ConanFile): self.requires("libjpeg-turbo/[~3.0]") self.requires("libpng/[~1.6]") self.requires("lyra/[~1.6]") - self.requires("spdlog/[~1.12]", transitive_headers=True, options={ + self.requires("spdlog/[~1.12]", transitive_headers=not self.options.nolibs, options={ "header_only": True, }) @@ -48,9 +55,14 @@ class Wanda(ConanFile): cmake.build() cmake.test(env="CTEST_OUTPUT_ON_FAILURE=1") + def configure(self): + if self.options.nolibs: + self.package_type = "application" + def generate(self): toolchain = CMakeToolchain(self) toolchain.variables["CMAKE_EXPORT_COMPILE_COMMANDS"] = True + toolchain.variables["WANDA_APPLICATIONS_ONLY"] = self.options.nolibs toolchain.generate() def layout(self): @@ -63,6 +75,9 @@ class Wanda(ConanFile): def package_info(self): self.runenv_info.prepend_path("PATH", os.path.join(self.package_folder, "bin")) + if self.options.nolibs: + return + self.cpp_info.components["control"].libs = ["wanda-control"] self.cpp_info.components["control"].requires = [ "meta", |
