27 lines
816 B
Python
27 lines
816 B
Python
|
|
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]
|
|
}
|