~redstrate/libxiv

ba13bab4b7685be9fe20baa4f38e2534c7739942 — Joshua Goins 2 years ago 8139f39
Restore unshield support, and add cmake find_package for pugimxl
2 files changed, 8 insertions(+), 1 deletions(-)

M CMakeLists.txt
M src/installextract.cpp
M CMakeLists.txt => CMakeLists.txt +7 -1
@@ 61,6 61,8 @@ else()
    set(LIBRARIES zlibstatic ${LIBRARIES})
endif()

find_package(pugixml REQUIRED)

add_library(libxiv STATIC
        src/fiinparser.cpp
        src/indexparser.cpp


@@ 75,10 77,14 @@ add_library(libxiv STATIC
        src/mdlparser.cpp
        src/havokxmlparser.cpp)
target_include_directories(libxiv PUBLIC include PRIVATE src)
target_link_libraries(libxiv PUBLIC ${LIBRARIES} pugixml)
target_link_libraries(libxiv PUBLIC ${LIBRARIES} pugixml::pugixml)
target_link_directories(libxiv PUBLIC ${LIB_DIRS})
target_compile_features(libxiv PUBLIC cxx_std_17)
set_target_properties(libxiv PROPERTIES CXX_EXTENSIONS OFF)

if(NOT WIN32)
    target_compile_definitions(libxiv PUBLIC UNSHIELD_SUPPORTED)
endif()

install(TARGETS libxiv
        DESTINATION "${INSTALL_LIB_PATH}")
\ No newline at end of file

M src/installextract.cpp => src/installextract.cpp +1 -0
@@ 2,6 2,7 @@

#ifdef UNSHIELD_SUPPORTED
#include <cstdio>
#include <array>
#include <stdexcept>
#include <libunshield.h>
#include <fmt/format.h>