Add check for wall switch from cmake
parent
1944c45944
commit
b3c7bdbdd6
|
@ -305,19 +305,16 @@ void FBXConverter::ConvertNodes(uint64_t id, aiNode *parent, aiNode *root_node)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nodes.size()) {
|
if (nodes.empty()) {
|
||||||
parent->mChildren = new aiNode *[nodes.size()]();
|
|
||||||
parent->mNumChildren = static_cast<unsigned int>(nodes.size());
|
|
||||||
|
|
||||||
for (unsigned int i = 0; i < nodes.size(); ++i)
|
|
||||||
{
|
|
||||||
parent->mChildren[i] = nodes[i].mOwnership.release();
|
|
||||||
}
|
|
||||||
nodes.clear();
|
|
||||||
} else {
|
|
||||||
parent->mNumChildren = 0;
|
parent->mNumChildren = 0;
|
||||||
parent->mChildren = nullptr;
|
parent->mChildren = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
parent->mChildren = new aiNode *[nodes.size()]();
|
||||||
|
parent->mNumChildren = static_cast<unsigned int>(nodes.size());
|
||||||
|
for (unsigned int i = 0; i < nodes.size(); ++i) {
|
||||||
|
parent->mChildren[i] = nodes[i].mOwnership.release();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FBXConverter::ConvertLights(const Model &model, const std::string &orig_name) {
|
void FBXConverter::ConvertLights(const Model &model, const std::string &orig_name) {
|
||||||
|
|
|
@ -263,6 +263,14 @@ IF(MSVC)
|
||||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
IF (ASSIMP_WARNINGS_AS_ERRORS)
|
||||||
|
IF (MSVC)
|
||||||
|
TARGET_COMPILE_OPTIONS(unit PRIVATE /W4 /WX)
|
||||||
|
ELSE()
|
||||||
|
TARGET_COMPILE_OPTIONS(unit PRIVATE -Wall -Werror)
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
target_link_libraries( unit assimp ${platform_libs} )
|
target_link_libraries( unit assimp ${platform_libs} )
|
||||||
|
|
||||||
add_subdirectory(headercheck)
|
add_subdirectory(headercheck)
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Copyright (c) 2006-2022, assimp team
|
# Copyright (c) 2006-2022, assimp team
|
||||||
|
|
||||||
|
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use of this software in source and binary forms,
|
# Redistribution and use of this software in source and binary forms,
|
||||||
|
@ -62,6 +60,14 @@ ADD_EXECUTABLE( assimp_cmd
|
||||||
${ASSIMP_CMD_RC}
|
${ASSIMP_CMD_RC}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
IF (ASSIMP_WARNINGS_AS_ERRORS)
|
||||||
|
IF (MSVC)
|
||||||
|
TARGET_COMPILE_OPTIONS(assimp_cmd PRIVATE /W4 /WX)
|
||||||
|
ELSE()
|
||||||
|
TARGET_COMPILE_OPTIONS(assimp_cmd PRIVATE -Wall -Werror)
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
TARGET_USE_COMMON_OUTPUT_DIRECTORY(assimp_cmd)
|
TARGET_USE_COMMON_OUTPUT_DIRECTORY(assimp_cmd)
|
||||||
|
|
||||||
SET_PROPERTY(TARGET assimp_cmd PROPERTY DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})
|
SET_PROPERTY(TARGET assimp_cmd PROPERTY DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})
|
||||||
|
|
|
@ -95,6 +95,14 @@ IF ( MSVC )
|
||||||
REMOVE_DEFINITIONS( -DUNICODE -D_UNICODE )
|
REMOVE_DEFINITIONS( -DUNICODE -D_UNICODE )
|
||||||
ENDIF ()
|
ENDIF ()
|
||||||
|
|
||||||
|
IF (ASSIMP_WARNINGS_AS_ERRORS)
|
||||||
|
IF (MSVC)
|
||||||
|
TARGET_COMPILE_OPTIONS(assimp_viewer PRIVATE /W4 /WX)
|
||||||
|
ELSE()
|
||||||
|
TARGET_COMPILE_OPTIONS(assimp_viewer PRIVATE -Wall -Werror)
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
# Link the executable to the assimp + dx libs.
|
# Link the executable to the assimp + dx libs.
|
||||||
TARGET_LINK_LIBRARIES ( assimp_viewer assimp ${DirectX_LIBRARY} ${DirectX_D3DX9_LIBRARY} comctl32 winmm )
|
TARGET_LINK_LIBRARIES ( assimp_viewer assimp ${DirectX_LIBRARY} ${DirectX_D3DX9_LIBRARY} comctl32 winmm )
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue