adaptions to support hunter

pull/2966/head
kimkulling 2020-10-01 16:35:34 +02:00
parent d75fa2bb4b
commit b6dde74155
11 changed files with 14 additions and 9 deletions

View File

@ -229,7 +229,7 @@ INCLUDE_DIRECTORIES( BEFORE
include
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/include
contrib/pugixml-1.9/src
contrib/pugixml/src
)
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules" )

View File

@ -866,7 +866,12 @@ IF(ASSIMP_HUNTER_ENABLED)
hunter_add_package(pugixml)
find_package(pugixml CONFIG REQUIRED)
ELSE()
add_subdirectory(../contrib/pugixml-1.9 )
SET( Pugixml_SRCS
../contrib/pugixml/src/pugiconfig.hpp
../contrib/pugixml/src/pugixml.hpp
../contrib/pugixml/src/pugixml.cpp
)
SOURCE_GROUP( Contrib\\Pugixml FILES ${Pugixml_SRCS})
ENDIF()
# utf8
@ -1088,6 +1093,7 @@ SET( assimp_src
${openddl_parser_SRCS}
${open3dgc_SRCS}
${ziplib_SRCS}
${Pugixml_SRCS}
# Necessary to show the headers in the project when using the VC++ generator:
${PUBLIC_HEADERS}
@ -1139,7 +1145,7 @@ IF(ASSIMP_HUNTER_ENABLED)
zip::zip
)
ELSE()
TARGET_LINK_LIBRARIES(assimp ${ZLIB_LIBRARIES} ${OPENDDL_PARSER_LIBRARIES} pugixml )
TARGET_LINK_LIBRARIES(assimp ${ZLIB_LIBRARIES} ${OPENDDL_PARSER_LIBRARIES} )
ENDIF()
if(ASSIMP_ANDROID_JNIIOSYSTEM)

View File

@ -1,4 +1 @@
IF(NOT ASSIMP_HUNTER_ENABLED)
add_subdirectory( pugixml-1.9 )
ENDIF()

View File

@ -217,7 +217,9 @@ add_executable( unit
if(ASSIMP_HUNTER_ENABLED)
hunter_add_package(GTest)
find_package(GTest CONFIG REQUIRED)
target_link_libraries(unit GTest::gtest_main GTest::gmock)
hunter_add_package(pugixml)
find_package(pugixml CONFIG REQUIRED)
target_link_libraries(unit GTest::gtest_main GTest::gmock pugixml::pugixml)
else()
target_sources(unit PUBLIC ../contrib/gtest/src/gtest-all.cc)
endif()

View File

@ -63,7 +63,7 @@ TARGET_USE_COMMON_OUTPUT_DIRECTORY(assimp_cmd)
SET_PROPERTY(TARGET assimp_cmd PROPERTY DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})
TARGET_LINK_LIBRARIES( assimp_cmd assimp ${ZLIB_LIBRARIES} pugixml )
TARGET_LINK_LIBRARIES( assimp_cmd assimp ${ZLIB_LIBRARIES} )
SET_TARGET_PROPERTIES( assimp_cmd PROPERTIES
OUTPUT_NAME assimp
)