Archived
1
Fork 0

Fix macOS build

This commit is contained in:
Joshua Goins 2022-04-10 18:08:07 -04:00
parent 13454ba688
commit 851ae281e6
3 changed files with 9 additions and 3 deletions

View file

@ -27,7 +27,11 @@ endif()
# note: unshield does not work on windows per maintainer notice in README, so we might as well not even attempt to look
# for it.
if(NOT WIN32)
set(LIBRARIES unshield ${LIBRARIES})
find_package(PkgConfig REQUIRED)
pkg_check_modules(libunshield REQUIRED libunshield)
set(LIBRARIES ${libunshield_LIBRARIES} ${LIBRARIES})
set(LIB_DIRS ${libunshield_LIBRARY_DIRS})
endif()
find_package(ZLIB QUIET)
@ -68,5 +72,5 @@ add_library(libxiv STATIC
src/installextract.cpp
src/patch.cpp)
target_include_directories(libxiv PUBLIC include PRIVATE src)
target_link_libraries(libxiv PUBLIC
${LIBRARIES})
target_link_libraries(libxiv PUBLIC ${LIBRARIES})
target_link_directories(libxiv PUBLIC ${LIB_DIRS})

View file

@ -5,6 +5,7 @@
#include <stdexcept>
#include <vector>
#include <algorithm>
#include <string>
EXH readEXH(const std::string_view path) {
EXH exh;

View file

@ -3,6 +3,7 @@
#include <cstdio>
#include <cstring>
#include <stdexcept>
#include <string>
template<class T>
void commonParseSqPack(FILE* file, IndexFile<T>& index) {