Skip to content

Commit

Permalink
Pass the Kope setting to Kong
Browse files Browse the repository at this point in the history
  • Loading branch information
RobDangerous committed Sep 3, 2024
1 parent 8eabca2 commit d866862
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 2 deletions.
7 changes: 7 additions & 0 deletions kmake/src/Project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ export class Project {
parent: Project;
shaderVersion: number;
kongDirs: string[];
kope: boolean = false;
executableName: string;

constructor(name: string) {
Expand Down Expand Up @@ -351,6 +352,9 @@ export class Project {
out.push(sub);
}
else {
if (sub.kope) {
this.kope = true;
}
if (sub.cppStd !== '') {
this.cppStd = sub.cppStd;
}
Expand Down Expand Up @@ -835,6 +839,9 @@ export class Project {
let from = path.isAbsolute(directory) ? directory : path.join(this.basedir, directory);
if (fs.existsSync(from) && fs.statSync(from).isDirectory()) {
const project = await loadProject(from, this, options, projectFile);
if (options.kope) {
project.kope = true;
}
this.subProjects.push(project);
return project;
}
Expand Down
4 changes: 4 additions & 0 deletions kmake/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,10 @@ function compileKong(project: Project, from: string, to: string, platform: strin
params.push(platform);
params.push('-a');
params.push(api);
if (project.kope) {
params.push('-n');
params.push('kope');
}
for (const dir of dirs) {
params.push('-i');
params.push(dir);
Expand Down
7 changes: 7 additions & 0 deletions lib/kmake/Project.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/kmake/Project.js.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions lib/kmake/main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/kmake/main.js.map

Large diffs are not rendered by default.

0 comments on commit d866862

Please sign in to comment.