Skip to content

Commit 5dd1008

Browse files
committed
link?
1 parent 21a2006 commit 5dd1008

File tree

3 files changed

+2
-13
lines changed

3 files changed

+2
-13
lines changed

src/CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -457,9 +457,10 @@ endif()
457457

458458
#=================== Linking ===================
459459

460+
target_link_libraries(libultraship PUBLIC "$<LINK_LIBRARY:WHOLE_ARCHIVE,storm>")
460461
target_link_libraries(libultraship
461462
PRIVATE StrHash64
462-
PUBLIC ZAPDUtils ImGui storm tinyxml2 nlohmann_json::nlohmann_json
463+
PUBLIC ZAPDUtils ImGui tinyxml2 nlohmann_json::nlohmann_json
463464
)
464465

465466
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR CMAKE_SYSTEM_NAME STREQUAL "NintendoSwitch")

src/resource/archive/OtrArchive.cpp

-10
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,6 @@ std::shared_ptr<ResourceInitData> OtrArchive::LoadFileMeta(uint64_t hash) {
6464
return nullptr;
6565
}
6666

67-
// i think there's a way to get the SFileCreateArchive symbol to link
68-
// by using --whole-archive or something but i'm really lost trying to
69-
// figure that out. it isn't a problem when just building OTRExporter
70-
// for the ExtractAssets target in SoH (that works without this), but when
71-
// trying to build SoH itself this symbol is not found. this is a stupid
72-
// hack to get it to build.
73-
void OtrArchive::BlargBecauseLinker() {
74-
SFileCreateArchive("", 0, 0, nullptr);
75-
}
76-
7767
bool OtrArchive::LoadRaw() {
7868
const bool opened = SFileOpenArchive(GetPath().c_str(), 0, MPQ_OPEN_READ_ONLY, &mHandle);
7969
if (opened) {

src/resource/archive/OtrArchive.h

-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ class OtrArchive : virtual public Archive {
2929
std::shared_ptr<File> LoadFileRaw(const std::string& filePath);
3030
std::shared_ptr<File> LoadFileRaw(uint64_t hash);
3131

32-
void BlargBecauseLinker();
33-
3432
protected:
3533
std::shared_ptr<ResourceInitData> LoadFileMeta(const std::string& filePath);
3634
std::shared_ptr<ResourceInitData> LoadFileMeta(uint64_t hash);

0 commit comments

Comments
 (0)