Compare commits
10 Commits
40d91b51aa
...
1875e6fff5
| Author | SHA1 | Date | |
|---|---|---|---|
| 1875e6fff5 | |||
| 9a00657560 | |||
| c0b282c9e0 | |||
| ea6fe95db4 | |||
| fb841092a7 | |||
| b69c748ae2 | |||
| 3261eb75d5 | |||
|
|
a99f5b56c2 | ||
|
|
39693ee87d | ||
| a42bb2ab40 |
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
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.
|
||||||
3
README.txt
Normal file
3
README.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
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,7 +10,8 @@ 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:
|
||||||
repo['repo'].git.apply('--unsafe-paths', '--directory', repo['checkout_root'], os.path.join(env['SPP_DIR'], 'recipes', 'SDL', 'fix_sdl3_from_worktree.patch'))
|
recipe_folder = os.path.dirname(__file__)
|
||||||
|
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
|
||||||
|
|||||||
29
recipes/cppdap/recipe.py
Normal file
29
recipes/cppdap/recipe.py
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
|
||||||
|
|
||||||
|
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,8 +8,7 @@ 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', '-DHLSL_INCLUDE_TESTS=OFF', '-DLLVM_INCLUDE_TESTS=OFF',
|
'-DLLVM_INSTALL_TOOLCHAIN_ONLY=ON'
|
||||||
'-DSPIRV_BUILD_TESTS=OFF'
|
|
||||||
])
|
])
|
||||||
|
|
||||||
link_flags = []
|
link_flags = []
|
||||||
@ -17,7 +16,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'] + build_result['BINPATH'])],
|
'LIBS': [env.FindLib('dxcompiler', type='shared', paths=build_result['LIBPATH'])],
|
||||||
'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')
|
||||||
|
|
||||||
env.StaticLibrary(
|
lib_glslang_full = 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': [os.path.join(env['LIB_DIR'], env.LibFilename('glslang_full'))]
|
'LIBS': [lib_glslang_full]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,8 @@ 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,14 +1,16 @@
|
|||||||
|
|
||||||
|
|
||||||
|
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)
|
build_result = env.CMakeProject(project_root=checkout_root, generate_args=['-DJSON_BuildTests=OFF'])
|
||||||
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