Archived
1
Fork 0

Further improve Windows support

This commit is contained in:
Joshua Goins 2022-03-27 21:48:50 -04:00
parent 29d3a1aabf
commit 13454ba688
4 changed files with 15 additions and 5 deletions

View file

@ -1,5 +1,7 @@
project(libxiv)
include(FetchContent)
find_package(fmt QUIET)
if(TARGET fmt::fmt)
@ -15,6 +17,8 @@ else()
GIT_TAG master
)
set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(fmt)
set(LIBRARIES fmt::fmt ${LIBRARIES})
@ -41,16 +45,22 @@ else()
GIT_TAG master
)
set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(zlib)
set(LIBRARIES zlib ${LIBRARIES})
endif()
# welcome to hell, cmake.
include_directories(${CMAKE_BINARY_DIR}/_deps/zlib-src)
# NO REALLY, HELL IS THIS WAY
include_directories(${CMAKE_BINARY_DIR}/_deps/zlib-build)
set(LIBRARIES zlibstatic ${LIBRARIES})
endif()
add_library(libxiv STATIC
src/fiinparser.cpp
src/indexparser.cpp
src/crc32.cpp
src/crc32checksum.cpp
src/gamedata.cpp
src/compression.cpp
src/exhparser.cpp

View file

@ -1,4 +1,4 @@
#include "crc32.h"
#include "crc32checksum.h"
void CRC32::generate_table(uint32_t(&table)[256]) {
uint32_t polynomial = 0xEDB88320;

View file

@ -1,6 +1,6 @@
#include "gamedata.h"
#include "indexparser.h"
#include "crc32.h"
#include "crc32checksum.h"
#include "compression.h"
#include "string_utils.h"