Update CMakeLists.txt
parent
4a3e0e46ac
commit
ece5a61551
|
@ -38,9 +38,9 @@ SET(CMAKE_POLICY_DEFAULT_CMP0012 NEW)
|
||||||
SET(CMAKE_POLICY_DEFAULT_CMP0074 NEW)
|
SET(CMAKE_POLICY_DEFAULT_CMP0074 NEW)
|
||||||
SET(CMAKE_POLICY_DEFAULT_CMP0092 NEW)
|
SET(CMAKE_POLICY_DEFAULT_CMP0092 NEW)
|
||||||
|
|
||||||
CMAKE_MINIMUM_REQUIRED( VERSION 3.10 )
|
CMAKE_MINIMUM_REQUIRED( VERSION 3.22 )
|
||||||
|
|
||||||
# Disabled importers: m3d for 5.1
|
# Disabled importers: m3d for 5.1 or later
|
||||||
ADD_DEFINITIONS( -DASSIMP_BUILD_NO_M3D_IMPORTER)
|
ADD_DEFINITIONS( -DASSIMP_BUILD_NO_M3D_IMPORTER)
|
||||||
ADD_DEFINITIONS( -DASSIMP_BUILD_NO_M3D_EXPORTER)
|
ADD_DEFINITIONS( -DASSIMP_BUILD_NO_M3D_EXPORTER)
|
||||||
# Toggles the use of the hunter package manager
|
# Toggles the use of the hunter package manager
|
||||||
|
@ -55,7 +55,7 @@ IF(ASSIMP_HUNTER_ENABLED)
|
||||||
add_definitions(-DASSIMP_USE_HUNTER)
|
add_definitions(-DASSIMP_USE_HUNTER)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
PROJECT(Assimp VERSION 5.3.0)
|
PROJECT(Assimp VERSION 5.4.0)
|
||||||
|
|
||||||
# All supported options ###############################################
|
# All supported options ###############################################
|
||||||
|
|
||||||
|
@ -131,18 +131,18 @@ OPTION ( ASSIMP_IGNORE_GIT_HASH
|
||||||
|
|
||||||
IF (WIN32)
|
IF (WIN32)
|
||||||
OPTION( ASSIMP_BUILD_ZLIB
|
OPTION( ASSIMP_BUILD_ZLIB
|
||||||
"Build your own zlib"
|
"Build your zlib"
|
||||||
ON
|
ON
|
||||||
)
|
)
|
||||||
ELSE()
|
ELSE()
|
||||||
OPTION( ASSIMP_BUILD_ZLIB
|
OPTION( ASSIMP_BUILD_ZLIB
|
||||||
"Build your own zlib"
|
"Build your zlib"
|
||||||
OFF
|
OFF
|
||||||
)
|
)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF (WIN32)
|
IF (WIN32)
|
||||||
# Use subset of Windows.h
|
# Use a subset of Windows.h
|
||||||
ADD_DEFINITIONS( -DWIN32_LEAN_AND_MEAN )
|
ADD_DEFINITIONS( -DWIN32_LEAN_AND_MEAN )
|
||||||
|
|
||||||
IF(MSVC)
|
IF(MSVC)
|
||||||
|
@ -150,16 +150,16 @@ IF (WIN32)
|
||||||
"Install MSVC debug files."
|
"Install MSVC debug files."
|
||||||
ON )
|
ON )
|
||||||
IF(NOT (MSVC_VERSION LESS 1900))
|
IF(NOT (MSVC_VERSION LESS 1900))
|
||||||
# Multibyte character set is deprecated since at least MSVC2015 (possibly earlier)
|
# Multibyte character set has been deprecated since at least MSVC2015 (possibly earlier)
|
||||||
ADD_DEFINITIONS( -DUNICODE -D_UNICODE )
|
ADD_DEFINITIONS( -DUNICODE -D_UNICODE )
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# Link statically against c/c++ lib to avoid missing redistriburable such as
|
# Link statically against c/c++ lib to avoid missing redistributable such as
|
||||||
# "VCRUNTIME140.dll not found. Try reinstalling the app.", but give users
|
# "VCRUNTIME140.dll not found. Try reinstalling the app.", but give users
|
||||||
# a choice to opt for the shared runtime if they want.
|
# a choice to opt for the shared runtime if they want.
|
||||||
option(USE_STATIC_CRT "Link against the static runtime libraries." OFF)
|
option(USE_STATIC_CRT "Link against the static runtime libraries." OFF)
|
||||||
|
|
||||||
# The CMAKE_CXX_FLAGS vars can be overriden by some Visual Studio generators, so we use an alternative
|
# The CMAKE_CXX_FLAGS vars can be overridden by some Visual Studio generators, so we use an alternative
|
||||||
# global method here:
|
# global method here:
|
||||||
if (${USE_STATIC_CRT})
|
if (${USE_STATIC_CRT})
|
||||||
add_compile_options(
|
add_compile_options(
|
||||||
|
@ -249,9 +249,9 @@ SET(ASSIMP_LIBRARY_SUFFIX "" CACHE STRING "Suffix to append to library names")
|
||||||
IF( UNIX )
|
IF( UNIX )
|
||||||
# Use GNUInstallDirs for Unix predefined directories
|
# Use GNUInstallDirs for Unix predefined directories
|
||||||
INCLUDE(GNUInstallDirs)
|
INCLUDE(GNUInstallDirs)
|
||||||
# Ensure that we do not run into issues like http://www.tcm.phy.cam.ac.uk/sw/inodes64.html on 32 bit linux
|
# Ensure that we do not run into issues like http://www.tcm.phy.cam.ac.uk/sw/inodes64.html on 32 bit Linux
|
||||||
IF(NOT ${OPERATING_SYSTEM} MATCHES "Android")
|
IF(NOT ${OPERATING_SYSTEM} MATCHES "Android")
|
||||||
IF ( CMAKE_SIZEOF_VOID_P EQUAL 4) # only necessary for 32-bit linux
|
IF ( CMAKE_SIZEOF_VOID_P EQUAL 4) # only necessary for 32-bit Linux
|
||||||
ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64 )
|
ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64 )
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
@ -289,7 +289,7 @@ ELSEIF(MSVC)
|
||||||
IF(MSVC12)
|
IF(MSVC12)
|
||||||
ADD_COMPILE_OPTIONS(/wd4351)
|
ADD_COMPILE_OPTIONS(/wd4351)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
# supress warning for double to float conversion if Double precission is activated
|
# supress warning for double to float conversion if Double precision is activated
|
||||||
ADD_COMPILE_OPTIONS(/wd4244)
|
ADD_COMPILE_OPTIONS(/wd4244)
|
||||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D_DEBUG /Zi /Od")
|
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D_DEBUG /Zi /Od")
|
||||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
|
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
|
||||||
|
|
Loading…
Reference in New Issue