def build(self): for f in glob.glob("*.cmake"): tools.replace_in_file( f, "$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:>", "", strict=False) tools.replace_in_file( f, "$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,MODULE_LIBRARY>:>", "", strict=False) tools.replace_in_file( f, "$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:>", "", strict=False) tools.replace_in_file( f, "$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:-Wl,--export-dynamic>", "", strict=False) tools.replace_in_file( f, "$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,MODULE_LIBRARY>:-Wl,--export-dynamic>", "", strict=False) with tools.vcvars( self.settings ) if self.settings.compiler == "Visual Studio" else tools.no_op(): # next lines force cmake package to be in PATH before the one provided by visual studio (vcvars) build_env = tools.RunEnvironment( self ).vars if self.settings.compiler == "Visual Studio" else {} build_env["MAKEFLAGS"] = "j%d" % tools.cpu_count() build_env["PKG_CONFIG_PATH"] = [self.build_folder] if self.settings.os == "Windows": build_env["PATH"].append( os.path.join(self.source_folder, "qt6", "gnuwin32", "bin")) if self.settings.compiler == "Visual Studio": # this avoids cmake using gcc from strawberryperl build_env["CC"] = "cl" build_env["CXX"] = "cl" with tools.environment_append(build_env): if tools.os_info.is_macos: open(".qmake.stash", "w").close() open(".qmake.super", "w").close() cmake = self._configure_cmake() if tools.os_info.is_macos: with open("bash_env", "w") as f: f.write('export DYLD_LIBRARY_PATH="%s"' % ":".join( RunEnvironment(self).vars["DYLD_LIBRARY_PATH"])) with tools.environment_append( {"BASH_ENV": os.path.abspath("bash_env") }) if tools.os_info.is_macos else tools.no_op(): with tools.run_environment(self): cmake.build()
def build(self): if not self.options.shared: tools.replace_in_file( os.path.join(self._source_subfolder, "sigc++config.h.meson"), "define SIGC_DLL 1", "undef SIGC_DLL") with tools.environment_append(tools.RunEnvironment(self).vars): meson = self._configure_meson() meson.build()
def build(self): if self._gtk3: tools.replace_in_file( os.path.join(self._source_subfolder, "meson.build"), "\ntest(\n", "\nfalse and test(\n") with tools.environment_append(tools.RunEnvironment(self).vars): meson = self._configure_meson() meson.build()
def _build_context(self): env_build = tools.RunEnvironment(self) with tools.vcvars(self.settings): with tools.environment_append(env_build.vars): env = { "LIB": [os.path.join(self.deps_cpp_info["miniconda"].rootpath, "Library", "lib")], "CPATH": [os.path.join(self.deps_cpp_info["miniconda"].rootpath, "Library", "include")] } with tools.environment_append(env): yield
def build(self): if self._gtk3: tools.replace_in_file( os.path.join(self._source_subfolder, "meson.build"), "\ntest(\n", "\nfalse and test(\n") if tools.Version(self.version) >= "4.2.0": tools.replace_in_file( os.path.join(self._source_subfolder, "meson.build"), "gtk_update_icon_cache: true", "gtk_update_icon_cache: false") with tools.environment_append(tools.RunEnvironment(self).vars): meson = self._configure_meson() meson.build()
def build(self): for patch in self.conan_data.get("patches", {}).get(self.version, []): tools.patch(**patch) if self._gtk3: tools.replace_in_file(os.path.join(self._source_subfolder, "meson.build"), "\ntest(\n", "\nfalse and test(\n") if "4.2.0" <= tools.Version(self.version) < "4.6.1": tools.replace_in_file(os.path.join(self._source_subfolder, "meson.build"), "gtk_update_icon_cache: true", "gtk_update_icon_cache: false") if "4.6.2" <= tools.Version(self.version): tools.replace_in_file(os.path.join(self._source_subfolder, "meson.build"), "dependency(is_msvc_like ? ", "dependency(false ? ") with tools.environment_append(tools.RunEnvironment(self).vars): meson = self._configure_meson() meson.build()
def build(self): for package in self.deps_cpp_info.deps: lib_path = self.deps_cpp_info[package].rootpath for dirpath, _, filenames in os.walk(lib_path): for filename in filenames: if filename.endswith(".pc"): if filename in [ "cairo.pc", "fontconfig.pc", "xext.pc", "xi.pc", "x11.pc", "xcb.pc" ]: continue shutil.copyfile(os.path.join(dirpath, filename), filename) tools.replace_prefix_in_pc_file(filename, lib_path) with tools.environment_append(tools.RunEnvironment(self).vars): meson = self._configure_meson() meson.build()
def build(self): with tools.environment_append(tools.RunEnvironment(self).vars): meson = self._configure_meson() meson.build()
def _build_context(self): with tools.environment_append(tools.RunEnvironment(self).vars): yield
def build(self): if not tools.cross_building(self): with tools.environment_append(tools.RunEnvironment(self).vars): meson = Meson(self) meson.configure(build_folder="build") meson.build()
def build(self): meson = Meson(self) env_build = tools.RunEnvironment(self) with tools.environment_append(env_build.vars): meson.configure() meson.build()