Hunter fixes for stb_image
parent
0a5e49252d
commit
1b37b74f9e
|
@ -46,8 +46,8 @@ option(ASSIMP_HUNTER_ENABLED "Enable Hunter package manager support" OFF)
|
|||
IF(ASSIMP_HUNTER_ENABLED)
|
||||
include("cmake/HunterGate.cmake")
|
||||
HunterGate(
|
||||
URL "https://github.com/cpp-pm/hunter/archive/v0.23.293.tar.gz"
|
||||
SHA1 "e8e5470652db77149d9b38656db2a6c0b7642693"
|
||||
URL "https://github.com/cpp-pm/hunter/archive/v0.23.311.tar.gz"
|
||||
SHA1 "1a82b9b73055879181cb1466b2ab5d48ee8ae410"
|
||||
)
|
||||
|
||||
add_definitions(-DASSIMP_USE_HUNTER)
|
||||
|
@ -227,7 +227,6 @@ INCLUDE_DIRECTORIES( BEFORE
|
|||
include
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/include
|
||||
contrib/
|
||||
)
|
||||
|
||||
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules" )
|
||||
|
|
|
@ -57,7 +57,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
// Share stb_image's PNG loader with other importers/exporters instead of bringing our own copy.
|
||||
#define STBI_ONLY_PNG
|
||||
#include <contrib/stb_image/stb_image.h>
|
||||
#include <stb/stb_image.h>
|
||||
|
||||
#include "m3d.h"
|
||||
|
||||
|
|
|
@ -873,6 +873,7 @@ ELSE()
|
|||
../contrib/pugixml/src/pugiconfig.hpp
|
||||
../contrib/pugixml/src/pugixml.hpp
|
||||
)
|
||||
INCLUDE_DIRECTORIES("../contrib/pugixml/src")
|
||||
SOURCE_GROUP( Contrib\\Pugixml FILES ${Pugixml_SRCS})
|
||||
ENDIF()
|
||||
|
||||
|
@ -1034,8 +1035,6 @@ IF(ASSIMP_HUNTER_ENABLED)
|
|||
find_package(RapidJSON CONFIG REQUIRED)
|
||||
ELSE()
|
||||
INCLUDE_DIRECTORIES("../contrib/rapidjson/include")
|
||||
INCLUDE_DIRECTORIES( "../contrib" )
|
||||
INCLUDE_DIRECTORIES("../contrib/pugixml/src")
|
||||
ADD_DEFINITIONS( -DRAPIDJSON_HAS_STDSTRING=1)
|
||||
option( ASSIMP_RAPIDJSON_NO_MEMBER_ITERATOR "Suppress rapidjson warning on MSVC (NOTE: breaks android build)" ON )
|
||||
if(ASSIMP_RAPIDJSON_NO_MEMBER_ITERATOR)
|
||||
|
@ -1043,6 +1042,18 @@ ELSE()
|
|||
endif()
|
||||
ENDIF()
|
||||
|
||||
# stb
|
||||
IF(ASSIMP_HUNTER_ENABLED)
|
||||
hunter_add_package(stb)
|
||||
find_package(stb CONFIG REQUIRED)
|
||||
ELSE()
|
||||
SET( stb_SRCS
|
||||
../contrib/stb/stb_image.h
|
||||
)
|
||||
INCLUDE_DIRECTORIES("../contrib")
|
||||
SOURCE_GROUP( Contrib\\stb FILES ${stb_SRCS})
|
||||
ENDIF()
|
||||
|
||||
# VC2010 fixes
|
||||
if(MSVC10)
|
||||
option( VC10_STDINT_FIX "Fix for VC10 Compiler regarding pstdint.h redefinition errors" OFF )
|
||||
|
@ -1101,6 +1112,7 @@ SET( assimp_src
|
|||
${open3dgc_SRCS}
|
||||
${ziplib_SRCS}
|
||||
${Pugixml_SRCS}
|
||||
${stb_SRCS}
|
||||
# Necessary to show the headers in the project when using the VC++ generator:
|
||||
|
||||
${PUBLIC_HEADERS}
|
||||
|
@ -1158,6 +1170,7 @@ IF(ASSIMP_HUNTER_ENABLED)
|
|||
utf8cpp
|
||||
zip::zip
|
||||
pugixml
|
||||
stb::stb
|
||||
)
|
||||
|
||||
if (ASSIMP_BUILD_DRACO)
|
||||
|
|
|
@ -1277,7 +1277,7 @@ ASSIMP_API void aiQuaternionInterpolate(
|
|||
# endif
|
||||
|
||||
# define STB_IMAGE_IMPLEMENTATION
|
||||
# include "stb_image/stb_image.h"
|
||||
# include "stb/stb_image.h"
|
||||
|
||||
# if _MSC_VER
|
||||
# pragma warning(pop)
|
||||
|
|
|
@ -83,7 +83,7 @@ Other:
|
|||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
#include "../contrib/stb_image/stb_image.h"
|
||||
#include "stb/stb_image.h"
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
|
|
Loading…
Reference in New Issue