Updated ozz-animation to version 0.14.3 (commit 92c392b667844)
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
# Set compilers settings for all platforms/compilers.
|
||||
#---------------------------------------------------
|
||||
# ---------------------------------------------------
|
||||
|
||||
#-----------------
|
||||
# -----------------
|
||||
# Includes modules
|
||||
include(CheckIncludeFiles)
|
||||
|
||||
#------------------------------
|
||||
# ------------------------------
|
||||
# Enables IDE folders y default
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
#------------------------
|
||||
# ------------------------
|
||||
# Available build options
|
||||
|
||||
#------------------------
|
||||
# ------------------------
|
||||
# Lists all the cxx flags
|
||||
set(cxx_all_flags
|
||||
CMAKE_CXX_FLAGS
|
||||
@@ -26,13 +26,14 @@ set(cxx_all_flags
|
||||
CMAKE_CXX_FLAGS_RELEASE
|
||||
CMAKE_C_FLAGS_RELEASE)
|
||||
|
||||
#--------------------------------------
|
||||
# --------------------------------------
|
||||
# Cross compiler compilation flags
|
||||
|
||||
# Requires C++11
|
||||
if(NOT CMAKE_CXX_STANDARD)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
@@ -41,15 +42,15 @@ if(ozz_build_simd_ref)
|
||||
add_compile_definitions(OZZ_BUILD_SIMD_REF)
|
||||
endif()
|
||||
|
||||
# Disables crt secure warnings
|
||||
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
||||
|
||||
#--------------------------------------
|
||||
# --------------------------------------
|
||||
# Modify default MSVC compilation flags
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
#---------------------------
|
||||
# ---------------------------
|
||||
# For the common build flags
|
||||
|
||||
# Disables crt secure warnings
|
||||
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
||||
|
||||
# Adds support for multiple processes builds
|
||||
add_compile_options(/MP)
|
||||
|
||||
@@ -60,62 +61,61 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
add_compile_options(/WX)
|
||||
|
||||
# Select whether to use the DLL version or the static library version of the Visual C++ runtime library.
|
||||
foreach(flag ${cxx_all_flags})
|
||||
if (ozz_build_msvc_rt_dll)
|
||||
string(REGEX REPLACE "/MT" "/MD" ${flag} "${${flag}}")
|
||||
else()
|
||||
string(REGEX REPLACE "/MD" "/MT" ${flag} "${${flag}}")
|
||||
endif()
|
||||
endforeach()
|
||||
if(ozz_build_msvc_rt_dll)
|
||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
|
||||
else()
|
||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
endif()
|
||||
|
||||
#--------------------------------------
|
||||
# --------------------------------------
|
||||
# else consider the compiler as GCC compatible (inc clang)
|
||||
else()
|
||||
|
||||
# Set the warning level to Wall
|
||||
add_compile_options(-Wall)
|
||||
|
||||
# Enable extra level of warning
|
||||
#add_compile_options(-Wextra)
|
||||
# add_compile_options(-Wextra)
|
||||
|
||||
# Set warning as error
|
||||
add_compile_options(-Werror)
|
||||
|
||||
# ignored-attributes reports issue when using _m128 as template argument
|
||||
check_cxx_compiler_flag("-Wignored-attributes" W_IGNORED_ATTRIBUTES)
|
||||
|
||||
if(W_IGNORED_ATTRIBUTES)
|
||||
add_compile_options(-Wno-ignored-attributes)
|
||||
endif()
|
||||
|
||||
|
||||
# Disables c98 retrocompatibility warnings
|
||||
check_cxx_compiler_flag("-Wc++98-compat-pedantic" W_98_COMPAT_PEDANTIC)
|
||||
|
||||
if(W_98_COMPAT_PEDANTIC)
|
||||
add_compile_options(-Wno-c++98-compat-pedantic)
|
||||
endif()
|
||||
|
||||
|
||||
# Check some options availibity for the targetted compiler
|
||||
check_cxx_compiler_flag("-Wunused-result" W_UNUSED_RESULT)
|
||||
check_cxx_compiler_flag("-Wnull-dereference" W_NULL_DEREFERENCE)
|
||||
check_cxx_compiler_flag("-Wpragma-pack" W_PRAGMA_PACK)
|
||||
|
||||
#----------------------
|
||||
# ----------------------
|
||||
# Sets emscripten output
|
||||
if(EMSCRIPTEN)
|
||||
SET(CMAKE_EXECUTABLE_SUFFIX ".html")
|
||||
add_link_options(-s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=0)
|
||||
|
||||
#if(NOT ozz_build_simd_ref)
|
||||
# set_property(DIRECTORY APPEND PROPERTY COMPILE_OPTIONS "-msse2")
|
||||
#endif()
|
||||
# if(NOT ozz_build_simd_ref)
|
||||
# set_property(DIRECTORY APPEND PROPERTY COMPILE_OPTIONS "-msse2")
|
||||
# endif()
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
#---------------------
|
||||
# ---------------------
|
||||
# Prints all the flags
|
||||
message(STATUS "---------------------------------------------------------")
|
||||
message(STATUS "Default build type is: ${CMAKE_BUILD_TYPE}")
|
||||
message(STATUS "The following compilation flags will be used:")
|
||||
|
||||
foreach(flag ${cxx_all_flags})
|
||||
message(${flag} " ${${flag}}")
|
||||
endforeach()
|
||||
@@ -124,6 +124,7 @@ message(STATUS "---------------------------------------------------------")
|
||||
|
||||
get_directory_property(DirectoryCompileOptions DIRECTORY ${PROJECT_SOURCE_DIR} COMPILE_OPTIONS)
|
||||
message(STATUS "Directory Compile Options:")
|
||||
|
||||
foreach(opt ${DirectoryCompileOptions})
|
||||
message(STATUS ${opt})
|
||||
endforeach()
|
||||
@@ -132,13 +133,14 @@ message(STATUS "---------------------------------------------------------")
|
||||
|
||||
get_directory_property(DirectoryCompileDefinitions DIRECTORY ${PROJECT_SOURCE_DIR} COMPILE_DEFINITIONS)
|
||||
message(STATUS "Directory Compile Definitions:")
|
||||
|
||||
foreach(def ${DirectoryCompileDefinitions})
|
||||
message(STATUS ${def})
|
||||
endforeach()
|
||||
|
||||
message(STATUS "---------------------------------------------------------")
|
||||
|
||||
#----------------------------------------------
|
||||
# ----------------------------------------------
|
||||
# Modifies output directory for all executables
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ".")
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ".")
|
||||
@@ -146,7 +148,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ".")
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ".")
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ".")
|
||||
|
||||
#-------------------------------
|
||||
# -------------------------------
|
||||
# Set a postfix for output files
|
||||
if(ozz_build_postfix)
|
||||
set(CMAKE_DEBUG_POSTFIX "_d")
|
||||
|
||||
@@ -67,7 +67,9 @@ function(FindFbxLibrariesGeneric _FBX_ROOT_DIR _OUT_FBX_LIBRARIES _OUT_FBX_LIBRA
|
||||
# Figures out matching compiler/os directory.
|
||||
|
||||
if("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC")
|
||||
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.20)
|
||||
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.30)
|
||||
set(FBX_CP_PATH "vs2022")
|
||||
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.20)
|
||||
set(FBX_CP_PATH "vs2019")
|
||||
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.10)
|
||||
set(FBX_CP_PATH "vs2017")
|
||||
|
||||
Reference in New Issue
Block a user