Skip to content

Commit

Permalink
link?
Browse files Browse the repository at this point in the history
  • Loading branch information
briaguya-ai committed Feb 8, 2024
1 parent 21a2006 commit 5dd1008
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
3 changes: 2 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -457,9 +457,10 @@ endif()

#=================== Linking ===================

target_link_libraries(libultraship PUBLIC "$<LINK_LIBRARY:WHOLE_ARCHIVE,storm>")
target_link_libraries(libultraship
PRIVATE StrHash64
PUBLIC ZAPDUtils ImGui storm tinyxml2 nlohmann_json::nlohmann_json
PUBLIC ZAPDUtils ImGui tinyxml2 nlohmann_json::nlohmann_json
)

if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR CMAKE_SYSTEM_NAME STREQUAL "NintendoSwitch")
Expand Down
10 changes: 0 additions & 10 deletions src/resource/archive/OtrArchive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,6 @@ std::shared_ptr<ResourceInitData> OtrArchive::LoadFileMeta(uint64_t hash) {
return nullptr;
}

// i think there's a way to get the SFileCreateArchive symbol to link
// by using --whole-archive or something but i'm really lost trying to
// figure that out. it isn't a problem when just building OTRExporter
// for the ExtractAssets target in SoH (that works without this), but when
// trying to build SoH itself this symbol is not found. this is a stupid
// hack to get it to build.
void OtrArchive::BlargBecauseLinker() {
SFileCreateArchive("", 0, 0, nullptr);
}

bool OtrArchive::LoadRaw() {
const bool opened = SFileOpenArchive(GetPath().c_str(), 0, MPQ_OPEN_READ_ONLY, &mHandle);
if (opened) {
Expand Down
2 changes: 0 additions & 2 deletions src/resource/archive/OtrArchive.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ class OtrArchive : virtual public Archive {
std::shared_ptr<File> LoadFileRaw(const std::string& filePath);
std::shared_ptr<File> LoadFileRaw(uint64_t hash);

void BlargBecauseLinker();

protected:
std::shared_ptr<ResourceInitData> LoadFileMeta(const std::string& filePath);
std::shared_ptr<ResourceInitData> LoadFileMeta(uint64_t hash);
Expand Down

0 comments on commit 5dd1008

Please sign in to comment.