From c3129e55d2f1a9d9b7db08fc3db29d8d549edaec Mon Sep 17 00:00:00 2001 From: Marc-Anton Boehm-von Thenen Date: Mon, 18 Feb 2019 14:10:32 +0100 Subject: [PATCH 1/3] [Issue_2340] Added ASSIMP_ANDROID_JNIIOSYSTEM precheck to only remain set to ON in proper ANDROID enabled toolchain environment --- code/CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 1726fda72..a677269f0 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -47,6 +47,11 @@ cmake_minimum_required( VERSION 2.6 ) SET( HEADER_PATH ../include/assimp ) +if(NOT (ANDROID AND ASSIMP_ANDROID_JNIIOSYSTEM)) + message(WARNING "Requesting Android JNI I/O-System in non-Android toolchain. Resetting ASSIMP_ANDROID_JNIIOSYSTEM to OFF.") + set(ASSIMP_ANDROID_JNIIOSYSTEM OFF) +endif(NOT (ANDROID AND ASSIMP_ANDROID_JNIIOSYSTEM)) + SET( COMPILER_HEADERS ${HEADER_PATH}/Compiler/pushpack1.h ${HEADER_PATH}/Compiler/poppack1.h @@ -932,11 +937,11 @@ TARGET_INCLUDE_DIRECTORIES ( assimp PUBLIC TARGET_LINK_LIBRARIES(assimp ${ZLIB_LIBRARIES} ${OPENDDL_PARSER_LIBRARIES} ${IRRXML_LIBRARY} ) -if(ANDROID AND ASSIMP_ANDROID_JNIIOSYSTEM) +if(ASSIMP_ANDROID_JNIIOSYSTEM) set(ASSIMP_ANDROID_JNIIOSYSTEM_PATH port/AndroidJNI) add_subdirectory(../${ASSIMP_ANDROID_JNIIOSYSTEM_PATH}/ ../${ASSIMP_ANDROID_JNIIOSYSTEM_PATH}/) target_link_libraries(assimp android_jniiosystem) -endif(ANDROID AND ASSIMP_ANDROID_JNIIOSYSTEM) +endif(ASSIMP_ANDROID_JNIIOSYSTEM) IF (ASSIMP_BUILD_NONFREE_C4D_IMPORTER) TARGET_LINK_LIBRARIES(assimp optimized ${C4D_RELEASE_LIBRARIES}) From a94c8bf3f69fd072d9896e2e2881a0fcc0636e88 Mon Sep 17 00:00:00 2001 From: Marc-Anton Boehm-von Thenen Date: Mon, 18 Feb 2019 14:14:27 +0100 Subject: [PATCH 2/3] [Issue_2340] Wrong precondition layout... missed ANDROID=ON and ASSIMP_ANDROID_JNIIOSYSTEM=OFFvalid constellation --- code/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index a677269f0..2c48f3742 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -47,7 +47,7 @@ cmake_minimum_required( VERSION 2.6 ) SET( HEADER_PATH ../include/assimp ) -if(NOT (ANDROID AND ASSIMP_ANDROID_JNIIOSYSTEM)) +if(NOT ANDROID AND ASSIMP_ANDROID_JNIIOSYSTEM) message(WARNING "Requesting Android JNI I/O-System in non-Android toolchain. Resetting ASSIMP_ANDROID_JNIIOSYSTEM to OFF.") set(ASSIMP_ANDROID_JNIIOSYSTEM OFF) endif(NOT (ANDROID AND ASSIMP_ANDROID_JNIIOSYSTEM)) From 4d0740a12000b0ae8ed202639690173eecd09b78 Mon Sep 17 00:00:00 2001 From: Marc-Anton Boehm-von Thenen Date: Mon, 18 Feb 2019 14:15:39 +0100 Subject: [PATCH 3/3] [Issue_2340] Proper closing endif()... --- code/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 2c48f3742..37ad34b85 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -50,7 +50,7 @@ SET( HEADER_PATH ../include/assimp ) if(NOT ANDROID AND ASSIMP_ANDROID_JNIIOSYSTEM) message(WARNING "Requesting Android JNI I/O-System in non-Android toolchain. Resetting ASSIMP_ANDROID_JNIIOSYSTEM to OFF.") set(ASSIMP_ANDROID_JNIIOSYSTEM OFF) -endif(NOT (ANDROID AND ASSIMP_ANDROID_JNIIOSYSTEM)) +endif(NOT ANDROID AND ASSIMP_ANDROID_JNIIOSYSTEM) SET( COMPILER_HEADERS ${HEADER_PATH}/Compiler/pushpack1.h