Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xkbcommon: Use rm_safe from Conan 1.53 and simplify test package #14599

Merged
merged 3 commits into from
Dec 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 4 additions & 13 deletions recipes/xkbcommon/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from conan.tools.scm import Version
from conan.errors import ConanInvalidConfiguration

required_conan_version = ">=1.52.0"
required_conan_version = ">=1.53.0"


class XkbcommonConan(ConanFile):
Expand Down Expand Up @@ -52,18 +52,9 @@ def config_options(self):

def configure(self):
if self.options.shared:
try:
del self.options.fPIC
except Exception:
pass
try:
del self.settings.compiler.libcxx
except Exception:
pass
try:
del self.settings.compiler.cppstd
except Exception:
pass
self.options.rm_safe("fPIC")
self.settings.rm_safe("compiler.cppstd")
self.settings.rm_safe("compiler.libcxx")

def requirements(self):
self.requires("xkeyboard-config/system")
Expand Down
2 changes: 1 addition & 1 deletion recipes/xkbcommon/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.1)
project(test_package LANGUAGES CXX)

find_package(xkbcommon REQUIRED COMPONENTS libxkbcommon)
Expand Down
3 changes: 1 addition & 2 deletions recipes/xkbcommon/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

from conan import ConanFile
from conan.tools.build import can_run
from conan.tools.cmake import CMake
from conan.tools.layout import cmake_layout
from conan.tools.cmake import CMake, cmake_layout


class TestPackageConan(ConanFile):
Expand Down
6 changes: 3 additions & 3 deletions recipes/xkbcommon/all/test_v1_package/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.1)
project(test_package)

include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()
conan_basic_setup(TARGETS)

add_executable(${PROJECT_NAME} ../test_package/test_package.cpp)
target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS})
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/
${CMAKE_CURRENT_BINARY_DIR}/test_package/)
2 changes: 1 addition & 1 deletion recipes/xkbcommon/all/test_v1_package/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class TestPackageConan(ConanFile):
settings = "os", "arch", "compiler", "build_type"
generators = "cmake"
generators = "cmake", "cmake_find_package_multi"

def build(self):
cmake = CMake(self)
Expand Down