PragmaSharedExternal loads a project file whose #pragma crafter dependency is a library built on a CMake external that makes a shared library, and calls into that library while project.cpp loads. LoadProject links project.so against what each pragma dependency's build reports, and project.so loads only when that includes where the shared library is. It passes as the tree stands, and holds project.so to recording where a pragma dependency's shared CMake external is: without that run path, LoadProject fails with "libsharedext.so: cannot open shared object file".
12 lines
296 B
C++
12 lines
296 B
C++
// SPDX-License-Identifier: LGPL-3.0-only
|
|
// SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®
|
|
|
|
export module Tool;
|
|
import std;
|
|
|
|
// In libsharedext.so, which the tool's CMake external builds.
|
|
extern "C" int SharedExtValue();
|
|
|
|
export std::int32_t ToolValue() {
|
|
return SharedExtValue();
|
|
}
|