Added recipe for icon font cpp headers.
This commit is contained in:
parent
5c6a8a1cc6
commit
5debc6d334
26
recipes/icon_font_cpp_headers/recipe.py
Normal file
26
recipes/icon_font_cpp_headers/recipe.py
Normal file
@ -0,0 +1,26 @@
|
||||
|
||||
import glob
|
||||
import os
|
||||
import shutil
|
||||
from SCons.Script import *
|
||||
|
||||
_REPO_NAME = 'icon_font_cpp_headers'
|
||||
_REPO_URL = 'https://github.com/juliettef/IconFontCppHeaders.git'
|
||||
|
||||
def versions(env: Environment, update: bool = False):
|
||||
return [(0, 0, 0)]
|
||||
|
||||
def dependencies(env: Environment, version) -> 'dict':
|
||||
return {}
|
||||
|
||||
def cook(env: Environment, version) -> dict:
|
||||
repo = env.GitBranch(repo_name = _REPO_NAME, remote_url = _REPO_URL, git_ref = 'main')
|
||||
checkout_root = repo['checkout_root']
|
||||
include_dir = os.path.join(checkout_root, 'include')
|
||||
headers_dir = os.path.join(include_dir, 'ifch')
|
||||
os.makedirs(headers_dir, exist_ok=True)
|
||||
for header_file in glob.glob(os.path.join(checkout_root, '*.h')):
|
||||
shutil.copy(header_file, headers_dir)
|
||||
return {
|
||||
'CPPPATH': [include_dir]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user