Skip to content

Commit

Permalink
(conan-io#24475) artery-font-format: add version 1.1
Browse files Browse the repository at this point in the history
* artery-font-format: add version 1.1

* require C++11
  • Loading branch information
toge authored Jul 1, 2024
1 parent eb5a081 commit 3458c85
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 9 deletions.
3 changes: 3 additions & 0 deletions recipes/artery-font-format/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"1.1":
url: "https://github.com/Chlumsky/artery-font-format/archive/v1.1.tar.gz"
sha256: "cd8eb58590d85069312b831ce5bc6eba21778ef2fa8ca8ac06e1ecf8eca53a7c"
"1.0.1":
url: "https://github.com/Chlumsky/artery-font-format/archive/v1.0.1.tar.gz"
sha256: "23dc9450d2364c9f1a67fcb0ae8f2bef365fabc5a3f4af55d9a646f8fbcdc537"
Expand Down
24 changes: 17 additions & 7 deletions recipes/artery-font-format/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from conan import ConanFile
from conan.tools.build import check_min_cppstd
from conan.tools.files import get, copy
import os

Expand All @@ -7,24 +8,29 @@

class ArteryFontFormatConan(ConanFile):
name = "artery-font-format"
description = "Artery Atlas Font format library"
license = "MIT"
homepage = "https://github.com/Chlumsky/artery-font-format"
url = "https://github.com/conan-io/conan-center-index"
description = "Artery Atlas Font format library"
topics = ("artery", "font", "atlas")
homepage = "https://github.com/Chlumsky/artery-font-format"
topics = ("artery", "font", "atlas", "header-only")
package_type = "header-library"
settings = "os", "arch", "compiler", "build_type"
no_copy_source = True

@property
def _min_cppstd(self):
return 11

def package_id(self):
self.info.clear()

def validate(self):
if self.settings.compiler.get_safe("cppstd"):
check_min_cppstd(self, self._min_cppstd)

def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)

def build(self):
# header only: no build step
pass

def package(self):
copy(self, pattern="LICENSE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder)
copy(
Expand All @@ -39,3 +45,7 @@ def package(self):
dst=os.path.join(self.package_folder, "include"),
src=self.source_folder,
)

def package_info(self):
self.cpp_info.bindirs = []
self.cpp_info.libdirs = []
2 changes: 1 addition & 1 deletion recipes/artery-font-format/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ project(test_package LANGUAGES CXX)
find_package(artery-font-format REQUIRED CONFIG)

add_executable(${PROJECT_NAME} test_package.cpp)
target_link_libraries(${PROJECT_NAME} artery-font-format::artery-font-format)
target_link_libraries(${PROJECT_NAME} PRIVATE artery-font-format::artery-font-format)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11)
1 change: 0 additions & 1 deletion recipes/artery-font-format/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import os


# It will become the standard on Conan 2.x
class TestPackageConan(ConanFile):
settings = "os", "arch", "compiler", "build_type"
generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv"
Expand Down
2 changes: 2 additions & 0 deletions recipes/artery-font-format/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"1.1":
folder: all
"1.0.1":
folder: all
"1.0":
Expand Down

0 comments on commit 3458c85

Please sign in to comment.