Skip to content

Commit

Permalink
Copy cupcake.json to Conan export folder
Browse files Browse the repository at this point in the history
  • Loading branch information
thejohnfreeman committed Jun 18, 2024
1 parent 9390944 commit dc529c8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions conanfile.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from conan import ConanFile, conan_version
from conan.tools.cmake import CMake, cmake_layout
from conan.tools.files import copy

from functools import cached_property
import json
Expand All @@ -10,8 +11,6 @@ class Autocheck(ConanFile):
@cached_property
def metadata(self):
path = pathlib.Path(self.recipe_folder) / 'cupcake.json'
if not path.is_file():
path = path.parent.parent / 'export_source' / 'cupcake.json'
with open(path, 'r') as file:
return json.load(file)

Expand Down Expand Up @@ -48,6 +47,9 @@ def set_version(self):
'src/*',
]

def export(self):
copy(self, 'cupcake.json', self.recipe_folder, self.export_folder)

# For out-of-source build.
# https://docs.conan.io/en/latest/reference/build_helpers/cmake.html#configure
no_copy_source = True
Expand Down

0 comments on commit dc529c8

Please sign in to comment.