reuse part2

This commit is contained in:
georgemoralis 2024-02-24 17:45:21 +02:00
parent a3d88a3d02
commit 8447f3e06d
2 changed files with 8 additions and 4 deletions

View File

@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
cmake_minimum_required(VERSION 3.22)
if (NOT CMAKE_BUILD_TYPE)

View File

@ -26,8 +26,9 @@ void GenerateCodeFiles(
std::string lowModName = moduleName;
std::transform(lowModName.begin(), lowModName.end(), lowModName.begin(), ::tolower);
std::string headerName(lowModName + ".h");
std::string headerCode("// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project\n// SPDX-License-Identifier: GPL-2.0-or-later\n\n");
headerCode+="#pragma once\n\n#include \"library_common.h\" \n\n";
std::string headerCode("// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project\n// "
"SPDX-License-Identifier: GPL-2.0-or-later\n\n");
headerCode += "#pragma once\n\n#include \"library_common.h\" \n\n";
std::string trimmedName = moduleName;
if (moduleName.find("libSce") != std::string::npos) {
trimmedName = moduleName.substr(6, moduleName.size() - 1);
@ -57,8 +58,8 @@ void GenerateCodeFiles(
std::string sourceName(lowModName + ".cpp");
std::string sourceCode("// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project\n// "
"SPDX-License-Identifier: GPL-2.0-or-later\n\n");
sourceCode+="// Generated By moduleGenerator\n#include \"" + headerName +
"\"\n#include \"common/log.h\"\n#include \"error_codes.h\"\n\n";
sourceCode += "// Generated By moduleGenerator\n#include \"" + headerName +
"\"\n#include \"common/log.h\"\n#include \"error_codes.h\"\n\n";
sourceCode += "namespace Libraries::" + trimmedName + "{\n\n";