diff --git a/recipes/libelf/all/CMakeLists.txt b/recipes/libelf/all/CMakeLists.txt index 272a6d59618a2..f27f2188e4729 100644 --- a/recipes/libelf/all/CMakeLists.txt +++ b/recipes/libelf/all/CMakeLists.txt @@ -3,7 +3,7 @@ project(elf LANGUAGES C) if(EXISTS "${LIBELF_SRC_DIR}/lib/sys_elf.h.w32") file(RENAME "${LIBELF_SRC_DIR}/lib/sys_elf.h.w32" "${LIBELF_SRC_DIR}/lib/sys_elf.h") - file(RENAME "${LIBELF_SRC_DIR}/lib/config.h.w32" "${LIBELF_SRC_DIR}/config.h") + file(RENAME "${LIBELF_SRC_DIR}/lib/config.h.w32" "${LIBELF_SRC_DIR}/lib/config.h") endif() file(GLOB_RECURSE SOURCES "${LIBELF_SRC_DIR}/lib/*.c") @@ -15,7 +15,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE ) target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC "${LIBELF_SRC_DIR}/lib") -target_compile_definitions(${PROJECT_NAME} PUBLIC HAVE_MEMCMP=1 HAVE_MEMCPY=1 HAVE_MEMMOVE=1) +target_compile_definitions(${PROJECT_NAME} PUBLIC HAVE_MEMCMP=1 HAVE_MEMCPY=1 HAVE_MEMMOVE=1 HAVE_CONFIG_H=1) include(GNUInstallDirs) diff --git a/recipes/libelf/all/conanfile.py b/recipes/libelf/all/conanfile.py index c93a47a212b33..74c65a2903034 100644 --- a/recipes/libelf/all/conanfile.py +++ b/recipes/libelf/all/conanfile.py @@ -31,10 +31,6 @@ class LibelfConan(ConanFile): exports_sources = "CMakeLists.txt" - @property - def _settings_build(self): - return getattr(self, "settings_build", self.settings) - def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -58,7 +54,7 @@ def build_requirements(self): if self.settings.os != "Windows": self.tool_requires("autoconf/2.71") self.tool_requires("gnu-config/cci.20210814") - if self._settings_build.os == "Windows": + if self.settings_build.os == "Windows": self.win_bash = True if not self.conf.get("tools.microsoft.bash:path", check_type=str): self.tool_requires("msys2/cci.latest") diff --git a/recipes/libelf/all/test_v1_package/CMakeLists.txt b/recipes/libelf/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index 0d20897301b68..0000000000000 --- a/recipes/libelf/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package - ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/libelf/all/test_v1_package/conanfile.py b/recipes/libelf/all/test_v1_package/conanfile.py deleted file mode 100644 index 38f4483872d47..0000000000000 --- a/recipes/libelf/all/test_v1_package/conanfile.py +++ /dev/null @@ -1,17 +0,0 @@ -from conans import ConanFile, CMake, tools -import os - - -class TestPackageConan(ConanFile): - settings = "os", "arch", "compiler", "build_type" - generators = "cmake", "cmake_find_package_multi" - - def build(self): - cmake = CMake(self) - cmake.configure() - cmake.build() - - def test(self): - if not tools.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True)