Further improve Windows support
This commit is contained in:
parent
29d3a1aabf
commit
13454ba688
4 changed files with 15 additions and 5 deletions
|
@ -1,5 +1,7 @@
|
||||||
project(libxiv)
|
project(libxiv)
|
||||||
|
|
||||||
|
include(FetchContent)
|
||||||
|
|
||||||
find_package(fmt QUIET)
|
find_package(fmt QUIET)
|
||||||
|
|
||||||
if(TARGET fmt::fmt)
|
if(TARGET fmt::fmt)
|
||||||
|
@ -15,6 +17,8 @@ else()
|
||||||
GIT_TAG master
|
GIT_TAG master
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
|
||||||
|
|
||||||
FetchContent_MakeAvailable(fmt)
|
FetchContent_MakeAvailable(fmt)
|
||||||
|
|
||||||
set(LIBRARIES fmt::fmt ${LIBRARIES})
|
set(LIBRARIES fmt::fmt ${LIBRARIES})
|
||||||
|
@ -41,16 +45,22 @@ else()
|
||||||
GIT_TAG master
|
GIT_TAG master
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
|
||||||
|
|
||||||
FetchContent_MakeAvailable(zlib)
|
FetchContent_MakeAvailable(zlib)
|
||||||
|
|
||||||
set(LIBRARIES zlib ${LIBRARIES})
|
# welcome to hell, cmake.
|
||||||
endif()
|
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
|
add_library(libxiv STATIC
|
||||||
src/fiinparser.cpp
|
src/fiinparser.cpp
|
||||||
src/indexparser.cpp
|
src/indexparser.cpp
|
||||||
src/crc32.cpp
|
src/crc32checksum.cpp
|
||||||
src/gamedata.cpp
|
src/gamedata.cpp
|
||||||
src/compression.cpp
|
src/compression.cpp
|
||||||
src/exhparser.cpp
|
src/exhparser.cpp
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "crc32.h"
|
#include "crc32checksum.h"
|
||||||
|
|
||||||
void CRC32::generate_table(uint32_t(&table)[256]) {
|
void CRC32::generate_table(uint32_t(&table)[256]) {
|
||||||
uint32_t polynomial = 0xEDB88320;
|
uint32_t polynomial = 0xEDB88320;
|
|
@ -1,6 +1,6 @@
|
||||||
#include "gamedata.h"
|
#include "gamedata.h"
|
||||||
#include "indexparser.h"
|
#include "indexparser.h"
|
||||||
#include "crc32.h"
|
#include "crc32checksum.h"
|
||||||
#include "compression.h"
|
#include "compression.h"
|
||||||
#include "string_utils.h"
|
#include "string_utils.h"
|
||||||
|
|
||||||
|
|
Reference in a new issue