1 from conan
import ConanFile
2 from conan
.tools
.cmake
import CMakeToolchain
, CMake
5 class aConan(ConanFile
):
9 topics
= ("algorithm",)
10 author
= "tqfx tqfx@tqfx.org"
11 homepage
= url
= "https://github.com/tqfx/liba.git"
12 description
= "An algorithm library based on C/C++"
13 settings
= "os", "compiler", "build_type", "arch"
37 def config_options(self
):
38 if self
.settings
.os
== "Windows": # type: ignore
39 del self
.options
.fPIC
# type: ignore
42 cmake
= CMakeToolchain(self
)
43 cmake
.variables
["BUILD_TESTING"] = 0
44 cmake
.variables
["LIBA_SYMLINK"] = self
.options
.symlink
# type: ignore
45 cmake
.variables
["LIBA_PKGCONFIG"] = self
.options
.pkgconfig
# type: ignore
46 if self
.settings
.build_type
!= "Debug": # type: ignore
47 cmake
.variables
["LIBA_IPO"] = self
.options
.ipo
# type: ignore
49 cmake
.variables
["LIBA_IPO"] = 0