Skip to content

Commit

Permalink
ktx: disable -Werror
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Jan 13, 2024
1 parent a1acd75 commit 20585b7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion recipes/ktx/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from conan import ConanFile
from conan.tools.build import check_min_cppstd, stdcpp_library
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, replace_in_file
from conan.tools.scm import Version
import os

Expand Down Expand Up @@ -91,6 +91,12 @@ def _patch_sources(self):
os.remove(os.path.join(basisu_dir, "encoder", "lodepng.h"))
## zstd
rmdir(self, os.path.join(basisu_dir, "zstd"))
# Disable -Werror (newer versions have it disabled by default)
if self.version == "4.2.1":
replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"),
"-Werror", "")
replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"),
"/WX", "")

def build(self):
self._patch_sources()
Expand Down

0 comments on commit 20585b7

Please sign in to comment.