diff --git a/meson.build b/meson.build index 75b888d..db4c8f0 100644 --- a/meson.build +++ b/meson.build @@ -1,10 +1,19 @@ -project('wrentest', 'cpp', - version: '1.0.0', +project('wrenpp', 'cpp', + version: '0.1.0', meson_version: '>=0.49.2', default_options: ['debug=true', 'cpp_std=c++17', 'b_ndebug=if-release'], ) -wren_dep = dependency('wren', version: '>=0.2.0', fallback: ['wren', 'wren_dep']) +wren_dep = dependency('wren', version: '>=0.2.0', + fallback: ['wren', 'wren_dep'], + default_options: [ + 'default_library=static', + 'build_testing=false', + 'wren_with_cli=false', + 'wren_installable=false', + ], + static: true, +) public_incl = include_directories('include') os = host_machine.system() diff --git a/src/main.cpp b/src/main.cpp index 742ba42..2365315 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -49,12 +49,12 @@ int main() { wren::DefConfiguration config; wren::VM vm(&config); vm.interpret("my_module", g_script); - std::this_thread::sleep_for(std::chrono::milliseconds(2000)); auto vars = variables(vm, MN{"my_module", "name"}, MN{"my_module","number"}); std::cout << "name = \"" << std::get<0>(vars) << "\", number = " << std::get<1>(vars) << '\n'; const int sum = wren::call(vm, {"my_module", "Math"}, "sum_params", MN{"my_module", "number"}, 90); std::cout << "wren method returned " << sum << " (expected " << std::get<1>(vars) + 90 << ")\n"; + std::this_thread::sleep_for(std::chrono::milliseconds(1000)); return 0; }