Update CMakeLists.txt (#5531)
* Update CMakeLists.txt * Update Version.cpp * Update CMakeLists.txt Update minimum version of cmake * Update utVersion.cpp Adapt unittestpull/5522/head v5.4.0
parent
b41ffa5561
commit
8b9ed34eaa
|
@ -38,9 +38,9 @@ SET(CMAKE_POLICY_DEFAULT_CMP0012 NEW)
|
|||
SET(CMAKE_POLICY_DEFAULT_CMP0074 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_EXPORTER)
|
||||
# Toggles the use of the hunter package manager
|
||||
|
@ -55,7 +55,7 @@ IF(ASSIMP_HUNTER_ENABLED)
|
|||
add_definitions(-DASSIMP_USE_HUNTER)
|
||||
ENDIF()
|
||||
|
||||
PROJECT(Assimp VERSION 5.3.0)
|
||||
PROJECT(Assimp VERSION 5.4.0)
|
||||
|
||||
# All supported options ###############################################
|
||||
|
||||
|
@ -131,18 +131,18 @@ OPTION ( ASSIMP_IGNORE_GIT_HASH
|
|||
|
||||
IF (WIN32)
|
||||
OPTION( ASSIMP_BUILD_ZLIB
|
||||
"Build your own zlib"
|
||||
"Build your zlib"
|
||||
ON
|
||||
)
|
||||
ELSE()
|
||||
OPTION( ASSIMP_BUILD_ZLIB
|
||||
"Build your own zlib"
|
||||
"Build your zlib"
|
||||
OFF
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
IF (WIN32)
|
||||
# Use subset of Windows.h
|
||||
# Use a subset of Windows.h
|
||||
ADD_DEFINITIONS( -DWIN32_LEAN_AND_MEAN )
|
||||
|
||||
IF(MSVC)
|
||||
|
@ -150,16 +150,16 @@ IF (WIN32)
|
|||
"Install MSVC debug files."
|
||||
ON )
|
||||
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 )
|
||||
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
|
||||
# a choice to opt for the shared runtime if they want.
|
||||
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:
|
||||
if (${USE_STATIC_CRT})
|
||||
add_compile_options(
|
||||
|
@ -249,9 +249,9 @@ SET(ASSIMP_LIBRARY_SUFFIX "" CACHE STRING "Suffix to append to library names")
|
|||
IF( UNIX )
|
||||
# Use GNUInstallDirs for Unix predefined directories
|
||||
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 ( 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 )
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
@ -289,7 +289,7 @@ ELSEIF(MSVC)
|
|||
IF(MSVC12)
|
||||
ADD_COMPILE_OPTIONS(/wd4351)
|
||||
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)
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D_DEBUG /Zi /Od")
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
# 3) Add libassimp using the file lists (eliminates duplication of file names between
|
||||
# source groups and library command)
|
||||
#
|
||||
cmake_minimum_required( VERSION 3.10 )
|
||||
cmake_minimum_required( VERSION 3.22 )
|
||||
SET( HEADER_PATH ../include/assimp )
|
||||
|
||||
if(NOT ANDROID AND ASSIMP_ANDROID_JNIIOSYSTEM)
|
||||
|
|
|
@ -52,7 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
static constexpr char LEGAL_INFORMATION[] =
|
||||
"Open Asset Import Library (Assimp).\n"
|
||||
"A free C/C++ library to import various 3D file formats into applications\n\n"
|
||||
"(c) 2006-2023, Assimp team\n"
|
||||
"(c) 2006-2024, Assimp team\n"
|
||||
"License under the terms and conditions of the 3-clause BSD license\n"
|
||||
"https://www.assimp.org\n";
|
||||
|
||||
|
|
|
@ -48,18 +48,18 @@ TEST_F( utVersion, aiGetLegalStringTest ) {
|
|||
EXPECT_NE( lv, nullptr );
|
||||
std::string text( lv );
|
||||
|
||||
size_t pos = text.find(std::string("2023"));
|
||||
size_t pos = text.find(std::string("2024"));
|
||||
EXPECT_NE(pos, std::string::npos);
|
||||
}
|
||||
|
||||
TEST_F( utVersion, aiGetVersionMinorTest ) {
|
||||
EXPECT_EQ(aiGetVersionMinor(), 3U);
|
||||
}
|
||||
|
||||
TEST_F( utVersion, aiGetVersionMajorTest ) {
|
||||
EXPECT_EQ( aiGetVersionMajor(), 5U );
|
||||
}
|
||||
|
||||
TEST_F( utVersion, aiGetVersionMinorTest ) {
|
||||
EXPECT_EQ(aiGetVersionMinor(), 4U);
|
||||
}
|
||||
|
||||
TEST_F( utVersion, aiGetVersionPatchTest ) {
|
||||
EXPECT_EQ(aiGetVersionPatch(), 0U );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue