| 295 | } |
| 296 | |
| 297 | static Result addHotReloadIncludePathsDefine(Project& project, const Parameters& parameters, StringView imguiDirectory) |
| 298 | { |
| 299 | for (Configuration& configuration : project.configurations) |
| 300 | { |
| 301 | String executableDirectory = StringEncoding::Utf8; |
| 302 | SC_TRY(computeExecutableDirectory(project, parameters, configuration, executableDirectory)); |
| 303 | |
| 304 | String relativeImgui = StringEncoding::Utf8; |
| 305 | SC_TRY(Path::relativeFromTo(relativeImgui, executableDirectory.view(), imguiDirectory, Path::AsNative, |
| 306 | Path::AsNative)); |
| 307 | SC_TRY(normalizeRelativePathForCompileDefine(relativeImgui)); |
| 308 | |
| 309 | String define = StringEncoding::Utf8; |
| 310 | auto builder = StringBuilder::create(define); |
| 311 | SC_TRY(builder.append("SC_HOT_RELOAD_INCLUDE_PATHS=\"")); |
| 312 | SC_TRY(appendEscapedCString(builder, relativeImgui.view())); |
| 313 | SC_TRY(builder.append("\"")); |
| 314 | builder.finalize(); |
| 315 | SC_TRY(configuration.compile.defines.push_back(move(define))); |
| 316 | } |
| 317 | return Result(true); |
| 318 | } |
| 319 | |
| 320 | static constexpr StringView TEST_PROJECT_NAME = "SCTest"; |
| 321 | static constexpr StringView AWAIT_TEST_PROJECT_NAME = "SCAwaitTest"; |
no test coverage detected