diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-10-28 03:05:09 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-10-28 04:12:42 +0900 |
| commit | 53e9dd6aa933c1a5b43da83a88d5e07bf27285bf (patch) | |
| tree | 75d23f52901368c2e9764df631d37b8eb7484723 /internal/rosa/cmake.go | |
| parent | 7e3ba55cdc4d4a7c19deb65879e8abbb12a8e458 (diff) | |
internal/rosa: do not hard code prefix
This allows the prefix to be changed, at runtime if needed.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/cmake.go')
| -rw-r--r-- | internal/rosa/cmake.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/rosa/cmake.go b/internal/rosa/cmake.go index 2095c47a..47fe7268 100644 --- a/internal/rosa/cmake.go +++ b/internal/rosa/cmake.go @@ -100,10 +100,10 @@ func (attr *CMakeHelper) script(t Toolchain, name string) string { if t.cross() { cross = ` -DCMAKE_SYSTEM_NAME=Linux \ - -DCMAKE_SYSROOT=/system/` + t.arch + ` \ - -DCMAKE_C_COMPILER=/system/bin/clang \ - -DCMAKE_CXX_COMPILER=/system/bin/clang++ \ - -DCMAKE_ASM_COMPILER=/system/bin/clang \` + -DCMAKE_SYSROOT=` + Prefix + `/` + t.arch + ` \ + -DCMAKE_C_COMPILER=` + Prefix + `/bin/clang \ + -DCMAKE_CXX_COMPILER=` + Prefix + `/bin/clang++ \ + -DCMAKE_ASM_COMPILER=` + Prefix + `/bin/clang \` } return ` @@ -123,7 +123,7 @@ cmake -G ` + generate + ` \ } } }), " \\\n\t") + ` \ - -DCMAKE_INSTALL_PREFIX=/system \ + -DCMAKE_INSTALL_PREFIX=` + Prefix + ` \ '/usr/src/` + name + `/` + filepath.Join(attr.Append...) + `' cmake --build . --parallel=` + jobsE + ` -- ` + loadFlagE + ` DESTDIR=/work cmake --install . |
