diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-12-03 02:50:29 -0500 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-12-03 02:50:29 -0500 |
| commit | 4aff18372f1e5a3e12a3c220c18f338f313da8c6 (patch) | |
| tree | 1f02ebb5f83ff9ca037e27b2b1f3e18f7ce7b915 | |
| parent | efcc6fdb75c9a4d9ec66d7fd7509545f287d0bc9 (diff) | |
chore: new libnebuild example.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
| -rw-r--r-- | examples/example_02_libnebuild/libnebuild.cc | 16 | ||||
| -rw-r--r-- | examples/example_02_libnebuild/posix.json | 2 |
2 files changed, 8 insertions, 10 deletions
diff --git a/examples/example_02_libnebuild/libnebuild.cc b/examples/example_02_libnebuild/libnebuild.cc index df5258b..e707f6c 100644 --- a/examples/example_02_libnebuild/libnebuild.cc +++ b/examples/example_02_libnebuild/libnebuild.cc @@ -1,19 +1,17 @@ #include <NeBuildKit/JSONManifestBuilder.h> -#include <cstdlib> +int main(int argc, char** argv) { #ifndef _WIN32 -static constexpr auto kPath = "./posix.json"; + constexpr auto kPath = "./posix.json"; #else -static constexpr auto kPath = ".\\win64.json"; + constexpr auto kPath = ".\\win64.json"; #endif -int main(int argc, char** argv) { - auto builder = new NeBuild::JSONManifestBuilder(); - if (!builder) return EXIT_FAILURE; + NeBuild::JSONManifestBuilder builder; + NeBuild::BuildConfig config; - NeBuild::BuildConfig config; - config.path_ = kPath; + config.path_ = kPath; config.dry_run_ = false; - return builder->BuildTarget(config); + return builder.BuildTarget(config); } diff --git a/examples/example_02_libnebuild/posix.json b/examples/example_02_libnebuild/posix.json index 811e166..809cb67 100644 --- a/examples/example_02_libnebuild/posix.json +++ b/examples/example_02_libnebuild/posix.json @@ -16,5 +16,5 @@ "cpp_macros": [ "FOO_MACRO" ], - "run_after_build": false + "run_after_build": true }
\ No newline at end of file |
