Skip to content

Commit

Permalink
Update CMakeLists.txt (#5531)
Browse files Browse the repository at this point in the history
* Update CMakeLists.txt

* Update Version.cpp

* Update CMakeLists.txt

Update minimum version of cmake

* Update utVersion.cpp

Adapt unittest
  • Loading branch information
kimkulling committed Apr 7, 2024
1 parent b41ffa5 commit 8b9ed34
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
24 changes: 12 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 ###############################################

Expand Down Expand Up @@ -131,35 +131,35 @@ 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)
OPTION( ASSIMP_INSTALL_PDB
"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(
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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}")
Expand Down
2 changes: 1 addition & 1 deletion code/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion code/Common/Version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
10 changes: 5 additions & 5 deletions test/unit/utVersion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
Expand Down

0 comments on commit 8b9ed34

Please sign in to comment.