Marco Di Benedetto 2018-12-22 13:50:54 +01:00
commit cec163c025
4 changed files with 38 additions and 2 deletions

View File

@ -119,6 +119,7 @@ IF (IOS)
IF (NOT CMAKE_BUILD_TYPE) IF (NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE "Release") SET(CMAKE_BUILD_TYPE "Release")
ENDIF (NOT CMAKE_BUILD_TYPE) ENDIF (NOT CMAKE_BUILD_TYPE)
ADD_DEFINITIONS(-DENABLE_BITCODE)
ENDIF (IOS) ENDIF (IOS)
# Use subset of Windows.h # Use subset of Windows.h
@ -126,6 +127,7 @@ if (WIN32)
ADD_DEFINITIONS( -DWIN32_LEAN_AND_MEAN ) ADD_DEFINITIONS( -DWIN32_LEAN_AND_MEAN )
endif() endif()
IF(MSVC) IF(MSVC)
OPTION( ASSIMP_INSTALL_PDB OPTION( ASSIMP_INSTALL_PDB
"Install MSVC debug files." "Install MSVC debug files."

View File

@ -0,0 +1,17 @@
INCLUDE(CMakeForceCompiler)
SET (CMAKE_CROSSCOMPILING TRUE)
SET (CMAKE_SYSTEM_NAME "Darwin")
SET (CMAKE_SYSTEM_PROCESSOR "arm64e")
SET (IOS TRUE)
SET (IOS_SDK_DEVICE iPhoneOS)
SET (SDKVER "${IOS_SDK_VERSION}")
SET (DEVROOT "${XCODE_ROOT_DIR}/Platforms/${IOS_SDK_DEVICE}.platform/Developer")
SET (CMAKE_FIND_ROOT_PATH "${SDKROOT}" "${DEVROOT}")
SET (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

View File

@ -31,7 +31,7 @@ TOOLCHAIN=$XCODE_ROOT_DIR/Toolchains/XcodeDefault.xctoolchain
CMAKE_C_COMPILER=$(xcrun -find cc) CMAKE_C_COMPILER=$(xcrun -find cc)
CMAKE_CXX_COMPILER=$(xcrun -find c++) CMAKE_CXX_COMPILER=$(xcrun -find c++)
BUILD_ARCHS_DEVICE="arm64 armv7s armv7" BUILD_ARCHS_DEVICE="arm64e arm64 armv7s armv7"
BUILD_ARCHS_SIMULATOR="x86_64 i386" BUILD_ARCHS_SIMULATOR="x86_64 i386"
BUILD_ARCHS_ALL=($BUILD_ARCHS_DEVICE $BUILD_ARCHS_SIMULATOR) BUILD_ARCHS_ALL=($BUILD_ARCHS_DEVICE $BUILD_ARCHS_SIMULATOR)

View File

@ -54,7 +54,8 @@ const char* AICMD_MSG_INFO_HELP_E =
"assimp info <file> [-r] [-v]\n" "assimp info <file> [-r] [-v]\n"
"\tPrint basic structure of a 3D model\n" "\tPrint basic structure of a 3D model\n"
"\t-r,--raw: No postprocessing, do a raw import\n" "\t-r,--raw: No postprocessing, do a raw import\n"
"\t-v,--verbose: Print verbose info such as node transform data\n"; "\t-v,--verbose: Print verbose info such as node transform data\n"
"\t-s, --silent: Print only minimal info\n";
const std::string TREE_BRANCH_ASCII = "|-"; const std::string TREE_BRANCH_ASCII = "|-";
const std::string TREE_BRANCH_UTF8 = "\xe2\x94\x9c\xe2\x95\xb4"; const std::string TREE_BRANCH_UTF8 = "\xe2\x94\x9c\xe2\x95\xb4";
@ -305,6 +306,7 @@ int Assimp_Info (const char* const* params, unsigned int num)
// get -r and -v arguments // get -r and -v arguments
bool raw = false; bool raw = false;
bool verbose = false; bool verbose = false;
bool silent = false;
for(unsigned int i = 1; i < num; ++i) { for(unsigned int i = 1; i < num; ++i) {
if (!strcmp(params[i],"--raw")||!strcmp(params[i],"-r")) { if (!strcmp(params[i],"--raw")||!strcmp(params[i],"-r")) {
raw = true; raw = true;
@ -312,8 +314,17 @@ int Assimp_Info (const char* const* params, unsigned int num)
if (!strcmp(params[i],"--verbose")||!strcmp(params[i],"-v")) { if (!strcmp(params[i],"--verbose")||!strcmp(params[i],"-v")) {
verbose = true; verbose = true;
} }
if (!strcmp(params[i], "--silent") || !strcmp(params[i], "-s")) {
silent = true;
}
} }
// Verbose and silent at the same time are not allowed
if ( verbose && silent ) {
printf("assimp info: Invalid arguments, verbose and silent at the same time are forbitten. ");
return 1;
}
// do maximum post-processing unless -r was specified // do maximum post-processing unless -r was specified
ImportData import; ImportData import;
if (!raw) { if (!raw) {
@ -380,6 +391,12 @@ int Assimp_Info (const char* const* params, unsigned int num)
) )
; ;
if (silent)
{
printf("\n");
return 0;
}
// meshes // meshes
if (scene->mNumMeshes) { if (scene->mNumMeshes) {
printf("\nMeshes: (name) [vertices / bones / faces | primitive_types]\n"); printf("\nMeshes: (name) [vertices / bones / faces | primitive_types]\n");