| 694 | project.addLinkLibraries({"d3d11", "dxgi", "gdi32", "kernel32", "shell32", "user32"}); |
| 695 | } |
| 696 | else |
| 697 | { |
| 698 | project.addDefines({"IMGUI_API=__attribute__((visibility(\"default\")))"}); |
| 699 | } |
| 700 | project.addFiles("Examples/SCExample", "**.h"); |
| 701 | project.addFiles("Examples/SCExample", "**.cpp"); |
| 702 | |
| 703 | if (not project.addExportLibraries({"Async", "Containers", "ContainersReflection", "File", "FileSystem", |
| 704 | "Foundation", "Http", "Memory", "Plugin", "Process", "Reflection", |
| 705 | "SerializationBinary", "SerializationText", "Socket", "Strings", "Threading"})) |
| 706 | { |
| 707 | return Result::Error("Failed to configure exported SCExample libraries"); |
| 708 | } |
| 709 | |
| 710 | if (isWindowsGNUTarget) |
| 711 | { |
| 712 | SourceFiles sokolWarnings; |
| 713 | sokolWarnings.addSelection("Examples/SCExample", "SCExampleSokol.c"); |
| 714 | sokolWarnings.compile.disableClangWarnings({"unknown-pragmas"}); |
| 715 | project.addSpecificFileFlags(sokolWarnings); |
| 716 | |
| 717 | SourceFiles imguiWarnings; |
| 718 | imguiWarnings.addSelection(imgui.packageLocalDirectory.view(), "*.cpp"); |
| 719 | imguiWarnings.compile.disableClangWarnings({"uninitialized-const-pointer"}); |
| 720 | project.addSpecificFileFlags(imguiWarnings); |
| 721 | } |
| 722 | |
| 723 | SC_TRY(workspace.projects.push_back(move(project))); |
| 724 | return Result(true); |
| 725 | } |
| 726 | |
| 727 | Result configureExamplesConsole(const Parameters& parameters, Workspace& workspace) |
| 728 | { |
| 729 | FileSystemIterator::FolderState entries[2]; |
| 730 | FileSystemIterator fsi; |
| 731 | |
| 732 | String path; |
| 733 | SC_TRY(Path::join(path, {parameters.directories.projectDirectory.view(), "Examples"})); |
| 734 | |
| 735 | fsi.init(path.view(), entries); |
| 736 | |
| 737 | while (fsi.enumerateNext()) |
| 738 | { |
| 739 | FileSystemIterator::Entry entry = fsi.get(); |
| 740 | if (not entry.isDirectory() or entry.name == EXAMPLE_PROJECT_NAME) |
| 741 | continue; |
| 742 | |
| 743 | StringView name, extension; |
| 744 | SC_TRY(Path::parseNameExtension(entry.name, name, extension)); |
no test coverage detected