Skip to content

Commit

Permalink
Declare some CMake policies
Browse files Browse the repository at this point in the history
  • Loading branch information
Linux13524 committed Dec 8, 2022
1 parent 26660c5 commit 54d574f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions recipes/soxr/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, load, save, rmdir
from conan.tools.microsoft import msvc_runtime_flag, is_msvc
from conan.tools.scm import Version


required_conan_version = ">=1.45.0"
Expand Down Expand Up @@ -51,6 +52,11 @@ def source(self):

def generate(self):
tc = CMakeToolchain(self)
# Honor BUILD_SHARED_LIBS from conan_toolchain (see https://github.com/conan-io/conan/issues/11840)
tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW"
if Version(self.version) < "3.21":
# silence warning
tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0115"] = "OLD"
if is_msvc(self):
tc.variables["BUILD_SHARED_RUNTIME"] = msvc_runtime_flag(self) == "MD"
# Disable SIMD based resample engines for Apple Silicon architecture
Expand Down

0 comments on commit 54d574f

Please sign in to comment.