def package_info(self): proj_version = tools.Version(self.version) cmake_config_filename = "proj" if proj_version >= "7.0.0" else "proj4" cmake_namespace = "PROJ" if proj_version >= "7.0.0" else "PROJ4" self.cpp_info.filenames["cmake_find_package"] = cmake_config_filename self.cpp_info.filenames["cmake_find_package_multi"] = cmake_config_filename self.cpp_info.names["cmake_find_package"] = cmake_namespace self.cpp_info.names["cmake_find_package_multi"] = cmake_namespace self.cpp_info.components["projlib"].names["cmake_find_package"] = "proj" self.cpp_info.components["projlib"].names["cmake_find_package_multi"] = "proj" self.cpp_info.components["projlib"].libs = tools.collect_libs(self) if self.settings.os == "Linux": self.cpp_info.components["projlib"].system_libs.append("m") if self.options.threadsafe: self.cpp_info.components["projlib"].system_libs.append("pthread") elif self.settings.os == "Windows": if proj_version >= "7.0.0": self.cpp_info.components["projlib"].system_libs.append("shell32") if proj_version >= "7.1.0": self.cpp_info.components["projlib"].system_libs.append("Ole32") if not self.options.shared and tools.stdcpp_library(self): self.cpp_info.components["projlib"].system_libs.append(tools.stdcpp_library(self)) self.cpp_info.components["projlib"].requires.append("sqlite3::sqlite3") if self.options.get_safe("with_tiff"): self.cpp_info.components["projlib"].requires.append("libtiff::libtiff") if self.options.get_safe("with_curl"): self.cpp_info.components["projlib"].requires.append("libcurl::libcurl") if self.options.shared and self.settings.compiler == "Visual Studio": self.cpp_info.components["projlib"].defines.append("PROJ_MSVC_DLL_IMPORT") res_path = os.path.join(self.package_folder, "res") self.output.info("Appending PROJ_LIB environment variable: {}".format(res_path)) self.env_info.PROJ_LIB.append(res_path) if self.options.build_executables: bin_path = os.path.join(self.package_folder, "bin") self.output.info("Appending PATH environment variable: {}".format(bin_path)) self.env_info.PATH.append(bin_path)
def package_info(self): self.cpp_info.names["cmake_find_package"] = "GDAL" self.cpp_info.names["cmake_find_package_multi"] = "GDAL" self.cpp_info.names["pkg_config"] = "gdal" self.cpp_info.libs = tools.collect_libs(self) if self.settings.os == "Linux": self.cpp_info.system_libs.extend(["dl", "m"]) if self.options.threadsafe: self.cpp_info.system_libs.append("pthread") elif self.settings.os == "Windows": self.cpp_info.system_libs.extend(["psapi", "ws2_32"]) if self.options.with_odbc and not self.options.shared: self.cpp_info.system_libs.extend(["odbc32", "odbccp32"]) if self.settings.compiler == "Visual Studio": self.cpp_info.system_libs.append("legacy_stdio_definitions") if not self.options.shared and tools.stdcpp_library(self): self.cpp_info.system_libs.append(tools.stdcpp_library(self)) gdal_data_path = os.path.join(self.package_folder, "res", "gdal") self.output.info("Appending GDAL_DATA environment variable: {}".format(gdal_data_path)) self.env_info.GDAL_DATA.append(gdal_data_path) bin_path = os.path.join(self.package_folder, "bin") self.output.info("Appending PATH environment variable: {}".format(bin_path)) self.env_info.PATH.append(bin_path)
def package_info(self): self.cpp_info.names["pkg_config"] = "openvr" self.cpp_info.libs = tools.collect_libs(self) self.cpp_info.includedirs.append(os.path.join("include", "openvr")) if not self.options.shared: self.cpp_info.defines.append("OPENVR_BUILD_STATIC") libcxx = tools.stdcpp_library(self) if libcxx: self.cpp_info.system_libs.append(libcxx) if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs.append("dl") if tools.is_apple_os(self.settings.os): self.cpp_info.frameworks.append("Foundation")
def package_info(self): self.cpp_info.names["pkg_config"] = "x265" self.cpp_info.libs = ["x265"] if self.settings.os == "Windows": if self.options.shared: self.cpp_info.defines.append("X265_API_IMPORTS") elif self.settings.os == "Linux": self.cpp_info.system_libs.extend(["dl", "pthread", "m"]) if not self.options.shared: if self.settings.compiler != "Visual Studio": self.cpp_info.sharedlinkflags = ["-Wl,-Bsymbolic,-znoexecstack"] elif self.settings.os == "Android": self.cpp_info.libs.extend(["dl", "m"]) libcxx = tools.stdcpp_library(self) if libcxx: self.cpp_info.system_libs.append(libcxx)
def package_info(self): self.cpp_info.set_property("pkg_config_name", "mysqlclient") self.cpp_info.names["pkg_config"] = "mysqlclient" self.cpp_info.libs = [ "libmysql" if self.settings.os == "Windows" and self.options.shared else "mysqlclient" ] if not self.options.shared: stdcpp_library = tools.stdcpp_library(self) if stdcpp_library: self.cpp_info.system_libs.append(stdcpp_library) if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs.append("m") # TODO: There is no official FindMySQL.cmake, but it's a common Find files in many projects # do we want to support it in CMakeDeps? self.cpp_info.names["cmake_find_package"] = "MySQL" self.cpp_info.names["cmake_find_package_multi"] = "MySQL"
def package_info(self): self.cpp_info.names["cmake_find_package"] = "OpenAL" self.cpp_info.names["cmake_find_package_multi"] = "OpenAL" self.cpp_info.libs = tools.collect_libs(self) self.cpp_info.includedirs.append(os.path.join("include", "AL")) if self.settings.os == "Linux": self.cpp_info.system_libs.extend(["dl", "m"]) elif self.settings.os == "Macos": self.cpp_info.frameworks.extend( ["AudioToolbox", "CoreAudio", "CoreFoundation"]) elif self.settings.os == "Windows": self.cpp_info.system_libs.extend( ["winmm", "ole32", "shell32", "User32"]) if self._openal_cxx_backend: libcxx = tools.stdcpp_library(self) if libcxx: self.cpp_info.system_libs.append(libcxx) if not self.options.shared: self.cpp_info.defines.append("AL_LIBTYPE_STATIC")
def configure(self): if self.settings.compiler.get_safe("cppstd"): tools.check_min_cppstd(self, 17) def lazy_lt_semver(v1, v2): lv1 = [int(v) for v in v1.split(".")] lv2 = [int(v) for v in v2.split(".")] min_length = min(len(lv1), len(lv2)) return lv1[:min_length] < lv2[:min_length] minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) if not minimum_version: self.output.warn("{} {} requires C++17. Your compiler is unknown. Assuming it supports C++17.".format(self.name, self.version)) elif lazy_lt_semver(str(self.settings.compiler.version), minimum_version): raise ConanInvalidConfiguration("{} {} requires C++17, which your compiler does not support.".format(self.name, self.version)) if self.settings.compiler == "clang" and tools.Version(self.settings.compiler.version) == "7" and \ tools.stdcpp_library(self) == "stdc++": raise ConanInvalidConfiguration("{} {} does not support clang 7 with libstdc++.".format(self.name, self.version))
def package_info(self): self.cpp_info.names[ "pkg_config"] = "taglib_full_package" # unofficial, to avoid conflicts in pkg_config generator self.cpp_info.components["tag"].names["pkg_config"] = "taglib" self.cpp_info.components["tag"].includedirs.append( os.path.join("include", "taglib")) self.cpp_info.components["tag"].libs = ["tag"] self.cpp_info.components["tag"].requires = ["zlib::zlib"] if not self.options.shared: self.cpp_info.components["tag"].defines.append("TAGLIB_STATIC") if self.options.bindings: self.cpp_info.components["tag_c"].names["pkg_config"] = "taglib_c" self.cpp_info.components["tag_c"].libs = ["tag_c"] self.cpp_info.components["tag_c"].requires = ["tag"] if not self.options.shared: libcxx = tools.stdcpp_library(self) if libcxx: self.cpp_info.components["tag"].system_libs.append(libcxx)
def package_info(self): self.cpp_info.set_property("cmake_file_name", "Ktx") self.cpp_info.set_property("cmake_target_name", "KTX") self.cpp_info.components["libktx"].set_property( "cmake_target_name", "ktx") self.cpp_info.filenames["cmake_find_package"] = "Ktx" self.cpp_info.filenames["cmake_find_package_multi"] = "Ktx" self.cpp_info.names["cmake_find_package"] = "KTX" self.cpp_info.names["cmake_find_package_multi"] = "KTX" self.cpp_info.components["libktx"].names["cmake_find_package"] = "ktx" self.cpp_info.components["libktx"].names[ "cmake_find_package_multi"] = "ktx" self.cpp_info.components["libktx"].libs = ["ktx"] self.cpp_info.components["libktx"].defines = [ "KTX_FEATURE_KTX1", "KTX_FEATURE_KTX2", "KTX_FEATURE_WRITE" ] if not self.options.shared: self.cpp_info.components["libktx"].defines.append("KHRONOS_STATIC") stdcpp_library = tools.stdcpp_library(self) if stdcpp_library: self.cpp_info.components["libktx"].system_libs.append( stdcpp_library) if self.settings.os == "Windows": self.cpp_info.components["libktx"].defines.append( "BASISU_NO_ITERATOR_DEBUG_LEVEL") elif self.settings.os == "Linux": self.cpp_info.components["libktx"].system_libs.extend( ["m", "dl", "pthread"]) self.cpp_info.components["libktx"].requires = [ "lodepng::lodepng", "zstd::zstd" ] if self.options.tools: bin_path = os.path.join(self.package_folder, "bin") self.output.info( "Appending PATH environment variable: {}".format(bin_path)) self.env_info.PATH.append(bin_path)
def _configure_cmake(self): if self._cmake: return self._cmake self._cmake = CMake(self) self._cmake.definitions["DISABLE_SHARED"] = not self.options.shared self._cmake.definitions["DISABLE_STATIC"] = self.options.shared self._cmake.definitions["STACK_DIRECTION"] = "-1" # stack grows downwards, on very few platforms stack grows upwards self._cmake.definitions["REQUIRE_STDCPP"] = tools.stdcpp_library(self) if self.settings.compiler == "Visual Studio": if self.settings.compiler.runtime == "MD" or self.settings.compiler.runtime == "MDd": self._cmake.definitions["WINDOWS_RUNTIME_MD"] = True if self.options.with_ssl: self._cmake.definitions["WITH_SSL"] = "system" if self.options.with_zlib: self._cmake.definitions["WITH_ZLIB"] = "system" self._cmake.configure(source_dir=self._source_subfolder) return self._cmake
def _configure_autotools(self): if self._autotools: return self._autotools configure_dir = self._source_subfolder with tools.chdir(configure_dir): self.run("autoconf -i", win_bash=tools.os_info.is_windows) self._autotools = AutoToolsBuildEnvironment( self, win_bash=tools.os_info.is_windows) args = [] args.append("--datarootdir={}".format( tools.unix_path(os.path.join(self.package_folder, "res")))) # Shared/Static if self.options.shared: args.extend(["--disable-static", "--enable-shared"]) else: args.extend(["--disable-shared", "--enable-static"]) # Enable C++14 if requested in conan profile if self.settings.compiler.cppstd and tools.valid_min_cppstd(self, 14): args.append("--with-cpp14") # Debug if self.settings.build_type == "Debug": args.append("--enable-debug") # SIMD Intrinsics simd_intrinsics = self.options.get_safe("simd_intrinsics", False) if not simd_intrinsics: args.extend(["--without-sse", "--without-ssse3", "--without-avx"]) elif simd_intrinsics == "sse": args.extend(["--with-sse", "--without-ssse3", "--without-avx"]) elif simd_intrinsics == "ssse3": args.extend(["--with-sse", "--with-ssse3", "--without-avx"]) elif simd_intrinsics == "avx": args.extend(["--with-sse", "--with-ssse3", "--with-avx"]) # LTO (disabled) args.append("--disable-lto") # Symbols args.append("--with-hide_internal_symbols") # Do not add /usr/local/lib and /usr/local/include args.append("--without-local") # Threadsafe args.append("--with-threads={}".format( "yes" if self.options.threadsafe else "no")) # Depencencies: args.append("--with-proj=yes") # always required ! args.append( "--with-libz={}".format("yes" if self.options.with_zlib else "no")) args.append("--with-libiconv-prefix={}".format( tools.unix_path(self.deps_cpp_info["libiconv"].rootpath))) args.append( "--with-liblzma=no" ) # always disabled: liblzma is an optional transitive dependency of gdal (through libtiff). args.append("--with-zstd={}".format( "yes" if self.options.get_safe("with_zstd") else "no" )) # Optional direct dependency of gdal only if lerc lib enabled if tools.Version(self.version) >= "3.2.0": args.append( "--without-libdeflate" ) # TODO: to implement when libdeflate recipe available # Drivers: if not (self.options.with_zlib and self.options.with_png and bool(self.options.with_jpeg)): # MRF raster driver always depends on zlib, libpng and libjpeg: https://github.com/OSGeo/gdal/issues/2581 if tools.Version(self.version) < "3.0.0": args.append("--without-mrf") else: args.append("--disable-driver-mrf") args.append( "--with-pg={}".format("yes" if self.options.with_pg else "no")) args.extend(["--without-grass", "--without-libgrass" ]) # TODO: to implement when libgrass lib available args.append("--with-cfitsio={}".format( tools.unix_path(self.deps_cpp_info["cfitsio"].rootpath) if self. options.with_cfitsio else "no")) args.append("--with-pcraster={}".format( "internal" if self.options.with_pcraster else "no" )) # TODO: use conan recipe when available instead of internal one args.append("--with-png={}".format( tools.unix_path(self.deps_cpp_info["libpng"].rootpath) if self. options.with_png else "no")) args.append("--with-dds={}".format( tools.unix_path(self.deps_cpp_info["crunch"].rootpath) if self. options.with_dds else "no")) args.append("--with-gta={}".format( tools.unix_path(self.deps_cpp_info["libgta"].rootpath) if self. options.with_gta else "no")) args.append("--with-pcidsk={}".format( "internal" if self.options.with_pcidsk else "no" )) # TODO: use conan recipe when available instead of internal one args.append("--with-libtiff={}".format( tools.unix_path( self.deps_cpp_info["libtiff"].rootpath))) # always required ! args.append("--with-geotiff={}".format( tools.unix_path(self.deps_cpp_info["libgeotiff"].rootpath)) ) # always required ! if self.options.with_jpeg == "libjpeg": args.append("--with-jpeg={}".format( tools.unix_path(self.deps_cpp_info["libjpeg"].rootpath))) elif self.options.with_jpeg == "libjpeg-turbo": args.append("--with-jpeg={}".format( tools.unix_path(self.deps_cpp_info["libjpeg-turbo"].rootpath))) else: args.append("--without-jpeg") args.append("--without-jpeg12" ) # disabled: it requires internal libjpeg and libgeotiff args.append("--with-charls={}".format( "yes" if self.options.with_charls else "no")) args.append("--with-gif={}".format( tools.unix_path(self.deps_cpp_info["giflib"].rootpath) if self. options.with_gif else "no")) args.append( "--without-ogdi" ) # TODO: to implement when ogdi lib available (https://sourceforge.net/projects/ogdi/) args.append("--without-fme") # commercial library args.append( "--without-sosi") # TODO: to implement when fyba lib available args.append("--without-mongocxx" ) # TODO: to implement when mongocxx lib available args.append( "--with-hdf4={}".format("yes" if self.options.with_hdf4 else "no")) args.append( "--with-hdf5={}".format("yes" if self.options.with_hdf5 else "no")) args.append( "--with-kea={}".format("yes" if self.options.with_kea else "no")) args.append("--without-netcdf" ) # TODO: to implement when netcdf-c lib available args.append("--with-jasper={}".format( tools.unix_path(self.deps_cpp_info["jasper"].rootpath) if self. options.with_jasper else "no")) args.append("--with-openjpeg={}".format( "yes" if self.options.with_openjpeg else "no")) args.append( "--without-fgdb" ) # TODO: to implement when file-geodatabase-api lib available args.append("--without-ecw") # commercial library args.append("--without-kakadu") # commercial library args.extend( ["--without-mrsid", "--without-jp2mrsid", "--without-mrsid_lidar"]) # commercial library args.append("--without-jp2lura") # commercial library args.append("--without-msg") # commercial library args.append("--without-oci") # TODO args.append( "--with-gnm={}".format("yes" if self.options.with_gnm else "no")) args.append("--with-mysql={}".format( "yes" if bool(self.options.with_mysql) else "no")) args.append("--without-ingres") # commercial library args.append("--with-xerces={}".format( tools.unix_path(self.deps_cpp_info["xerces-c"].rootpath) if self. options.with_xerces else "no")) args.append("--with-expat={}".format( "yes" if self.options.with_expat else "no")) args.append("--with-libkml={}".format( tools.unix_path(self.deps_cpp_info["libkml"].rootpath) if self. options.with_libkml else "no")) if self.options.with_odbc: args.append("--with-odbc={}".format( "yes" if self.settings.os == "Windows" else tools. unix_path(self.deps_cpp_info["odbc"].rootpath))) else: args.append("--without-odbc") args.append("--without-dods-root" ) # TODO: to implement when libdap lib available args.append( "--with-curl={}".format("yes" if self.options.with_curl else "no")) args.append( "--with-xml2={}".format("yes" if self.options.with_xml2 else "no")) args.append("--without-spatialite" ) # TODO: to implement when libspatialite lib available args.append("--with-sqlite3={}".format( "yes" if self.options.get_safe("with_sqlite3") else "no")) args.append("--without-rasterlite2" ) # TODO: to implement when rasterlite2 lib available args.append("--with-pcre={}".format( "yes" if self.options.get_safe("with_pcre") else "no")) args.append("--without-teigha") # commercial library args.append("--without-idb") # commercial library if tools.Version(self.version) < "3.2.0": args.append("--without-sde") # commercial library args.append("--without-epsilon" ) # TODO: to implement when epsilon lib available args.append("--with-webp={}".format( tools.unix_path(self.deps_cpp_info["libwebp"].rootpath) if self. options.with_webp else "no")) args.append( "--with-geos={}".format("yes" if self.options.with_geos else "no")) args.append( "--without-sfcgal") # TODO: to implement when sfcgal lib available args.append("--with-qhull={}".format( "yes" if self.options.with_qhull else "no")) args.append( "--without-opencl" ) # TODO: to implement when opencl-headers available (and also OpenCL lib?) args.append("--with-freexl={}".format( "yes" if self.options.with_freexl else "no")) args.append("--with-libjson-c={}".format( tools.unix_path( self.deps_cpp_info["json-c"].rootpath))) # always required ! if self.options.without_pam: args.append("--without-pam") args.append("--without-poppler" ) # TODO: to implement when poppler lib available args.append( "--without-podofo") # TODO: to implement when podofo lib available args.append( "--without-pdfium") # TODO: to implement when pdfium lib available args.append("--without-perl") args.append("--without-python") args.append("--without-java") args.append("--without-hdfs") if tools.Version(self.version) >= "3.0.0": args.append("--without-tiledb" ) # TODO: to implement when tiledb lib available args.append("--without-mdb") args.append("--without-rasdaman" ) # TODO: to implement when rasdaman lib available if tools.Version(self.version) >= "3.1.0": args.append("--without-rdb") # commercial library args.append("--without-armadillo" ) # TODO: to implement when armadillo lib available args.append("--with-cryptopp={}".format( tools.unix_path(self.deps_cpp_info["cryptopp"].rootpath) if self. options.with_cryptopp else "no")) args.append("--with-crypto={}".format( "yes" if self.options.with_crypto else "no")) args.append("--with-lerc={}".format( "no" if self.options.without_lerc else "yes")) if self.options.with_null: args.append("--with-null") if self.options.get_safe("with_exr") is not None: args.append("--with-exr={}".format( "yes" if self.options.with_exr else "no")) if tools.Version(self.version) >= "3.2.0": args.append("--without-heif" ) # TODO: to implement when libheif recipe available # Inject -stdlib=libc++ for clang with libc++ env_build_vars = self._autotools.vars if self.settings.compiler == "clang" and \ self.settings.os == "Linux" and tools.stdcpp_library(self) == "c++": env_build_vars["LDFLAGS"] = "-stdlib=libc++ {}".format( env_build_vars["LDFLAGS"]) with tools.chdir(configure_dir): self._autotools.configure(args=args, vars=env_build_vars) return self._autotools
def package_info(self): self.cpp_info.filenames["cmake_find_package"] = "SPIRV-Tools" self.cpp_info.filenames["cmake_find_package_multi"] = "SPIRV-Tools" self.cpp_info.names[ "pkg_config"] = "SPIRV-Tools-shared" if self.options.shared else "SPIRV-Tools" # SPIRV-Tools self.cpp_info.components["spirv-tools-core"].names[ "cmake_find_package"] = "SPIRV-Tools" self.cpp_info.components["spirv-tools-core"].names[ "cmake_find_package_multi"] = "SPIRV-Tools" self.cpp_info.components["spirv-tools-core"].builddirs.append( self._module_subfolder) self.cpp_info.components["spirv-tools-core"].build_modules[ "cmake_find_package"] = [self._module_file_rel_path] self.cpp_info.components["spirv-tools-core"].build_modules[ "cmake_find_package_multi"] = [self._module_file_rel_path] self.cpp_info.components["spirv-tools-core"].libs = [ "SPIRV-Tools-shared" if self.options.shared else "SPIRV-Tools" ] self.cpp_info.components["spirv-tools-core"].requires = [ "spirv-headers::spirv-headers" ] if self.options.shared: self.cpp_info.components["spirv-tools-core"].defines = [ "SPIRV_TOOLS_SHAREDLIB" ] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["spirv-tools-core"].system_libs.extend( ["m", "rt"]) if not self.options.shared and tools.stdcpp_library(self): self.cpp_info.components["spirv-tools-core"].system_libs.append( tools.stdcpp_library(self)) # FIXME: others components should have their own CMake config file if not self.options.shared: # SPIRV-Tools-opt self.cpp_info.components["spirv-tools-opt"].names[ "cmake_find_package"] = "SPIRV-Tools-opt" self.cpp_info.components["spirv-tools-opt"].names[ "cmake_find_package_multi"] = "SPIRV-Tools-opt" self.cpp_info.components["spirv-tools-opt"].builddirs.append( self._module_subfolder) self.cpp_info.components["spirv-tools-opt"].build_modules[ "cmake_find_package"] = [self._module_file_rel_path] self.cpp_info.components["spirv-tools-opt"].build_modules[ "cmake_find_package_multi"] = [self._module_file_rel_path] self.cpp_info.components["spirv-tools-opt"].libs = [ "SPIRV-Tools-opt" ] self.cpp_info.components["spirv-tools-opt"].requires = [ "spirv-tools-core", "spirv-headers::spirv-headers" ] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["spirv-tools-opt"].system_libs.append( "m") # SPIRV-Tools-link self.cpp_info.components["spirv-tools-link"].names[ "cmake_find_package"] = "SPIRV-Tools-link" self.cpp_info.components["spirv-tools-link"].names[ "cmake_find_package_multi"] = "SPIRV-Tools-link" self.cpp_info.components["spirv-tools-link"].builddirs.append( self._module_subfolder) self.cpp_info.components["spirv-tools-link"].build_modules[ "cmake_find_package"] = [self._module_file_rel_path] self.cpp_info.components["spirv-tools-link"].build_modules[ "cmake_find_package_multi"] = [self._module_file_rel_path] self.cpp_info.components["spirv-tools-link"].libs = [ "SPIRV-Tools-link" ] self.cpp_info.components["spirv-tools-link"].requires = [ "spirv-tools-core", "spirv-tools-opt" ] # SPIRV-Tools-reduce self.cpp_info.components["spirv-tools-reduce"].names[ "cmake_find_package"] = "SPIRV-Tools-reduce" self.cpp_info.components["spirv-tools-reduce"].names[ "cmake_find_package_multi"] = "SPIRV-Tools-reduce" self.cpp_info.components["spirv-tools-reduce"].builddirs.append( self._module_subfolder) self.cpp_info.components["spirv-tools-reduce"].build_modules[ "cmake_find_package"] = [self._module_file_rel_path] self.cpp_info.components["spirv-tools-reduce"].build_modules[ "cmake_find_package_multi"] = [self._module_file_rel_path] self.cpp_info.components["spirv-tools-reduce"].libs = [ "SPIRV-Tools-reduce" ] self.cpp_info.components["spirv-tools-reduce"].requires = [ "spirv-tools-core", "spirv-tools-opt" ] # SPIRV-Tools-lint if tools.Version(self.version) >= "2021.3": self.cpp_info.components["spirv-tools-lint"].names[ "cmake_find_package"] = "SPIRV-Tools-lint" self.cpp_info.components["spirv-tools-lint"].names[ "cmake_find_package_multi"] = "SPIRV-Tools-lint" self.cpp_info.components["spirv-tools-lint"].builddirs.append( self._module_subfolder) self.cpp_info.components["spirv-tools-lint"].build_modules[ "cmake_find_package"] = [self._module_file_rel_path] self.cpp_info.components["spirv-tools-lint"].build_modules[ "cmake_find_package_multi"] = [self._module_file_rel_path] self.cpp_info.components["spirv-tools-lint"].libs = [ "SPIRV-Tools-lint" ] self.cpp_info.components["spirv-tools-lint"].requires = [ "spirv-tools-core", "spirv-tools-opt" ] if self.options.build_executables: bin_path = os.path.join(self.package_folder, "bin") self.output.info( "Appending PATH environment variable: {}".format(bin_path)) self.env_info.path.append(bin_path)
def package_info(self): self.cpp_info.libs = tools.collect_libs(self) if not self.options.shared and tools.stdcpp_library(self): self.cpp_info.system_libs.append(tools.stdcpp_library(self)) if self.options.shared and self.settings.os == "Windows": self.cpp_info.defines = ["MESHOPTIMIZER_API=__declspec(dllimport)"]
def package_info(self): self.cpp_info.names[ "pkg_config"] = "SPIRV-Tools-shared" if self.options.shared else "SPIRV-Tools" # FIXME: official CMake imported targets are not namespaced # SPIRV-Tools self.cpp_info.components["spirv-tools-core"].names[ "cmake_find_package"] = "SPIRV-Tools" self.cpp_info.components["spirv-tools-core"].names[ "cmake_find_package_multi"] = "SPIRV-Tools" self.cpp_info.components["spirv-tools-core"].libs = [ "SPIRV-Tools-shared" if self.options.shared else "SPIRV-Tools" ] self.cpp_info.components["spirv-tools-core"].requires = [ "spirv-headers::spirv-headers" ] if self.options.shared: self.cpp_info.components["spirv-tools-core"].defines = [ "SPIRV_TOOLS_SHAREDLIB" ] if self.settings.os == "Linux": self.cpp_info.components["spirv-tools-core"].system_libs.append( "rt") if not self.options.shared and tools.stdcpp_library(self): self.cpp_info.components["spirv-tools-core"].system_libs.append( tools.stdcpp_library(self)) # Also provide official CMake imported target names for SPIRV-Tools lib: # - if shared: SPIRV-Tools-shared # - if static: SPIRV-Tools-static if version >= 2020.5 else SPIRV-Tools spirv_tools_target = "SPIRV-Tools-shared" if self.options.shared else "SPIRV-Tools-static" self.cpp_info.components["spirv-tools-core-alias"].names[ "cmake_find_package"] = spirv_tools_target self.cpp_info.components["spirv-tools-core-alias"].names[ "cmake_find_package_multi"] = spirv_tools_target # FIXME: others components should have their own CMake config file if not self.options.shared: # SPIRV-Tools-opt self.cpp_info.components["spirv-tools-opt"].names[ "cmake_find_package"] = "SPIRV-Tools-opt" self.cpp_info.components["spirv-tools-opt"].names[ "cmake_find_package_multi"] = "SPIRV-Tools-opt" self.cpp_info.components["spirv-tools-opt"].libs = [ "SPIRV-Tools-opt" ] self.cpp_info.components["spirv-tools-opt"].requires = [ "spirv-tools-core", "spirv-headers::spirv-headers" ] if self.settings.os == "Linux": self.cpp_info.components["spirv-tools-opt"].system_libs.append( "m") # SPIRV-Tools-link self.cpp_info.components["spirv-tools-link"].names[ "cmake_find_package"] = "SPIRV-Tools-link" self.cpp_info.components["spirv-tools-link"].names[ "cmake_find_package_multi"] = "SPIRV-Tools-link" self.cpp_info.components["spirv-tools-link"].libs = [ "SPIRV-Tools-link" ] self.cpp_info.components["spirv-tools-link"].requires = [ "spirv-tools-core", "spirv-tools-opt" ] # SPIRV-Tools-reduce self.cpp_info.components["spirv-tools-reduce"].names[ "cmake_find_package"] = "SPIRV-Tools-reduce" self.cpp_info.components["spirv-tools-reduce"].names[ "cmake_find_package_multi"] = "SPIRV-Tools-reduce" self.cpp_info.components["spirv-tools-reduce"].libs = [ "SPIRV-Tools-reduce" ] self.cpp_info.components["spirv-tools-reduce"].requires = [ "spirv-tools-core", "spirv-tools-opt" ] bin_path = os.path.join(self.package_folder, "bin") self.output.info("Appending PATH environment variable: %s" % bin_path) self.env_info.path.append(bin_path)
def libcxx(): libcxx = tools.stdcpp_library(self) return [libcxx] if libcxx and not self.options.shared else []
def package_info(self): self.cpp_info.set_property("cmake_file_name", "AWSSDK") # core component self.cpp_info.components["core"].set_property("cmake_target_name", "AWS::aws-sdk-cpp-core") self.cpp_info.components["core"].set_property("pkg_config_name", "aws-sdk-cpp-core") self.cpp_info.components["core"].libs = ["aws-cpp-sdk-core"] self.cpp_info.components["core"].requires = ["aws-c-common::aws-c-common-lib"] if self._use_aws_crt_cpp: self.cpp_info.components["core"].requires.extend([ "aws-c-cal::aws-c-cal-lib", "aws-c-http::aws-c-http-lib", "aws-c-io::aws-c-io-lib", "aws-crt-cpp::aws-crt-cpp-lib", ]) else: self.cpp_info.components["core"].requires.append("aws-c-event-stream::aws-c-event-stream-lib") # other components enabled_sdks = [sdk for sdk in self._sdks if self.options.get_safe(sdk)] for hl_comp in self._internal_requirements.keys(): if getattr(self.options, hl_comp): for internal_requirement in self._internal_requirements[hl_comp]: if internal_requirement not in enabled_sdks: enabled_sdks.append(internal_requirement) for sdk in enabled_sdks: # TODO: there is no way to properly emulate COMPONENTS names for # find_package(AWSSDK COMPONENTS <sdk>) in set_property() # right now: see https://github.com/conan-io/conan/issues/10258 self.cpp_info.components[sdk].set_property("cmake_target_name", "AWS::aws-sdk-cpp-{}".format(sdk)) self.cpp_info.components[sdk].set_property("pkg_config_name", "aws-sdk-cpp-{}".format(sdk)) self.cpp_info.components[sdk].requires = ["core"] if sdk in self._internal_requirements: self.cpp_info.components[sdk].requires.extend(self._internal_requirements[sdk]) self.cpp_info.components[sdk].libs = ["aws-cpp-sdk-" + sdk] # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.components[sdk].names["cmake_find_package"] = "aws-sdk-cpp-" + sdk self.cpp_info.components[sdk].names["cmake_find_package_multi"] = "aws-sdk-cpp-" + sdk component_alias = "aws-sdk-cpp-{}_alias".format(sdk) # to emulate COMPONENTS names for find_package() self.cpp_info.components[component_alias].names["cmake_find_package"] = sdk self.cpp_info.components[component_alias].names["cmake_find_package_multi"] = sdk self.cpp_info.components[component_alias].requires = [sdk] # specific system_libs, frameworks and requires of components if self.settings.os == "Windows": self.cpp_info.components["core"].system_libs.extend([ "winhttp", "wininet", "bcrypt", "userenv", "version", "ws2_32" ]) if self.options.get_safe("text-to-speech"): self.cpp_info.components["text-to-speech"].system_libs.append("winmm") else: self.cpp_info.components["core"].requires.extend(["libcurl::curl", "openssl::openssl"]) if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["core"].system_libs.append("atomic") if self.options.get_safe("text-to-speech"): self.cpp_info.components["text-to-speech"].requires.append("pulseaudio::pulseaudio") if self.settings.os == "Macos": if self.options.get_safe("text-to-speech"): self.cpp_info.components["text-to-speech"].frameworks.append("CoreAudio") lib_stdcpp = tools.stdcpp_library(self) if lib_stdcpp: self.cpp_info.components["core"].system_libs.append(lib_stdcpp) # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.filenames["cmake_find_package"] = "AWSSDK" self.cpp_info.filenames["cmake_find_package_multi"] = "AWSSDK" self.cpp_info.names["cmake_find_package"] = "AWS" self.cpp_info.names["cmake_find_package_multi"] = "AWS" self.cpp_info.components["core"].names["cmake_find_package"] = "aws-sdk-cpp-core" self.cpp_info.components["core"].names["cmake_find_package_multi"] = "aws-sdk-cpp-core" self.cpp_info.components["plugin_scripts"].requires = ["core"] self.cpp_info.components["plugin_scripts"].builddirs.extend([ os.path.join(self._res_folder, "cmake"), os.path.join(self._res_folder, "toolchains")]) self.cpp_info.components["plugin_scripts"].build_modules.append(os.path.join(self._res_folder, "cmake", "sdk_plugin_conf.cmake"))
def package_info(self): proj_version = tools.Version(self.version) cmake_config_filename = "proj" if proj_version >= "7.0.0" else "proj4" cmake_namespace = "PROJ" if proj_version >= "7.0.0" else "PROJ4" self.cpp_info.set_property("cmake_file_name", cmake_config_filename) self.cpp_info.set_property("cmake_target_name", "{}::proj".format(cmake_namespace)) self.cpp_info.set_property("pkg_config_name", "proj") self.cpp_info.components["projlib"].set_property( "cmake_target_name", "{}::proj".format(cmake_namespace)) self.cpp_info.components["projlib"].set_property( "pkg_config_name", "proj") self.cpp_info.filenames["cmake_find_package"] = cmake_config_filename self.cpp_info.filenames[ "cmake_find_package_multi"] = cmake_config_filename self.cpp_info.names["cmake_find_package"] = cmake_namespace self.cpp_info.names["cmake_find_package_multi"] = cmake_namespace self.cpp_info.components["projlib"].names[ "cmake_find_package"] = "proj" self.cpp_info.components["projlib"].names[ "cmake_find_package_multi"] = "proj" self.cpp_info.components["projlib"].libs = tools.collect_libs(self) if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["projlib"].system_libs.append("m") if self.options.threadsafe: self.cpp_info.components["projlib"].system_libs.append( "pthread") elif self.settings.os == "Windows": if proj_version >= "7.0.0": self.cpp_info.components["projlib"].system_libs.append( "shell32") if proj_version >= "7.1.0": self.cpp_info.components["projlib"].system_libs.append("Ole32") if not self.options.shared and tools.stdcpp_library(self): self.cpp_info.components["projlib"].system_libs.append( tools.stdcpp_library(self)) self.cpp_info.components["projlib"].requires.extend( ["nlohmann_json::nlohmann_json", "sqlite3::sqlite3"]) if self.options.get_safe("with_tiff"): self.cpp_info.components["projlib"].requires.append( "libtiff::libtiff") if self.options.get_safe("with_curl"): self.cpp_info.components["projlib"].requires.append( "libcurl::libcurl") if tools.Version(self.version) < "8.2.0": if self.options.shared and self.settings.compiler in [ "Visual Studio", "msvc" ]: self.cpp_info.components["projlib"].defines.append( "PROJ_MSVC_DLL_IMPORT") else: if not self.options.shared: self.cpp_info.components["projlib"].defines.append("PROJ_DLL=") res_path = os.path.join(self.package_folder, "res") self.output.info( "Prepending to PROJ_LIB environment variable: {}".format(res_path)) self.runenv_info.prepend_path("PROJ_LIB", res_path) # TODO: to remove after conan v2, it allows to not break consumers still relying on virtualenv generator self.env_info.PROJ_LIB = res_path if self.options.build_executables: self.buildenv_info.prepend_path("PROJ_LIB", res_path) bin_path = os.path.join(self.package_folder, "bin") self.output.info( "Appending PATH environment variable: {}".format(bin_path)) self.env_info.PATH.append(bin_path)
def package_info(self): self.cpp_info.set_property("cmake_file_name", "SPIRV-Tools") self.cpp_info.set_property( "pkg_config_name", "SPIRV-Tools-shared" if self.options.shared else "SPIRV-Tools") # SPIRV-Tools self.cpp_info.components["spirv-tools-core"].set_property( "cmake_target_name", "SPIRV-Tools-shared" if self.options.shared else "SPIRV-Tools-static", ) self.cpp_info.components["spirv-tools-core"].set_property( "cmake_target_aliases", ["SPIRV-Tools"]) # before 2020.5, kept for conveniency self.cpp_info.components["spirv-tools-core"].libs = [ "SPIRV-Tools-shared" if self.options.shared else "SPIRV-Tools" ] self.cpp_info.components["spirv-tools-core"].requires = [ "spirv-headers::spirv-headers" ] if self.options.shared: self.cpp_info.components["spirv-tools-core"].defines = [ "SPIRV_TOOLS_SHAREDLIB" ] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["spirv-tools-core"].system_libs.extend( ["m", "rt"]) if not self.options.shared and tools.stdcpp_library(self): self.cpp_info.components["spirv-tools-core"].system_libs.append( tools.stdcpp_library(self)) # FIXME: others components should have their own CMake config file if not self.options.shared: # SPIRV-Tools-opt self.cpp_info.components["spirv-tools-opt"].set_property( "cmake_target_name", "SPIRV-Tools-opt") self.cpp_info.components["spirv-tools-opt"].libs = [ "SPIRV-Tools-opt" ] self.cpp_info.components["spirv-tools-opt"].requires = [ "spirv-tools-core", "spirv-headers::spirv-headers" ] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["spirv-tools-opt"].system_libs.append( "m") # SPIRV-Tools-link self.cpp_info.components["spirv-tools-link"].set_property( "cmake_target_name", "SPIRV-Tools-link") self.cpp_info.components["spirv-tools-link"].libs = [ "SPIRV-Tools-link" ] self.cpp_info.components["spirv-tools-link"].requires = [ "spirv-tools-core", "spirv-tools-opt" ] # SPIRV-Tools-reduce self.cpp_info.components["spirv-tools-reduce"].set_property( "cmake_target_name", "SPIRV-Tools-reduce") self.cpp_info.components["spirv-tools-reduce"].libs = [ "SPIRV-Tools-reduce" ] self.cpp_info.components["spirv-tools-reduce"].requires = [ "spirv-tools-core", "spirv-tools-opt" ] # SPIRV-Tools-lint if self._has_spirv_tools_lint: self.cpp_info.components["spirv-tools-lint"].set_property( "cmake_target_name", "SPIRV-Tools-lint") self.cpp_info.components["spirv-tools-lint"].libs = [ "SPIRV-Tools-lint" ] self.cpp_info.components["spirv-tools-lint"].requires = [ "spirv-tools-core", "spirv-tools-opt" ] if self.options.build_executables: bin_path = os.path.join(self.package_folder, "bin") self.output.info( "Appending PATH environment variable: {}".format(bin_path)) self.env_info.path.append(bin_path) # TODO: to remove in conan v2 once cmake_find_package* & pkg_config generators removed self.cpp_info.filenames["cmake_find_package"] = "SPIRV-Tools" self.cpp_info.filenames["cmake_find_package_multi"] = "SPIRV-Tools" self.cpp_info.names[ "pkg_config"] = "SPIRV-Tools-shared" if self.options.shared else "SPIRV-Tools" self.cpp_info.components["spirv-tools-core"].names[ "cmake_find_package"] = "SPIRV-Tools" self.cpp_info.components["spirv-tools-core"].names[ "cmake_find_package_multi"] = "SPIRV-Tools" self.cpp_info.components["spirv-tools-core"].build_modules[ "cmake_find_package"] = [self._module_file_rel_path] self.cpp_info.components["spirv-tools-core"].build_modules[ "cmake_find_package_multi"] = [self._module_file_rel_path] if not self.options.shared: self.cpp_info.components["spirv-tools-opt"].names[ "cmake_find_package"] = "SPIRV-Tools-opt" self.cpp_info.components["spirv-tools-opt"].names[ "cmake_find_package_multi"] = "SPIRV-Tools-opt" self.cpp_info.components["spirv-tools-opt"].build_modules[ "cmake_find_package"] = [self._module_file_rel_path] self.cpp_info.components["spirv-tools-opt"].build_modules[ "cmake_find_package_multi"] = [self._module_file_rel_path] self.cpp_info.components["spirv-tools-link"].names[ "cmake_find_package"] = "SPIRV-Tools-link" self.cpp_info.components["spirv-tools-link"].names[ "cmake_find_package_multi"] = "SPIRV-Tools-link" self.cpp_info.components["spirv-tools-link"].build_modules[ "cmake_find_package"] = [self._module_file_rel_path] self.cpp_info.components["spirv-tools-link"].build_modules[ "cmake_find_package_multi"] = [self._module_file_rel_path] self.cpp_info.components["spirv-tools-reduce"].names[ "cmake_find_package"] = "SPIRV-Tools-reduce" self.cpp_info.components["spirv-tools-reduce"].names[ "cmake_find_package_multi"] = "SPIRV-Tools-reduce" self.cpp_info.components["spirv-tools-reduce"].build_modules[ "cmake_find_package"] = [self._module_file_rel_path] self.cpp_info.components["spirv-tools-reduce"].build_modules[ "cmake_find_package_multi"] = [self._module_file_rel_path] if self._has_spirv_tools_lint: self.cpp_info.components["spirv-tools-lint"].names[ "cmake_find_package"] = "SPIRV-Tools-lint" self.cpp_info.components["spirv-tools-lint"].names[ "cmake_find_package_multi"] = "SPIRV-Tools-lint" self.cpp_info.components["spirv-tools-lint"].build_modules[ "cmake_find_package"] = [self._module_file_rel_path] self.cpp_info.components["spirv-tools-lint"].build_modules[ "cmake_find_package_multi"] = [self._module_file_rel_path]
def package_info(self): self.cpp_info.filenames["cmake_find_package"] = "AWSSDK" self.cpp_info.filenames["cmake_find_package_multi"] = "AWSSDK" self.cpp_info.names["cmake_find_package"] = "AWS" self.cpp_info.names["cmake_find_package_multi"] = "AWS" self.cpp_info.components["core"].names["cmake_find_package"] = "aws-sdk-cpp-core" self.cpp_info.components["core"].names["cmake_find_package_multi"] = "aws-sdk-cpp-core" self.cpp_info.components["core"].names["pkg_config"] = "aws-sdk-cpp-core" self.cpp_info.components["core"].libs = ["aws-cpp-sdk-core"] self.cpp_info.components["core"].requires = ["aws-c-common::aws-c-common-lib"] if self._use_aws_crt_cpp: self.cpp_info.components["core"].requires.extend([ "aws-c-cal::aws-c-cal-lib", "aws-c-http::aws-c-http-lib", "aws-c-io::aws-c-io-lib", "aws-crt-cpp::aws-crt-cpp-lib", ]) else: self.cpp_info.components["core"].requires.append("aws-c-event-stream::aws-c-event-stream-lib") enabled_sdks = [sdk for sdk in self._sdks if getattr(self.options, sdk)] for hl_comp in self._internal_requirements.keys(): if getattr(self.options, hl_comp): for internal_requirement in self._internal_requirements[hl_comp]: if internal_requirement not in enabled_sdks: enabled_sdks.append(internal_requirement) for sdk in enabled_sdks: self.cpp_info.components[sdk].requires = ["core"] if sdk in self._internal_requirements: self.cpp_info.components[sdk].requires.extend(self._internal_requirements[sdk]) self.cpp_info.components[sdk].libs = ["aws-cpp-sdk-" + sdk] self.cpp_info.components[sdk].names["cmake_find_package"] = "aws-sdk-cpp-" + sdk self.cpp_info.components[sdk].names["cmake_find_package_multi"] = "aws-sdk-cpp-" + sdk self.cpp_info.components[sdk].names["pkg_config"] = "aws-sdk-cpp-" + sdk # alias name to support find_package(AWSSDK COMPONENTS s3 kms ...) component_alias = "aws-sdk-cpp-{}_alias".format(sdk) self.cpp_info.components[component_alias].names["cmake_find_package"] = sdk self.cpp_info.components[component_alias].names["cmake_find_package_multi"] = sdk self.cpp_info.components[component_alias].requires = [sdk] if self.settings.os == "Windows": self.cpp_info.components["core"].system_libs.extend(["winhttp", "wininet", "bcrypt", "userenv", "version", "ws2_32"]) if self.options.get_safe("text-to-speech"): self.cpp_info.components["text-to-speech"].system_libs.append("winmm") else: self.cpp_info.components["core"].requires.extend(["libcurl::curl", "openssl::openssl"]) if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["core"].system_libs.append("atomic") if self.options.get_safe("text-to-speech"): self.cpp_info.components["text-to-speech"].requires.append("pulseaudio::pulseaudio") if self.settings.os == "Macos": if self.options.get_safe("text-to-speech"): self.cpp_info.components["text-to-speech"].frameworks.append("CoreAudio") lib_stdcpp = tools.stdcpp_library(self) if lib_stdcpp: self.cpp_info.components["core"].system_libs.append(lib_stdcpp)
def package_info(self): # FIXME: we should generate 2 CMake config files: OpenEXRConfig.cmake and IlmBaseConfig.cmake # waiting an implementation of https://github.com/conan-io/conan/issues/9000 self.cpp_info.set_property("cmake_file_name", "OpenEXR") openexr_version = tools.Version(self.version) lib_suffix = "-{}_{}".format(openexr_version.major, openexr_version.minor) if self.settings.build_type == "Debug": lib_suffix += "_d" include_dir = os.path.join("include", "OpenEXR") # IlmImfConfig self.cpp_info.components["openexr_ilmimfconfig"].set_property( "cmake_target_name", "OpenEXR::IlmImfConfig") self.cpp_info.components["openexr_ilmimfconfig"].includedirs.append( include_dir) # IlmImf self.cpp_info.components["openexr_ilmimf"].set_property( "cmake_target_name", "OpenEXR::IlmImf") self.cpp_info.components["openexr_ilmimf"].set_property( "pkg_config_name", "OpenEXR") self.cpp_info.components["openexr_ilmimf"].includedirs.append( include_dir) self.cpp_info.components["openexr_ilmimf"].libs = [ "IlmImf{}".format(lib_suffix) ] self.cpp_info.components["openexr_ilmimf"].requires = [ "openexr_ilmimfconfig", "ilmbase_iex", "ilmbase_half", "ilmbase_imath", "ilmbase_ilmthread", "zlib::zlib", ] # IlmImfUtil self.cpp_info.components["openexr_ilmimfutil"].set_property( "cmake_target_name", "OpenEXR::IlmImfUtil") self.cpp_info.components["openexr_ilmimfutil"].includedirs.append( include_dir) self.cpp_info.components["openexr_ilmimfutil"].libs = [ "IlmImfUtil{}".format(lib_suffix) ] self.cpp_info.components["openexr_ilmimfutil"].requires = [ "openexr_ilmimfconfig", "openexr_ilmimf" ] # IlmBaseConfig self.cpp_info.components["ilmbase_ilmbaseconfig"].set_property( "cmake_target_name", "IlmBase::IlmBaseConfig") self.cpp_info.components["ilmbase_ilmbaseconfig"].includedirs.append( include_dir) # Half self.cpp_info.components["ilmbase_half"].set_property( "cmake_target_name", "IlmBase::Half") self.cpp_info.components["ilmbase_half"].includedirs.append( include_dir) self.cpp_info.components["ilmbase_half"].libs = [ "Half{}".format(lib_suffix) ] self.cpp_info.components["ilmbase_half"].requires = [ "ilmbase_ilmbaseconfig" ] # Iex self.cpp_info.components["ilmbase_half"].set_property( "cmake_target_name", "IlmBase::Iex") self.cpp_info.components["ilmbase_iex"].includedirs.append(include_dir) self.cpp_info.components["ilmbase_iex"].libs = [ "Iex{}".format(lib_suffix) ] self.cpp_info.components["ilmbase_iex"].requires = [ "ilmbase_ilmbaseconfig" ] # IexMath self.cpp_info.components["ilmbase_iexmath"].set_property( "cmake_target_name", "IlmBase::IexMath") self.cpp_info.components["ilmbase_iexmath"].includedirs.append( include_dir) self.cpp_info.components["ilmbase_iexmath"].libs = [ "IexMath{}".format(lib_suffix) ] self.cpp_info.components["ilmbase_iexmath"].requires = [ "ilmbase_ilmbaseconfig", "ilmbase_iex" ] # IMath self.cpp_info.components["ilmbase_imath"].set_property( "cmake_target_name", "IlmBase::IMath") self.cpp_info.components["ilmbase_imath"].includedirs.append( include_dir) self.cpp_info.components["ilmbase_imath"].libs = [ "Imath{}".format(lib_suffix) ] self.cpp_info.components["ilmbase_imath"].requires = [ "ilmbase_ilmbaseconfig", "ilmbase_half", "ilmbase_iexmath" ] # IlmThread self.cpp_info.components["ilmbase_ilmthread"].set_property( "cmake_target_name", "IlmBase::IlmThread") self.cpp_info.components["ilmbase_ilmthread"].includedirs.append( include_dir) self.cpp_info.components["ilmbase_ilmthread"].libs = [ "IlmThread{}".format(lib_suffix) ] self.cpp_info.components["ilmbase_ilmthread"].requires = [ "ilmbase_ilmbaseconfig", "ilmbase_iex" ] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["ilmbase_ilmthread"].system_libs.append( "pthread") # Convenient component to model official IlmBase.pc self.cpp_info.components["ilmbase_conan_pkgconfig"].set_property( "pkg_config_name", "IlmBase") self.cpp_info.components["ilmbase_conan_pkgconfig"].requires = [ "ilmbase_ilmbaseconfig", "ilmbase_half", "ilmbase_iex", "ilmbase_iexmath", "ilmbase_imath", "ilmbase_ilmthread" ] if self.options.shared and self.settings.os == "Windows": self.cpp_info.components["openexr_ilmimfconfig"].defines.append( "OPENEXR_DLL") self.cpp_info.components["ilmbase_ilmbaseconfig"].defines.append( "OPENEXR_DLL") stdlib = tools.stdcpp_library(self) if not self.options.shared and stdlib: self.cpp_info.components[ "openexr_ilmimfconfig"].system_libs.append(stdlib) self.cpp_info.components[ "ilmbase_ilmbaseconfig"].system_libs.append(stdlib) # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.names["cmake_find_package"] = "OpenEXR" self.cpp_info.names["cmake_find_package_multi"] = "OpenEXR" self.cpp_info.components["openexr_ilmimfconfig"].names[ "cmake_find_package"] = "IlmImfConfig" self.cpp_info.components["openexr_ilmimfconfig"].names[ "cmake_find_package_multi"] = "IlmImfConfig" self.cpp_info.components["openexr_ilmimf"].names[ "cmake_find_package"] = "IlmImf" self.cpp_info.components["openexr_ilmimf"].names[ "cmake_find_package_multi"] = "IlmImf" self.cpp_info.components["openexr_ilmimfutil"].names[ "cmake_find_package"] = "IlmImfUtil" self.cpp_info.components["openexr_ilmimfutil"].names[ "cmake_find_package_multi"] = "IlmImfUtil" self.cpp_info.components["ilmbase_ilmbaseconfig"].names[ "cmake_find_package"] = "IlmBaseConfig" self.cpp_info.components["ilmbase_ilmbaseconfig"].names[ "cmake_find_package_multi"] = "IlmBaseConfig" self.cpp_info.components["ilmbase_ilmbaseconfig"].build_modules[ "cmake_find_package"] = [self._module_file_rel_path] self.cpp_info.components["ilmbase_ilmbaseconfig"].build_modules[ "cmake_find_package_multi"] = [self._module_file_rel_path] self.cpp_info.components["ilmbase_half"].names[ "cmake_find_package"] = "Half" self.cpp_info.components["ilmbase_half"].names[ "cmake_find_package_multi"] = "Half" self.cpp_info.components["ilmbase_half"].build_modules[ "cmake_find_package"] = [self._module_file_rel_path] self.cpp_info.components["ilmbase_half"].build_modules[ "cmake_find_package_multi"] = [self._module_file_rel_path] self.cpp_info.components["ilmbase_iex"].names[ "cmake_find_package"] = "Iex" self.cpp_info.components["ilmbase_iex"].names[ "cmake_find_package_multi"] = "Iex" self.cpp_info.components["ilmbase_iex"].build_modules[ "cmake_find_package"] = [self._module_file_rel_path] self.cpp_info.components["ilmbase_iex"].build_modules[ "cmake_find_package_multi"] = [self._module_file_rel_path] self.cpp_info.components["ilmbase_iexmath"].names[ "cmake_find_package"] = "IexMath" self.cpp_info.components["ilmbase_iexmath"].names[ "cmake_find_package_multi"] = "IexMath" self.cpp_info.components["ilmbase_iexmath"].build_modules[ "cmake_find_package"] = [self._module_file_rel_path] self.cpp_info.components["ilmbase_iexmath"].build_modules[ "cmake_find_package_multi"] = [self._module_file_rel_path] self.cpp_info.components["ilmbase_imath"].names[ "cmake_find_package"] = "IMath" self.cpp_info.components["ilmbase_imath"].names[ "cmake_find_package_multi"] = "IMath" self.cpp_info.components["ilmbase_imath"].build_modules[ "cmake_find_package"] = [self._module_file_rel_path] self.cpp_info.components["ilmbase_imath"].build_modules[ "cmake_find_package_multi"] = [self._module_file_rel_path] self.cpp_info.components["ilmbase_ilmthread"].names[ "cmake_find_package"] = "IlmThread" self.cpp_info.components["ilmbase_ilmthread"].names[ "cmake_find_package_multi"] = "IlmThread" self.cpp_info.components["ilmbase_ilmthread"].build_modules[ "cmake_find_package"] = [self._module_file_rel_path] self.cpp_info.components["ilmbase_ilmthread"].build_modules[ "cmake_find_package_multi"] = [self._module_file_rel_path]
def package_info(self): self.cpp_info.libs = ["darknet"] if self.settings.os == "Linux": self.cpp_info.system_libs = ["m", "pthread"] if tools.stdcpp_library(self): self.cpp_info.system_libs.append(tools.stdcpp_library(self))
def package_info(self): self.cpp_info.bindirs = [] self.cpp_info.libs = ["detours"] if self.settings.compiler == "gcc": self.cpp_info.system_libs = [tools.stdcpp_library(self)] self.cpp_info.link_flags = ["-static-libgcc", "-static-libstdc++"]
def package_info(self): self.cpp_info.names["cmake_find_package"] = "ICU" self.cpp_info.names["cmake_find_package_multi"] = "ICU" # icudata self.cpp_info.components["icu-data"].names[ "cmake_find_package"] = "data" self.cpp_info.components["icu-data"].names[ "cmake_find_package_multi"] = "data" self.cpp_info.components["icu-data"].libs = [ self._lib_name("icudt" if self.settings.os == "Windows" else "icudata") ] if not self.options.shared: self.cpp_info.components["icu-data"].defines.append( "U_STATIC_IMPLEMENTATION") # icu uses c++, so add the c++ runtime if tools.stdcpp_library(self): self.cpp_info.components["icu-data"].system_libs.append( tools.stdcpp_library(self)) # Alias of data CMake component self.cpp_info.components["icu-data-alias"].names[ "cmake_find_package"] = "dt" self.cpp_info.components["icu-data-alias"].names[ "cmake_find_package_multi"] = "dt" self.cpp_info.components["icu-data-alias"].requires = ["icu-data"] # icuuc self.cpp_info.components["icu-uc"].names["cmake_find_package"] = "uc" self.cpp_info.components["icu-uc"].names[ "cmake_find_package_multi"] = "uc" self.cpp_info.components["icu-uc"].names["pkg_config"] = "icu-uc" self.cpp_info.components["icu-uc"].libs = [self._lib_name("icuuc")] self.cpp_info.components["icu-uc"].requires = ["icu-data"] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["icu-uc"].system_libs = ["m", "pthread"] if self.options.with_dyload: self.cpp_info.components["icu-uc"].system_libs.append("dl") elif self.settings.os == "Windows": self.cpp_info.components["icu-uc"].system_libs = ["advapi32"] # icui18n self.cpp_info.components["icu-i18n"].names[ "cmake_find_package"] = "i18n" self.cpp_info.components["icu-i18n"].names[ "cmake_find_package_multi"] = "i18n" self.cpp_info.components["icu-i18n"].names["pkg_config"] = "icu-i18n" self.cpp_info.components["icu-i18n"].libs = [ self._lib_name("icuin" if self.settings.os == "Windows" else "icui18n") ] self.cpp_info.components["icu-i18n"].requires = ["icu-uc"] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["icu-i18n"].system_libs = ["m"] # Alias of i18n CMake component self.cpp_info.components["icu-i18n-alias"].names[ "cmake_find_package"] = "in" self.cpp_info.components["icu-i18n-alias"].names[ "cmake_find_package_multi"] = "in" self.cpp_info.components["icu-i18n-alias"].requires = ["icu-i18n"] # icuio self.cpp_info.components["icu-io"].names["cmake_find_package"] = "io" self.cpp_info.components["icu-io"].names[ "cmake_find_package_multi"] = "io" self.cpp_info.components["icu-io"].names["pkg_config"] = "icu-io" self.cpp_info.components["icu-io"].libs = [self._lib_name("icuio")] self.cpp_info.components["icu-io"].requires = ["icu-i18n", "icu-uc"] # icutu self.cpp_info.components["icu-tu"].names["cmake_find_package"] = "tu" self.cpp_info.components["icu-tu"].names[ "cmake_find_package_multi"] = "tu" self.cpp_info.components["icu-tu"].libs = [self._lib_name("icutu")] self.cpp_info.components["icu-tu"].requires = ["icu-i18n", "icu-uc"] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["icu-tu"].system_libs = ["pthread"] # icutest self.cpp_info.components["icu-test"].names[ "cmake_find_package"] = "test" self.cpp_info.components["icu-test"].names[ "cmake_find_package_multi"] = "test" self.cpp_info.components["icu-test"].libs = [self._lib_name("icutest")] self.cpp_info.components["icu-test"].requires = ["icu-tu", "icu-uc"] if self.settings.os != "Windows" and self.options.data_packaging in [ "files", "archive" ]: data_path = os.path.join(self.package_folder, "res", self._data_filename).replace("\\", "/") self.output.info( "Appending ICU_DATA environment variable: {}".format( data_path)) self.env_info.ICU_DATA.append(data_path) bin_path = os.path.join(self.package_folder, "bin") self.output.info( "Appending PATH environment variable: {}".format(bin_path)) self.env_info.PATH.append(bin_path)
def package_info(self): self.cpp_info.set_property("cmake_find_mode", "both") self.cpp_info.set_property("cmake_file_name", "ICU") self.cpp_info.names["cmake_find_package"] = "ICU" self.cpp_info.names["cmake_find_package_multi"] = "ICU" # icudata self.cpp_info.components["icu-data"].set_property("cmake_target_name", "ICU::data") self.cpp_info.components["icu-data"].names["cmake_find_package"] = "data" self.cpp_info.components["icu-data"].names["cmake_find_package_multi"] = "data" self.cpp_info.components["icu-data"].libs = [self._lib_name("icudt" if self.settings.os == "Windows" else "icudata")] if not self.options.shared: self.cpp_info.components["icu-data"].defines.append("U_STATIC_IMPLEMENTATION") # icu uses c++, so add the c++ runtime if tools.stdcpp_library(self): self.cpp_info.components["icu-data"].system_libs.append(tools.stdcpp_library(self)) # Alias of data CMake component self.cpp_info.components["icu-data-alias"].set_property("cmake_target_name", "ICU::dt") self.cpp_info.components["icu-data-alias"].names["cmake_find_package"] = "dt" self.cpp_info.components["icu-data-alias"].names["cmake_find_package_multi"] = "dt" self.cpp_info.components["icu-data-alias"].requires = ["icu-data"] # icuuc self.cpp_info.components["icu-uc"].set_property("cmake_target_name", "ICU::uc") self.cpp_info.components["icu-uc"].set_property("pkg_config_name", "icu-uc") self.cpp_info.components["icu-uc"].names["cmake_find_package"] = "uc" self.cpp_info.components["icu-uc"].names["cmake_find_package_multi"] = "uc" self.cpp_info.components["icu-uc"].libs = [self._lib_name("icuuc")] self.cpp_info.components["icu-uc"].requires = ["icu-data"] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["icu-uc"].system_libs = ["m", "pthread"] if self.options.with_dyload: self.cpp_info.components["icu-uc"].system_libs.append("dl") elif self.settings.os == "Windows": self.cpp_info.components["icu-uc"].system_libs = ["advapi32"] # icui18n self.cpp_info.components["icu-i18n"].set_property("cmake_target_name", "ICU::i18n") self.cpp_info.components["icu-i18n"].set_property("pkg_config_name", "icu-i18n") self.cpp_info.components["icu-i18n"].names["cmake_find_package"] = "i18n" self.cpp_info.components["icu-i18n"].names["cmake_find_package_multi"] = "i18n" self.cpp_info.components["icu-i18n"].libs = [self._lib_name("icuin" if self.settings.os == "Windows" else "icui18n")] self.cpp_info.components["icu-i18n"].requires = ["icu-uc"] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["icu-i18n"].system_libs = ["m"] # Alias of i18n CMake component self.cpp_info.components["icu-i18n-alias"].set_property("cmake_target_name", "ICU::in") self.cpp_info.components["icu-i18n-alias"].names["cmake_find_package"] = "in" self.cpp_info.components["icu-i18n-alias"].names["cmake_find_package_multi"] = "in" self.cpp_info.components["icu-i18n-alias"].requires = ["icu-i18n"] # icuio if self.options.with_icuio: self.cpp_info.components["icu-io"].set_property("cmake_target_name", "ICU::io") self.cpp_info.components["icu-io"].set_property("pkg_config_name", "icu-io") self.cpp_info.components["icu-io"].names["cmake_find_package"] = "io" self.cpp_info.components["icu-io"].names["cmake_find_package_multi"] = "io" self.cpp_info.components["icu-io"].libs = [self._lib_name("icuio")] self.cpp_info.components["icu-io"].requires = ["icu-i18n", "icu-uc"] if self.settings.os != "Windows" and self.options.data_packaging in ["files", "archive"]: data_path = os.path.join(self.package_folder, "res", self._data_filename).replace("\\", "/") self.output.info("Prepending to ICU_DATA runtime environment variable: {}".format(data_path)) self.runenv_info.prepend_path("ICU_DATA", data_path) if self._enable_icu_tools or self.options.with_extras: self.buildenv_info.prepend_path("ICU_DATA", data_path) # TODO: to remove after conan v2, it allows to not break consumers still relying on virtualenv generator self.env_info.ICU_DATA.append(data_path) if self._enable_icu_tools: # icutu self.cpp_info.components["icu-tu"].set_property("cmake_target_name", "ICU::tu") self.cpp_info.components["icu-tu"].names["cmake_find_package"] = "tu" self.cpp_info.components["icu-tu"].names["cmake_find_package_multi"] = "tu" self.cpp_info.components["icu-tu"].libs = [self._lib_name("icutu")] self.cpp_info.components["icu-tu"].requires = ["icu-i18n", "icu-uc"] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["icu-tu"].system_libs = ["pthread"] # icutest self.cpp_info.components["icu-test"].set_property("cmake_target_name", "ICU::test") self.cpp_info.components["icu-test"].names["cmake_find_package"] = "test" self.cpp_info.components["icu-test"].names["cmake_find_package_multi"] = "test" self.cpp_info.components["icu-test"].libs = [self._lib_name("icutest")] self.cpp_info.components["icu-test"].requires = ["icu-tu", "icu-uc"] if self._enable_icu_tools or self.options.with_extras: bin_path = os.path.join(self.package_folder, "bin") self.output.info("Appending PATH environment variable: {}".format(bin_path)) self.env_info.PATH.append(bin_path)
def _configure_autotools(self): autotools = AutoToolsBuildEnvironment( self, win_bash=tools.os_info.is_windows) yes_no = lambda v: "yes" if v else "no" internal_no = lambda v: "internal" if v else "no" rootpath = lambda req: tools.unix_path(self.deps_cpp_info[req].rootpath ) rootpath_no = lambda v, req: rootpath(req) if v else "no" args = [] args.append("--datarootdir={}".format( tools.unix_path(os.path.join(self.package_folder, "res")))) # Shared/Static args.extend([ "--enable-static={}".format(yes_no(not self.options.shared)), "--enable-shared={}".format(yes_no(self.options.shared)), ]) args.append("--includedir={}".format( tools.unix_path( os.path.join(self.package_folder, "include", "gdal")))) # Enable C++14 if requested in conan profile or if with_charls enabled if (self.settings.compiler.cppstd and tools.valid_min_cppstd( self, 14)) or self.options.with_charls: args.append("--with-cpp14") # Debug if self.settings.build_type == "Debug": args.append("--enable-debug") # SIMD Intrinsics simd_intrinsics = self.options.get_safe("simd_intrinsics", False) if not simd_intrinsics: args.extend(["--without-sse", "--without-ssse3", "--without-avx"]) elif simd_intrinsics == "sse": args.extend(["--with-sse", "--without-ssse3", "--without-avx"]) elif simd_intrinsics == "ssse3": args.extend(["--with-sse", "--with-ssse3", "--without-avx"]) elif simd_intrinsics == "avx": args.extend(["--with-sse", "--with-ssse3", "--with-avx"]) # LTO (disabled) args.append("--disable-lto") # Symbols args.append("--with-hide_internal_symbols") # Do not add /usr/local/lib and /usr/local/include args.append("--without-local") # Threadsafe args.append("--with-threads={}".format(yes_no( self.options.threadsafe))) # Depencencies: args.append("--with-proj=yes") # always required ! args.append("--with-libz={}".format(yes_no(self.options.with_zlib))) if self._has_with_libdeflate_option: args.append("--with-libdeflate={}".format( yes_no(self.options.with_libdeflate))) args.append("--with-libiconv-prefix={}".format( rootpath_no(self.options.with_libiconv, "libiconv"))) args.append( "--with-liblzma=no" ) # always disabled: liblzma is an optional transitive dependency of gdal (through libtiff). args.append("--with-zstd={}".format( yes_no(self.options.get_safe("with_zstd")) )) # Optional direct dependency of gdal only if lerc lib enabled if self._has_with_blosc_option: args.append("--with-blosc={}".format( yes_no(self.options.with_blosc))) if self._has_with_lz4_option: args.append("--with-lz4={}".format(yes_no(self.options.with_lz4))) # Drivers: if not (self.options.with_zlib and self.options.with_png and bool(self.options.with_jpeg)): # MRF raster driver always depends on zlib, libpng and libjpeg: https://github.com/OSGeo/gdal/issues/2581 if tools.Version(self.version) < "3.0.0": args.append("--without-mrf") else: args.append("--disable-driver-mrf") args.append("--with-pg={}".format(yes_no(self.options.with_pg))) args.extend(["--without-grass", "--without-libgrass" ]) # TODO: to implement when libgrass lib available args.append("--with-cfitsio={}".format( rootpath_no(self.options.with_cfitsio, "cfitsio"))) args.append("--with-pcraster={}".format( internal_no(self.options.with_pcraster) )) # TODO: use conan recipe when available instead of internal one args.append("--with-png={}".format( rootpath_no(self.options.with_png, "libpng"))) args.append("--with-dds={}".format( rootpath_no(self.options.with_dds, "crunch"))) args.append("--with-gta={}".format( rootpath_no(self.options.with_gta, "libgta"))) args.append("--with-pcidsk={}".format( internal_no(self.options.with_pcidsk) )) # TODO: use conan recipe when available instead of internal one args.append("--with-libtiff={}".format( rootpath("libtiff"))) # always required ! args.append("--with-geotiff={}".format( rootpath("libgeotiff"))) # always required ! if self.options.with_jpeg == "libjpeg": args.append("--with-jpeg={}".format(rootpath("libjpeg"))) elif self.options.with_jpeg == "libjpeg-turbo": args.append("--with-jpeg={}".format(rootpath("libjpeg-turbo"))) else: args.append("--without-jpeg") args.append("--without-jpeg12" ) # disabled: it requires internal libjpeg and libgeotiff args.append("--with-charls={}".format(yes_no( self.options.with_charls))) args.append("--with-gif={}".format( rootpath_no(self.options.with_gif, "giflib"))) args.append( "--without-ogdi" ) # TODO: to implement when ogdi lib available (https://sourceforge.net/projects/ogdi/) args.append("--without-fme") # commercial library args.append( "--without-sosi") # TODO: to implement when fyba lib available args.append("--without-mongocxx") # TODO: handle mongo-cxx-driver v2 args.append("--with-mongocxxv3={}".format( yes_no(self.options.with_mongocxx))) args.append("--with-hdf4={}".format(yes_no(self.options.with_hdf4))) args.append("--with-hdf5={}".format(yes_no(self.options.with_hdf5))) args.append("--with-kea={}".format(yes_no(self.options.with_kea))) args.append("--with-netcdf={}".format( rootpath_no(self.options.with_netcdf, "netcdf"))) args.append("--with-jasper={}".format( rootpath_no(self.options.with_jasper, "jasper"))) args.append("--with-openjpeg={}".format( yes_no(self.options.with_openjpeg))) args.append( "--without-fgdb" ) # TODO: to implement when file-geodatabase-api lib available args.append("--without-ecw") # commercial library args.append("--without-kakadu") # commercial library args.extend( ["--without-mrsid", "--without-jp2mrsid", "--without-mrsid_lidar"]) # commercial library args.append("--without-jp2lura") # commercial library args.append("--without-msg") # commercial library args.append("--without-oci") # TODO args.append("--with-gnm={}".format(yes_no(self.options.with_gnm))) args.append("--with-mysql={}".format(yes_no(self.options.with_mysql))) args.append("--without-ingres") # commercial library args.append("--with-xerces={}".format( rootpath_no(self.options.with_xerces, "xerces-c"))) args.append("--with-expat={}".format(yes_no(self.options.with_expat))) args.append("--with-libkml={}".format( rootpath_no(self.options.with_libkml, "libkml"))) if self.options.with_odbc: args.append("--with-odbc={}".format( "yes" if self.settings.os == "Windows" else rootpath("odbc"))) else: args.append("--without-odbc") args.append("--without-dods-root" ) # TODO: to implement when libdap lib available args.append("--with-curl={}".format(yes_no(self.options.with_curl))) args.append("--with-xml2={}".format(yes_no(self.options.with_xml2))) args.append("--without-spatialite" ) # TODO: to implement when libspatialite lib available args.append("--with-sqlite3={}".format( yes_no(self.options.get_safe("with_sqlite3")))) args.append("--without-rasterlite2" ) # TODO: to implement when rasterlite2 lib available if self._has_with_pcre2_option: args.append("--with-pcre2={}".format( yes_no(self.options.get_safe("with_pcre2")))) args.append("--with-pcre={}".format( yes_no(self.options.get_safe("with_pcre")))) args.append("--without-teigha") # commercial library args.append("--without-idb") # commercial library if tools.Version(self.version) < "3.2.0": args.append("--without-sde") # commercial library if tools.Version(self.version) < "3.3.0": args.append("--without-epsilon") args.append("--with-webp={}".format( rootpath_no(self.options.with_webp, "libwebp"))) args.append("--with-geos={}".format(yes_no(self.options.with_geos))) args.append( "--without-sfcgal") # TODO: to implement when sfcgal lib available args.append("--with-qhull={}".format(yes_no(self.options.with_qhull))) if self.options.with_opencl: args.extend([ "--with-opencl", "--with-opencl-include={}".format( tools.unix_path(self.deps_cpp_info["opencl-headers"]. include_paths[0])), "--with-opencl-lib=-L{}".format( tools.unix_path( self.deps_cpp_info["opencl-icd-loader"].lib_paths[0])) ]) else: args.append("--without-opencl") args.append("--with-freexl={}".format(yes_no( self.options.with_freexl))) args.append("--with-libjson-c={}".format( rootpath("json-c"))) # always required ! if self.options.without_pam: args.append("--without-pam") args.append("--with-poppler={}".format( yes_no(self.options.with_poppler))) args.append("--with-podofo={}".format( rootpath_no(self.options.with_podofo, "podofo"))) if self.options.with_podofo: args.append("--with-podofo-lib=-l{}".format(" -l".join( self._gather_libs("podofo")))) args.append( "--without-pdfium") # TODO: to implement when pdfium lib available args.append("--without-perl") args.append("--without-python") args.append("--without-java") args.append("--without-hdfs") if tools.Version(self.version) >= "3.0.0": args.append("--without-tiledb" ) # TODO: to implement when tiledb lib available args.append("--without-mdb") args.append("--without-rasdaman" ) # TODO: to implement when rasdaman lib available if self._has_with_brunsli_option: args.append("--with-brunsli={}".format( yes_no(self.options.with_brunsli))) if tools.Version(self.version) >= "3.1.0": args.append("--without-rdb") # commercial library args.append("--without-armadillo" ) # TODO: to implement when armadillo lib available args.append("--with-cryptopp={}".format( rootpath_no(self.options.with_cryptopp, "cryptopp"))) args.append("--with-crypto={}".format(yes_no( self.options.with_crypto))) if tools.Version(self.version) >= "3.3.0": args.append("--with-lerc={}".format( internal_no(not self.options.without_lerc))) else: args.append("--with-lerc={}".format( yes_no(not self.options.without_lerc))) if self.options.with_null: args.append("--with-null") if self._has_with_exr_option: args.append("--with-exr={}".format(yes_no(self.options.with_exr))) if self._has_with_heif_option: args.append("--with-heif={}".format(yes_no( self.options.with_heif))) # Inject -stdlib=libc++ for clang with libc++ env_build_vars = autotools.vars if self.settings.compiler == "clang" and \ self.settings.os == "Linux" and tools.stdcpp_library(self) == "c++": env_build_vars["LDFLAGS"] = "-stdlib=libc++ {}".format( env_build_vars["LDFLAGS"]) autotools.configure(args=args, vars=env_build_vars) return autotools
def package_info(self): self.cpp_info.libs = ["libsoundtrackutil"] if tools.stdcpp_library(self): self.cpp_info.system_libs.append(tools.stdcpp_library(self))