More recipes (libjpeg, libz, imagemagick).
This commit is contained in:
@@ -33,9 +33,15 @@ def cook(env: Environment, project_root: str, generate_args: 'list[str]' = [], b
|
||||
run_cmd(['cmake', '--install', *install_args, cmd_quote(build_dir)])
|
||||
pathlib.Path(install_dir, _BUILT_STAMPFILE).touch()
|
||||
|
||||
libpath = []
|
||||
for lib_folder in ('lib', 'lib64'):
|
||||
full_path = os.path.join(install_dir, lib_folder)
|
||||
if os.path.exists(full_path):
|
||||
libpath.append(full_path)
|
||||
|
||||
return {
|
||||
'install_dir': install_dir,
|
||||
'LIBPATH': [os.path.join(install_dir, 'lib')],
|
||||
'LIBPATH': libpath,
|
||||
'CPPPATH': [os.path.join(install_dir, 'include')]
|
||||
}
|
||||
|
||||
|
||||
12
recipes/ImageMagick/recipe.py
Normal file
12
recipes/ImageMagick/recipe.py
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
from SCons.Script import *
|
||||
|
||||
def cook(env: Environment, git_ref = 'main') -> dict:
|
||||
repo = env.Cook('GitBranch', repo_name = 'ImageMagick', remote_url = 'https://github.com/ImageMagick/ImageMagick.git', git_ref = git_ref)
|
||||
checkout_root = repo['checkout_root']
|
||||
build_result = env.Cook('AutotoolsProject', checkout_root)
|
||||
return {
|
||||
'LIBPATH': build_result['LIBPATH'],
|
||||
'CPPPATH': build_result['CPPPATH'],
|
||||
'LIBS': ['backtrace']
|
||||
}
|
||||
11
recipes/libjpeg-turbo/recipe.py
Normal file
11
recipes/libjpeg-turbo/recipe.py
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
from SCons.Script import *
|
||||
|
||||
def cook(env: Environment, git_ref = 'main') -> dict:
|
||||
repo = env.Cook('GitBranch', repo_name = 'libjpeg-turbo', remote_url = 'https://github.com/libjpeg-turbo/libjpeg-turbo.git', git_ref = git_ref)
|
||||
checkout_root = repo['checkout_root']
|
||||
build_result = env.Cook('CMakeProject', checkout_root)
|
||||
return {
|
||||
'CPPPATH': build_result['CPPPATH'],
|
||||
'LIBS': [env.FindLib('jpeg', paths=build_result['LIBPATH'])],
|
||||
}
|
||||
@@ -2,11 +2,12 @@
|
||||
from SCons.Script import *
|
||||
|
||||
def cook(env: Environment, git_ref = 'master') -> dict:
|
||||
lib_z = env.Cook('zlib')
|
||||
repo = env.Cook('GitBranch', repo_name = 'libpng', remote_url = 'https://git.code.sf.net/p/libpng/code.git', git_ref = git_ref)
|
||||
checkout_root = repo['checkout_root']
|
||||
build_result = env.Cook('AutotoolsProject', checkout_root)
|
||||
return {
|
||||
'LIBPATH': build_result['LIBPATH'],
|
||||
'CPPPATH': build_result['CPPPATH'],
|
||||
'LIBS': ['png']
|
||||
'LIBS': [env.FindLib('png16', paths=build_result['LIBPATH'])],
|
||||
'DEPENDENCIES': [lib_z]
|
||||
}
|
||||
|
||||
12
recipes/zlib/recipe.py
Normal file
12
recipes/zlib/recipe.py
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
import os
|
||||
from SCons.Script import *
|
||||
|
||||
def cook(env: Environment, git_ref: str = 'master') -> dict:
|
||||
repo = env.Cook('GitBranch', repo_name = 'zlib', remote_url = 'https://github.com/madler/zlib.git', git_ref = git_ref)
|
||||
extracted_root = repo['checkout_root']
|
||||
build_result = env.Cook('CMakeProject', project_root=extracted_root)
|
||||
return {
|
||||
'CPPPATH': [os.path.join(build_result['install_dir'], 'install')],
|
||||
'LIBS': [env.FindLib('z', paths=build_result['LIBPATH'])]
|
||||
}
|
||||
Reference in New Issue
Block a user