mirror of
https://github.com/acidicoala/SmokeAPI.git
synced 2025-12-05 21:15:39 -05:00
Reworked linker exports generation
This commit is contained in:
@@ -4,13 +4,7 @@ project(smoke-api-tools LANGUAGES CXX)
|
||||
|
||||
### Install CPM package manager
|
||||
|
||||
file(
|
||||
DOWNLOAD
|
||||
https://github.com/cpm-cmake/CPM.cmake/releases/download/v0.42.0/CPM.cmake
|
||||
${CMAKE_BINARY_DIR}/cmake/CPM.cmake
|
||||
EXPECTED_HASH SHA256=2020b4fc42dba44817983e06342e682ecfc3d2f484a581f11cc5731fbe4dce8a
|
||||
)
|
||||
include(${CMAKE_BINARY_DIR}/cmake/CPM.cmake)
|
||||
include(../KoalaBox/cmake/get_cpm.cmake)
|
||||
|
||||
### Install parser library
|
||||
|
||||
|
||||
@@ -182,7 +182,6 @@ namespace {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A tool for downloading Steamworks SDK and unpacking its headers and binaries
|
||||
* for further processing by other tools.
|
||||
@@ -190,17 +189,18 @@ namespace {
|
||||
int main(const int argc, const char** argv) {
|
||||
if (argc == 1) {
|
||||
print_help();
|
||||
} else {
|
||||
const auto streamworks_dir = std::filesystem::current_path() / "steamworks";
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (auto i = 1; i < argc; i++) {
|
||||
try {
|
||||
download_sdk(streamworks_dir, argv[i]);
|
||||
} catch (const std::exception& e) {
|
||||
std::cerr
|
||||
<< std::format("Error downloading SDK '{}'. Reason: {}", argv[i], e.what())
|
||||
<< std::endl;
|
||||
}
|
||||
const auto streamworks_dir = std::filesystem::current_path() / "steamworks";
|
||||
|
||||
for (auto i = 1; i < argc; i++) {
|
||||
try {
|
||||
download_sdk(streamworks_dir, argv[i]);
|
||||
} catch (const std::exception& e) {
|
||||
std::cerr
|
||||
<< std::format("Error downloading SDK '{}'. Reason: {}", argv[i], e.what())
|
||||
<< std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -48,7 +48,7 @@ namespace {
|
||||
queue.push_back(root);
|
||||
auto first_visit = true;
|
||||
|
||||
while (!queue.empty()) {
|
||||
while (not queue.empty()) {
|
||||
const auto node = queue.front();
|
||||
queue.pop_front();
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace {
|
||||
}
|
||||
|
||||
for (uint32_t i = 0, count = node.getNumNamedChildren(); i < count; ++i) {
|
||||
if (const auto child = node.getNamedChild(i); !child.isNull()) {
|
||||
if (const auto child = node.getNamedChild(i); not child.isNull()) {
|
||||
queue.push_back(child);
|
||||
}
|
||||
}
|
||||
@@ -145,7 +145,7 @@ namespace {
|
||||
});
|
||||
|
||||
// Save the findings
|
||||
if (!interface_version.empty()) {
|
||||
if (not interface_version.empty()) {
|
||||
lookup[interface_version] = current_lookup;
|
||||
}
|
||||
}
|
||||
@@ -153,7 +153,7 @@ namespace {
|
||||
void parse_sdk(const fs::path& sdk_path, json& lookup) {
|
||||
const auto headers_dir = sdk_path / "headers";
|
||||
|
||||
if (!fs::exists(headers_dir)) {
|
||||
if (not fs::exists(headers_dir)) {
|
||||
std::cout << "Warning: SDK missing 'headers' directory: " << headers_dir << std::endl;
|
||||
return;
|
||||
}
|
||||
@@ -181,7 +181,7 @@ namespace {
|
||||
|
||||
// Go over each steamworks sdk version
|
||||
for (const auto& entry : fs::directory_iterator(steamworks_dir)) {
|
||||
if (!entry.is_directory()) {
|
||||
if (not entry.is_directory()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user