- don't include HunterGate.cmake if you don't enable HUNTER package manager

- don't check for DirectX if you don't build the assimp tools or samples
pull/2994/head
iamAdrianIusca 2020-02-09 20:31:06 +02:00
parent 5a674bb464
commit ca08cbcb0c
1 changed files with 7 additions and 5 deletions

View File

@ -41,13 +41,13 @@ CMAKE_MINIMUM_REQUIRED( VERSION 3.0 )
# Toggles the use of the hunter package manager # Toggles the use of the hunter package manager
option(HUNTER_ENABLED "Enable Hunter package manager support" OFF) option(HUNTER_ENABLED "Enable Hunter package manager support" OFF)
IF(HUNTER_ENABLED)
include("cmake/HunterGate.cmake") include("cmake/HunterGate.cmake")
HunterGate( HunterGate(
URL "https://github.com/ruslo/hunter/archive/v0.23.176.tar.gz" URL "https://github.com/ruslo/hunter/archive/v0.23.176.tar.gz"
SHA1 "2e9ae973d028660b735ac4c6142725ca36a0048a" SHA1 "2e9ae973d028660b735ac4c6142725ca36a0048a"
) )
IF(HUNTER_ENABLED)
add_definitions(-DASSIMP_USE_HUNTER) add_definitions(-DASSIMP_USE_HUNTER)
ENDIF(HUNTER_ENABLED) ENDIF(HUNTER_ENABLED)
@ -437,7 +437,9 @@ ELSE(HUNTER_ENABLED)
DESTINATION "${ASSIMP_LIB_INSTALL_DIR}/cmake/assimp-${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MINOR}" COMPONENT ${LIBASSIMP-DEV_COMPONENT}) DESTINATION "${ASSIMP_LIB_INSTALL_DIR}/cmake/assimp-${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MINOR}" COMPONENT ${LIBASSIMP-DEV_COMPONENT})
ENDIF(HUNTER_ENABLED) ENDIF(HUNTER_ENABLED)
if (ASSIMP_BUILD_SAMPLES OR ASSIMP_BUILD_SAMPLES)
FIND_PACKAGE(DirectX) FIND_PACKAGE(DirectX)
endif(ASSIMP_BUILD_SAMPLES OR ASSIMP_BUILD_SAMPLES)
IF( BUILD_DOCS ) IF( BUILD_DOCS )
ADD_SUBDIRECTORY(doc) ADD_SUBDIRECTORY(doc)