diff --git a/recipes/access_private/all/conanfile.py b/recipes/access_private/all/conanfile.py index da35dc6ea7e6e..f7bfa16e97f6c 100644 --- a/recipes/access_private/all/conanfile.py +++ b/recipes/access_private/all/conanfile.py @@ -11,12 +11,17 @@ class AccessPrivateConan(ConanFile): name = "access_private" description = "Access private members and statics of a C++ class" license = "MIT" - topics = ("access", "private", "header-only") - homepage = "https://github.com/martong/access_private" url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/martong/access_private" + topics = ("access", "private", "header-only") + + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True + def layout(self): + basic_layout(self, src_folder="src") + def package_id(self): self.info.clear() @@ -24,12 +29,8 @@ def validate(self): if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, 11) - def layout(self): - basic_layout(self, src_folder="src") - def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): pass diff --git a/recipes/access_private/all/test_v1_package/CMakeLists.txt b/recipes/access_private/all/test_v1_package/CMakeLists.txt index 01b3a8050e773..91630d79f4abb 100644 --- a/recipes/access_private/all/test_v1_package/CMakeLists.txt +++ b/recipes/access_private/all/test_v1_package/CMakeLists.txt @@ -1,11 +1,8 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package LANGUAGES CXX) +cmake_minimum_required(VERSION 3.15) +project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -find_package(access_private REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} ../test_package/test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE access_private::access_private) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/)