Compare commits
3 Commits
1875e6fff5
...
40d91b51aa
| Author | SHA1 | Date | |
|---|---|---|---|
| 40d91b51aa | |||
| 9e0c022226 | |||
| d2bc446cb9 |
21
LICENSE
21
LICENSE
@ -1,21 +0,0 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2025 Patrick Wuttke
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
Recipe repository for SCons++ (https://git.mewin.de/mewin/scons-plus-plus).
|
|
||||||
|
|
||||||
Note that even though the branch is called "stable", it really isn't. Most of the scripts have only be tested on Linux, some on Windows and none any other OS.
|
|
||||||
@ -10,8 +10,7 @@ def _git_cook(env: Environment, repo: dict) -> dict:
|
|||||||
|
|
||||||
if os.path.exists(os.path.join(repo['checkout_root'], 'cmake', 'GetGitRevisionDescription.cmake')):
|
if os.path.exists(os.path.join(repo['checkout_root'], 'cmake', 'GetGitRevisionDescription.cmake')):
|
||||||
try:
|
try:
|
||||||
recipe_folder = os.path.dirname(__file__)
|
repo['repo'].git.apply('--unsafe-paths', '--directory', repo['checkout_root'], os.path.join(env['SPP_DIR'], 'recipes', 'SDL', 'fix_sdl3_from_worktree.patch'))
|
||||||
repo['repo'].git.apply('--unsafe-paths', '--directory', repo['checkout_root'], os.path.join(recipe_folder, 'fix_sdl3_from_worktree.patch'))
|
|
||||||
except:
|
except:
|
||||||
# either already applied or not applicable anymore
|
# either already applied or not applicable anymore
|
||||||
pass
|
pass
|
||||||
|
|||||||
@ -1,29 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
import re
|
|
||||||
from SCons.Script import *
|
|
||||||
|
|
||||||
|
|
||||||
def _git_cook(env: Environment, repo: dict) -> dict:
|
|
||||||
lib_json = env.Cook('json')
|
|
||||||
checkout_root = repo['checkout_root']
|
|
||||||
build_result = env.CMakeProject(checkout_root, generate_args=['-DCPPDAP_USE_EXTERNAL_NLOHMANN_JSON_PACKAGE=ON'], dependencies = [lib_json])
|
|
||||||
|
|
||||||
lib_name = 'cppdap'
|
|
||||||
return {
|
|
||||||
'CPPPATH': build_result['CPPPATH'],
|
|
||||||
'LIBS': [env.FindLib(lib_name, paths=build_result['LIBPATH'])]
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
env.GitRecipe(
|
|
||||||
globals = globals(),
|
|
||||||
repo_name = 'cppdap',
|
|
||||||
repo_url = 'https://github.com/google/cppdap.git',
|
|
||||||
tag_pattern = re.compile(r'^([0-9]+)\.([0-9]+)\.([0-9]+)$'), # cppdap doesn't have any (recent) version tags, so this is kind of useless anyway'
|
|
||||||
tag_fn = lambda version: f'{version[0]}.{version[1]}.{version[2]}',
|
|
||||||
cook_fn = _git_cook,
|
|
||||||
dependencies = {
|
|
||||||
'json': {}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
@ -8,7 +8,8 @@ def _git_cook(env: Environment, repo: dict) -> dict:
|
|||||||
checkout_root = repo['checkout_root']
|
checkout_root = repo['checkout_root']
|
||||||
build_result = env.CMakeProject(checkout_root, generate_args = [
|
build_result = env.CMakeProject(checkout_root, generate_args = [
|
||||||
f'-C{repo['checkout_root']}/cmake/caches/PredefinedParams.cmake',
|
f'-C{repo['checkout_root']}/cmake/caches/PredefinedParams.cmake',
|
||||||
'-DLLVM_INSTALL_TOOLCHAIN_ONLY=ON'
|
'-DLLVM_INSTALL_TOOLCHAIN_ONLY=ON', '-DHLSL_INCLUDE_TESTS=OFF', '-DLLVM_INCLUDE_TESTS=OFF',
|
||||||
|
'-DSPIRV_BUILD_TESTS=OFF'
|
||||||
])
|
])
|
||||||
|
|
||||||
link_flags = []
|
link_flags = []
|
||||||
@ -16,7 +17,7 @@ def _git_cook(env: Environment, repo: dict) -> dict:
|
|||||||
link_flags.append(f'-Wl,-rpath,{build_result["LIBPATH"][0]}')
|
link_flags.append(f'-Wl,-rpath,{build_result["LIBPATH"][0]}')
|
||||||
return {
|
return {
|
||||||
'CPPPATH': build_result['CPPPATH'],
|
'CPPPATH': build_result['CPPPATH'],
|
||||||
'LIBS': [env.FindLib('dxcompiler', type='shared', paths=build_result['LIBPATH'])],
|
'LIBS': [env.FindLib('dxcompiler', type='shared', paths=build_result['LIBPATH'] + build_result['BINPATH'])],
|
||||||
'LINKFLAGS': link_flags
|
'LINKFLAGS': link_flags
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -60,7 +60,7 @@ def _git_cook(env: Environment, repo, options: dict = {}) -> dict:
|
|||||||
if enable_hlsl:
|
if enable_hlsl:
|
||||||
additional_cppdefines.append('ENABLE_HLSL=1')
|
additional_cppdefines.append('ENABLE_HLSL=1')
|
||||||
|
|
||||||
lib_glslang_full = env.StaticLibrary(
|
env.StaticLibrary(
|
||||||
CCFLAGS = env['CCFLAGS'] + additional_cxx_flags,
|
CCFLAGS = env['CCFLAGS'] + additional_cxx_flags,
|
||||||
CPPPATH = repo['checkout_root'],
|
CPPPATH = repo['checkout_root'],
|
||||||
CPPDEFINES = list(env['CPPDEFINES']) + additional_cppdefines,
|
CPPDEFINES = list(env['CPPDEFINES']) + additional_cppdefines,
|
||||||
@ -84,7 +84,7 @@ def _git_cook(env: Environment, repo, options: dict = {}) -> dict:
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
'CPPPATH': [include_dir],
|
'CPPPATH': [include_dir],
|
||||||
'LIBS': [lib_glslang_full]
|
'LIBS': [os.path.join(env['LIB_DIR'], env.LibFilename('glslang_full'))]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -23,8 +23,7 @@ def _git_cook(env: Environment, repo: dict, options: dict) -> dict:
|
|||||||
os.path.join(repo['checkout_root'], 'imgui.cpp'),
|
os.path.join(repo['checkout_root'], 'imgui.cpp'),
|
||||||
os.path.join(repo['checkout_root'], 'imgui_draw.cpp'),
|
os.path.join(repo['checkout_root'], 'imgui_draw.cpp'),
|
||||||
os.path.join(repo['checkout_root'], 'imgui_tables.cpp'),
|
os.path.join(repo['checkout_root'], 'imgui_tables.cpp'),
|
||||||
os.path.join(repo['checkout_root'], 'imgui_widgets.cpp'),
|
os.path.join(repo['checkout_root'], 'imgui_widgets.cpp')
|
||||||
os.path.join(repo['checkout_root'], 'misc/cpp/imgui_stdlib.cpp')
|
|
||||||
]
|
]
|
||||||
|
|
||||||
for backend in chain(env.get('IMGUI_BACKENDS', []), options.get('backends', [])):
|
for backend in chain(env.get('IMGUI_BACKENDS', []), options.get('backends', [])):
|
||||||
|
|||||||
@ -1,16 +1,14 @@
|
|||||||
|
|
||||||
|
|
||||||
import os
|
|
||||||
import re
|
import re
|
||||||
from SCons.Script import *
|
from SCons.Script import *
|
||||||
|
|
||||||
|
|
||||||
def _git_cook(env: Environment, repo: dict) -> dict:
|
def _git_cook(env: Environment, repo: dict) -> dict:
|
||||||
checkout_root = repo['checkout_root']
|
checkout_root = repo['checkout_root']
|
||||||
build_result = env.CMakeProject(project_root=checkout_root, generate_args=['-DJSON_BuildTests=OFF'])
|
build_result = env.CMakeProject(project_root=checkout_root)
|
||||||
return {
|
return {
|
||||||
'CPPPATH': build_result['CPPPATH'],
|
'CPPPATH': build_result['CPPPATH']
|
||||||
'CMAKE_PREFIX_PATH': [build_result['install_dir']]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user