Skip to content

Commit

Permalink
libunifex: fix Windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Jan 20, 2024
1 parent 3275d09 commit fbb5e35
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions recipes/getdns/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import os

from conan import ConanFile
from conan import ConanFile, conan_version
from conan.errors import ConanInvalidConfiguration, ConanException
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
from conan.tools.env import VirtualBuildEnv
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, rm, replace_in_file, load
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, rm, load
from conan.tools.microsoft import is_msvc

required_conan_version = ">=1.53.0"
Expand All @@ -16,7 +16,7 @@ class GetDnsConan(ConanFile):
license = "BSD-3-Clause"
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://getdnsapi.net/"
topics = ("asynchronous", "event")
topics = ("dns", "asynchronous", "event")

package_type = "library"
settings = "os", "arch", "compiler", "build_type"
Expand All @@ -38,7 +38,7 @@ class GetDnsConan(ConanFile):
"with_libev": "auto",
"with_libevent": True,
"with_libuv": True,
"with_libidn2": False, # FIXME: re-enable once libidn2 has been migrated
"with_libidn2": True,
}

def export_sources(self):
Expand All @@ -48,8 +48,11 @@ def export_sources(self):
def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
self.options.stub_only = self.settings.os != "Windows"
# FIXME: uncomment the next line when libunbound is available
# FIXME: remove once libidn2 has been migrated
# https://github.com/conan-io/conan-center-index/pull/18642
self.options.with_libidn2 = conan_version.major == 1
# FIXME: uncomment once libunbound is available
# self.options.stub_only = self.settings.os != "Windows"
self.options.with_libev = True # self.settings.os == "Windows"

def configure(self):
Expand Down Expand Up @@ -101,6 +104,7 @@ def generate(self):
# Force use of internal strptime when cross-compiling
tc.variables["FORCE_COMPAT_STRPTIME"] = True
tc.variables["BUILD_TESTING"] = False
# To fix OpenSSL try_compile() checks
# https://github.com/conan-io/conan/issues/12180
tc.variables["CMAKE_TRY_COMPILE_CONFIGURATION"] = self.settings.build_type
tc.generate()
Expand Down

0 comments on commit fbb5e35

Please sign in to comment.