MCPcopy Create free account
hub / github.com/GNOME/gjs / initSubmodule

Function initSubmodule

modules/script/package.js:331–346  ·  view source on GitHub ↗
(moduleName)

Source from the content-addressed store, hash-verified

329}
330
331function initSubmodule(moduleName) {
332 if (_runningFromMesonSource() || _runningFromSource()) {
333 // Running from source tree, add './moduleName' to search paths
334
335 let submoduledir = GLib.build_filenamev([_submoduledir, moduleName]);
336 let libpath;
337 if (_runningFromMesonSource())
338 libpath = submoduledir;
339 else
340 libpath = GLib.build_filenamev([submoduledir, '.libs']);
341 GIRepository.Repository.prepend_search_path(submoduledir);
342 GIRepository.Repository.prepend_library_path(libpath);
343 } else {
344 // Running installed, submodule is in $(pkglibdir), nothing to do
345 }
346}

Callers

nothing calls this directly

Calls 3

_runningFromMesonSourceFunction · 0.85
_runningFromSourceFunction · 0.85
prepend_search_pathMethod · 0.80

Tested by

no test coverage detected