Restore unshield support, and add cmake find_package for pugimxl
This commit is contained in:
parent
8139f399fd
commit
ba13bab4b7
2 changed files with 8 additions and 1 deletions
|
@ -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}")
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#ifdef UNSHIELD_SUPPORTED
|
||||
#include <cstdio>
|
||||
#include <array>
|
||||
#include <stdexcept>
|
||||
#include <libunshield.h>
|
||||
#include <fmt/format.h>
|
||||
|
|
Reference in a new issue