From 9aae110161a0100e9a8a00a65bf681d7b2d1832c Mon Sep 17 00:00:00 2001 From: Charlie Gettys Date: Wed, 10 Apr 2019 09:29:21 -0400 Subject: [PATCH 1/8] * Remove old non-maintained mingw makefile to prevent confusion * Add notes on building with MinGW to Build.md --- Build.md | 13 +++++- code/makefile.mingw | 105 -------------------------------------------- 2 files changed, 12 insertions(+), 106 deletions(-) delete mode 100644 code/makefile.mingw diff --git a/Build.md b/Build.md index d5b443a79..04bec04f0 100644 --- a/Build.md +++ b/Build.md @@ -23,7 +23,7 @@ This will generate the project files for the visual studio. All dependencies use See https://stackoverflow.com/questions/40803170/cmake-uwp-using-cmake-to-build-universal-windows-app -# Build instrcutions for Linux / Unix +# Build instructions for Linux / Unix Open a terminal and got to your repository. You can generate the makefiles and build the library via: ``` @@ -34,6 +34,17 @@ The option -j descripes the number of parallel processes for the build. In this If you want to use a IDE for linux you can try QTCreator for instance. +# Build instructions for MinGW + +Please see [CMake Cross Compiling](https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling) for general information on CMake Toolchains. + +Some users have had success building assimp using MinGW on Linux using the following toolchain, which is not maintained by assimp. [linux-mingw-w64-gnuxx11.cmake](https://github.com/ruslo/polly/blob/master/linux-mingw-w64-gnuxx11.cmake) + +The following toolchain may or may not be helpful for building assimp using MinGW on Windows (untested): + [mingw-cxx17.cmake](https://github.com/ruslo/polly/blob/master/mingw-cxx17.cmake) + +Besides the toolchain, compilation should be the same as for Linux / Unix + # CMake build options The cmake-build-environment provides options to configure the build. The following options can be used: - **BUILD_SHARED_LIBS ( default ON )**: Generation of shared libs ( dll for windows, so for Linux ). Set this to OFF to get a static lib. diff --git a/code/makefile.mingw b/code/makefile.mingw deleted file mode 100644 index 711d57f57..000000000 --- a/code/makefile.mingw +++ /dev/null @@ -1,105 +0,0 @@ -### USE OF THIS MAKEFILE IS NOT RECOMMENDED. -### It is no longer maintained. Use CMAKE instead. - -# --------------------------------------------------------------------------- -# Makefile for Open Asset Import Library (MinGW32-make) -# aramis_acg@users.sourceforge.net -# - just a quick'n'dirty one, could be buggy ... -# -# Usage: mingw32-make -f makefile.mingw - -# TARGETS: -# all Build a shared so from the whole library -# clean Cleanup object files, prepare for rebuild -# static Build a static library (*.a) - -# MACROS: (make clean before you change one) -# NOBOOST=1 Build against boost workaround -# SINGLETHREADED=1 Build single-threaded library -# DEBUG=1 Build debug build of library -# -# --------------------------------------------------------------------------- - -# C++ object files -OBJECTS := $(patsubst %.cpp,%.o, $(wildcard *.cpp)) -OBJECTS += $(patsubst %.cpp,%.o, $(wildcard extra/*.cpp)) -OBJECTS += $(patsubst %.cpp,%.o, $(wildcard ./../contrib/irrXML/*.cpp)) - -# C object files -OBJECTSC := $(patsubst %.c,%.oc, $(wildcard ./../contrib/zlib/*.c)) -OBJECTSC += $(patsubst %.c,%.oc, $(wildcard ./../contrib/ConvertUTF/*.c)) -OBJECTSC += $(patsubst %.c,%.oc, $(wildcard ./../contrib/unzip/*.c)) - -# Include flags for gcc -INCLUDEFLAGS = - -# Preprocessor defines for gcc -DEFINEFLAGS = - -# Suffix for the output binary, represents build type -NAMESUFFIX = - -# Output path for binaries -BINPATH = ../bin/mingw/ - -# GCC compiler flags -CPPFLAGS=-Wall - -# Setup environment for noboost build -ifeq ($(NOBOOST),1) - SINGLETHREADED = 1 - INCLUDEFLAGS += -I./BoostWorkaround/ - DEFINEFLAGS += -DASSIMP_BUILD_BOOST_WORKAROUND -# NAMESUFFIX += -noboost -else - # adjust this manually if your boost is stored elsewhere - INCLUDEFLAGS += -I"C:/Program Files/boost/boost_1_38" - #INCLUDEFLAGS += -I"$(BOOST_DIR)" - -endif - -# Setup environment for st build -ifeq ($(SINGLETHREADED),1) - DEFINEFLAGS += -DASSIMP_BUILD_SINGLETHREADED -# NAMESUFFIX += -st -endif - -# Setup environment for debug build -ifeq ($(DEBUG),1) - DEFINEFLAGS += -D_DEBUG -DDEBUG - CPPFLAGS += -g -# NAMESUFFIX += -debug -else - CPPFLAGS += -O2 -s - DEFINEFLAGS += -DNDEBUG -D_NDEBUG -endif - -# Output name of shared library -SHARED_TARGET = $(BINPATH)/libassimp$(NAMESUFFIX).so - -# Output name of static library -STATIC = $(BINPATH)/libassimp$(NAMESUFFIX).a - -# target: all -# usage : build a shared library (*.so) -all: $(SHARED_TARGET) - -$(SHARED_TARGET): $(OBJECTS) $(OBJECTSC) - gcc -o $@ $(OBJECTS) $(OBJECTSC) -shared -lstdc++ -%.o:%.cpp - $(CXX) -c $(CPPFLAGS) $? -o $@ $(INCLUDEFLAGS) $(DEFINEFLAGS) -%.oc:%.c - $(CXX) -x c -c -ansi $(CPPFLAGS) $? -o $@ - -# target: clean -# usage : cleanup all object files, prepare for a rebuild -.PHONY: clean -clean: - -del *.o .\..\contrib\irrXML\*.o .\..\contrib\zlib\*.oc .\..\contrib\unzip\*.oc .\..\contrib\ConvertUTF\*.oc - -# target: static -# usage : build a static library (*.a) -static: $(STATIC) -$(STATIC): $(OBJECTS) $(OBJECTSC) - ar rcs $@ $(OBJECTS) $(OBJECTSC) - From f7384dec95832c6e91f5b7896749a195c8daab52 Mon Sep 17 00:00:00 2001 From: Charlie Gettys Date: Wed, 10 Apr 2019 09:45:31 -0400 Subject: [PATCH 2/8] Possible fix for #2406. Shouldn't affect other compiled files, but have not verified this. Also, if anyone tries to debug StepFileGen1.cpp on MinGW, the debug info may not be there, but I think this is the best we can do. --- code/CMakeLists.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index a265a01dc..be70ba88c 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -800,6 +800,18 @@ ADD_ASSIMP_IMPORTER( MMD MMDVmdParser.h ) +# Workaround for issue #2406 - force problematic large file to be optimized to prevent string table overflow error +# Used -Os instead of -O2 as previous issues had mentioned, since -Os is roughly speaking -O2, excluding any +# optimizations that take up extra space. Given that the issue is a string table overflowing, -Os seemed appropriate +# Also, I'm not positive if both link & compile flags are needed, but this hopefully ensures that the issue should not +# recur for edge cases such as static builds. +if ((CMAKE_COMPILER_IS_MINGW) AND (CMAKE_BUILD_TYPE MATCHES Debug)) + message("-- Applying MinGW StepFileGen1.cpp Debug Workaround") + SET_SOURCE_FILES_PROPERTIES(Importer/StepFile/StepFileGen1.cpp PROPERTIES COMPILE_FLAGS -Os ) + SET_SOURCE_FILES_PROPERTIES(Importer/StepFile/StepFileGen1.cpp PROPERTIES LINK_FLAGS -Os ) + SET_SOURCE_FILES_PROPERTIES(Importer/StepFile/StepFileGen1.cpp PROPERTIES STATIC_LIBRARY_FLAGS -Os ) +endif() + ADD_ASSIMP_IMPORTER( STEP STEPFile.h Importer/StepFile/StepFileImporter.h From 6a373d55c7c78cf8aabc2c829abc62d9b9a5d47f Mon Sep 17 00:00:00 2001 From: Charlie Gettys Date: Wed, 10 Apr 2019 10:07:24 -0400 Subject: [PATCH 3/8] * Add notes on MinGW compiler version requirements * Add check on MinGW compiler version to force compliance. * Closes #2315 ? --- Build.md | 5 ++++- CMakeLists.txt | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Build.md b/Build.md index 04bec04f0..2e47c8cab 100644 --- a/Build.md +++ b/Build.md @@ -35,6 +35,9 @@ The option -j descripes the number of parallel processes for the build. In this If you want to use a IDE for linux you can try QTCreator for instance. # Build instructions for MinGW + Older versions of MinGW's compiler (e.g. 5.1.0) do not support the -mbig_obj flag +required to compile some of assimp's files, especially for debug builds. +Version 7.3.0 of g++-mingw-w64 & gcc-mingw-w64 appears to work. Please see [CMake Cross Compiling](https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling) for general information on CMake Toolchains. @@ -43,7 +46,7 @@ Some users have had success building assimp using MinGW on Linux using the follo The following toolchain may or may not be helpful for building assimp using MinGW on Windows (untested): [mingw-cxx17.cmake](https://github.com/ruslo/polly/blob/master/mingw-cxx17.cmake) -Besides the toolchain, compilation should be the same as for Linux / Unix +Besides the toolchain, compilation should be the same as for Linux / Unix. # CMake build options The cmake-build-environment provides options to configure the build. The following options can be used: diff --git a/CMakeLists.txt b/CMakeLists.txt index 13a054de2..755bef89a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -234,7 +234,12 @@ ELSEIF ( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" ) SET(CMAKE_CXX_FLAGS "-g -fvisibility=hidden -fPIC -fno-strict-aliasing -Wall -Wno-long-long -std=c++11 ${CMAKE_CXX_FLAGS}" ) SET(CMAKE_C_FLAGS "-fPIC -fno-strict-aliasing ${CMAKE_C_FLAGS}") ELSEIF( CMAKE_COMPILER_IS_MINGW ) - SET( CMAKE_CXX_FLAGS "-fvisibility=hidden -fno-strict-aliasing -Wall -Wno-long-long -std=c++11 -Wa,-mbig-obj ${CMAKE_CXX_FLAGS}" ) + IF (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0) + message(FATAL_ERROR "MinGW is too old") + ELSEIF(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.3) + message(WARNING "MinGW is old, if you experience errors, update MinGW") + ENDIF() + SET( CMAKE_CXX_FLAGS "-fvisibility=hidden -fPIC -fno-strict-aliasing -Wall -Wno-long-long -std=c++11 -Wa,-mbig-obj ${CMAKE_CXX_FLAGS}" ) SET(CMAKE_C_FLAGS "-fPIC -fno-strict-aliasing ${CMAKE_C_FLAGS} ") ADD_DEFINITIONS( -U__STRICT_ANSI__ ) ENDIF() From 567a645c4fa3fdad65c1004ac92e62384ff7bff5 Mon Sep 17 00:00:00 2001 From: Charlie Gettys Date: Wed, 10 Apr 2019 10:31:57 -0400 Subject: [PATCH 4/8] * Improve error message for new check on MinGW compiler version --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 755bef89a..2250e8006 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -235,11 +235,11 @@ ELSEIF ( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" ) SET(CMAKE_C_FLAGS "-fPIC -fno-strict-aliasing ${CMAKE_C_FLAGS}") ELSEIF( CMAKE_COMPILER_IS_MINGW ) IF (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0) - message(FATAL_ERROR "MinGW is too old") + message(FATAL_ERROR "MinGW is too old to be supported. Please update MinGW and try again.") ELSEIF(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.3) - message(WARNING "MinGW is old, if you experience errors, update MinGW") + message(WARNING "MinGW is old, if you experience errors, update MinGW.") ENDIF() - SET( CMAKE_CXX_FLAGS "-fvisibility=hidden -fPIC -fno-strict-aliasing -Wall -Wno-long-long -std=c++11 -Wa,-mbig-obj ${CMAKE_CXX_FLAGS}" ) + SET( CMAKE_CXX_FLAGS "-fvisibility=hidden -fno-strict-aliasing -Wall -Wno-long-long -std=c++11 -Wa,-mbig-obj ${CMAKE_CXX_FLAGS}" ) SET(CMAKE_C_FLAGS "-fPIC -fno-strict-aliasing ${CMAKE_C_FLAGS} ") ADD_DEFINITIONS( -U__STRICT_ANSI__ ) ENDIF() From 24a0aaeb779d0b30e4e1640afebab8159e596d6c Mon Sep 17 00:00:00 2001 From: Charlie Gettys Date: Wed, 10 Apr 2019 11:02:36 -0400 Subject: [PATCH 5/8] Fix Codacy Warning --- Build.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Build.md b/Build.md index 2e47c8cab..afee8caf7 100644 --- a/Build.md +++ b/Build.md @@ -1,16 +1,17 @@ -# Install CMake +# Build Instructions +## Install CMake Asset-Importer-Lib can be build for a lot of different platforms. We are using cmake to generate the build environment for these via cmake. So you have to make sure that you have a working cmake-installation on your system. You can download it at https://cmake.org/ or for linux install it via ``` sudo apt-get install cmake ``` -# Get the source +## Get the source Make sure you have a working git-installation. Open a command prompt and clone the Asset-Importer-Lib via: ``` git clone https://github.com/assimp/assimp.git ``` -# Build instructions for Windows with Visual-Studio +## Build instructions for Windows with Visual-Studio First you have to install Visual-Studio on your windows-system. You can get the Community-Version for free here: https://visualstudio.microsoft.com/de/downloads/ To generate the build environment for your IDE open a command prompt, navigate to your repo and type: @@ -19,11 +20,11 @@ To generate the build environment for your IDE open a command prompt, navigate t ``` This will generate the project files for the visual studio. All dependencies used to build Asset-IMporter-Lib shall be part of the repo. If you want to use you own zlib.installation this is possible as well. Check the options for it. -# Build instructions for Windows with UWP +## Build instructions for Windows with UWP See https://stackoverflow.com/questions/40803170/cmake-uwp-using-cmake-to-build-universal-windows-app -# Build instructions for Linux / Unix +## Build instructions for Linux / Unix Open a terminal and got to your repository. You can generate the makefiles and build the library via: ``` @@ -34,7 +35,7 @@ The option -j descripes the number of parallel processes for the build. In this If you want to use a IDE for linux you can try QTCreator for instance. -# Build instructions for MinGW +## Build instructions for MinGW Older versions of MinGW's compiler (e.g. 5.1.0) do not support the -mbig_obj flag required to compile some of assimp's files, especially for debug builds. Version 7.3.0 of g++-mingw-w64 & gcc-mingw-w64 appears to work. @@ -48,7 +49,7 @@ The following toolchain may or may not be helpful for building assimp using MinG Besides the toolchain, compilation should be the same as for Linux / Unix. -# CMake build options +## CMake build options The cmake-build-environment provides options to configure the build. The following options can be used: - **BUILD_SHARED_LIBS ( default ON )**: Generation of shared libs ( dll for windows, so for Linux ). Set this to OFF to get a static lib. - **BUILD_FRAMEWORK ( default OFF, MacOnly)**: Build package as Mac OS X Framework bundle From c1f3624f5b18f7207a6dff5674bbf1c3e7c70c13 Mon Sep 17 00:00:00 2001 From: Charlie Gettys Date: Wed, 10 Apr 2019 11:06:00 -0400 Subject: [PATCH 6/8] Fix more codacy warnings --- Build.md | 49 ++++++++++++++++++++++++------------------------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/Build.md b/Build.md index afee8caf7..dc81fe0d7 100644 --- a/Build.md +++ b/Build.md @@ -1,13 +1,13 @@ # Build Instructions ## Install CMake Asset-Importer-Lib can be build for a lot of different platforms. We are using cmake to generate the build environment for these via cmake. So you have to make sure that you have a working cmake-installation on your system. You can download it at https://cmake.org/ or for linux install it via -``` +```bash sudo apt-get install cmake ``` ## Get the source Make sure you have a working git-installation. Open a command prompt and clone the Asset-Importer-Lib via: -``` +```bash git clone https://github.com/assimp/assimp.git ``` @@ -15,19 +15,18 @@ git clone https://github.com/assimp/assimp.git First you have to install Visual-Studio on your windows-system. You can get the Community-Version for free here: https://visualstudio.microsoft.com/de/downloads/ To generate the build environment for your IDE open a command prompt, navigate to your repo and type: -``` -> cmake CMakeLists.txt +```bash +cmake CMakeLists.txt ``` This will generate the project files for the visual studio. All dependencies used to build Asset-IMporter-Lib shall be part of the repo. If you want to use you own zlib.installation this is possible as well. Check the options for it. ## Build instructions for Windows with UWP See https://stackoverflow.com/questions/40803170/cmake-uwp-using-cmake-to-build-universal-windows-app - ## Build instructions for Linux / Unix Open a terminal and got to your repository. You can generate the makefiles and build the library via: -``` +```bash cmake CMakeLists.txt make -j4 ``` @@ -51,23 +50,23 @@ Besides the toolchain, compilation should be the same as for Linux / Unix. ## CMake build options The cmake-build-environment provides options to configure the build. The following options can be used: -- **BUILD_SHARED_LIBS ( default ON )**: Generation of shared libs ( dll for windows, so for Linux ). Set this to OFF to get a static lib. -- **BUILD_FRAMEWORK ( default OFF, MacOnly)**: Build package as Mac OS X Framework bundle -- **ASSIMP_DOUBLE_PRECISION( default OFF )**: All data will be stored as double values. -- **ASSIMP_OPT_BUILD_PACKAGES ( default OFF)**: Set to ON to generate CPack configuration files and packaging targets -- **ASSIMP_ANDROID_JNIIOSYSTEM ( default OFF )**: Android JNI IOSystem support is active -- **ASSIMP_NO_EXPORT ( default OFF )**: Disable Assimp's export functionality -- **ASSIMP_BUILD_ZLIB ( default OFF )**: Build your own zlib -- **ASSIMP_BUILD_ASSIMP_TOOLS ( default ON )**: If the supplementary tools for Assimp are built in addition to the library. -- **ASSIMP_BUILD_SAMPLES ( default OFF )**: If the official samples are built as well (needs Glut). -- **ASSIMP_BUILD_TESTS ( default ON )**: If the test suite for Assimp is built in addition to the library. -- **ASSIMP_COVERALLS ( default OFF )**: Enable this to measure test coverage. -- **ASSIMP_WERROR( default OFF )**: Treat warnings as errors. -- **ASSIMP_ASAN ( default OFF )**: Enable AddressSanitizer. -- **ASSIMP_UBSAN ( default OFF )**: Enable Undefined Behavior sanitizer. -- **SYSTEM_IRRXML ( default OFF )**: Use system installed Irrlicht/IrrXML library. -- **BUILD_DOCS ( default OFF )**: Build documentation using Doxygen. -- **INJECT_DEBUG_POSTFIX( default ON )**: Inject debug postfix in .a/.so lib names -- **IGNORE_GIT_HASH ( default OFF )**: Don't call git to get the hash. -- **ASSIMP_INSTALL_PDB ( default ON )**: Install MSVC debug files. + - **BUILD_SHARED_LIBS ( default ON )**: Generation of shared libs ( dll for windows, so for Linux ). Set this to OFF to get a static lib. + - **BUILD_FRAMEWORK ( default OFF, MacOnly)**: Build package as Mac OS X Framework bundle + - **ASSIMP_DOUBLE_PRECISION( default OFF )**: All data will be stored as double values. + - **ASSIMP_OPT_BUILD_PACKAGES ( default OFF)**: Set to ON to generate CPack configuration files and packaging targets + - **ASSIMP_ANDROID_JNIIOSYSTEM ( default OFF )**: Android JNI IOSystem support is active + - **ASSIMP_NO_EXPORT ( default OFF )**: Disable Assimp's export functionality + - **ASSIMP_BUILD_ZLIB ( default OFF )**: Build your own zlib + - **ASSIMP_BUILD_ASSIMP_TOOLS ( default ON )**: If the supplementary tools for Assimp are built in addition to the library. + - **ASSIMP_BUILD_SAMPLES ( default OFF )**: If the official samples are built as well (needs Glut). + - **ASSIMP_BUILD_TESTS ( default ON )**: If the test suite for Assimp is built in addition to the library. + - **ASSIMP_COVERALLS ( default OFF )**: Enable this to measure test coverage. + - **ASSIMP_WERROR( default OFF )**: Treat warnings as errors. + - **ASSIMP_ASAN ( default OFF )**: Enable AddressSanitizer. + - **ASSIMP_UBSAN ( default OFF )**: Enable Undefined Behavior sanitizer. + - **SYSTEM_IRRXML ( default OFF )**: Use system installed Irrlicht/IrrXML library. + - **BUILD_DOCS ( default OFF )**: Build documentation using Doxygen. + - **INJECT_DEBUG_POSTFIX( default ON )**: Inject debug postfix in .a/.so lib names + - **IGNORE_GIT_HASH ( default OFF )**: Don't call git to get the hash. + - **ASSIMP_INSTALL_PDB ( default ON )**: Install MSVC debug files. From 1b0c1139ebe306beaa55f3f5911d707b0d578a6f Mon Sep 17 00:00:00 2001 From: Charlie Gettys Date: Wed, 10 Apr 2019 11:45:30 -0400 Subject: [PATCH 7/8] Fix more codacy warnings! --- Build.md | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/Build.md b/Build.md index dc81fe0d7..1e28c648f 100644 --- a/Build.md +++ b/Build.md @@ -21,7 +21,7 @@ cmake CMakeLists.txt This will generate the project files for the visual studio. All dependencies used to build Asset-IMporter-Lib shall be part of the repo. If you want to use you own zlib.installation this is possible as well. Check the options for it. ## Build instructions for Windows with UWP -See https://stackoverflow.com/questions/40803170/cmake-uwp-using-cmake-to-build-universal-windows-app +See ## Build instructions for Linux / Unix Open a terminal and got to your repository. You can generate the makefiles and build the library via: @@ -50,23 +50,22 @@ Besides the toolchain, compilation should be the same as for Linux / Unix. ## CMake build options The cmake-build-environment provides options to configure the build. The following options can be used: - - **BUILD_SHARED_LIBS ( default ON )**: Generation of shared libs ( dll for windows, so for Linux ). Set this to OFF to get a static lib. - - **BUILD_FRAMEWORK ( default OFF, MacOnly)**: Build package as Mac OS X Framework bundle - - **ASSIMP_DOUBLE_PRECISION( default OFF )**: All data will be stored as double values. - - **ASSIMP_OPT_BUILD_PACKAGES ( default OFF)**: Set to ON to generate CPack configuration files and packaging targets - - **ASSIMP_ANDROID_JNIIOSYSTEM ( default OFF )**: Android JNI IOSystem support is active - - **ASSIMP_NO_EXPORT ( default OFF )**: Disable Assimp's export functionality - - **ASSIMP_BUILD_ZLIB ( default OFF )**: Build your own zlib - - **ASSIMP_BUILD_ASSIMP_TOOLS ( default ON )**: If the supplementary tools for Assimp are built in addition to the library. - - **ASSIMP_BUILD_SAMPLES ( default OFF )**: If the official samples are built as well (needs Glut). - - **ASSIMP_BUILD_TESTS ( default ON )**: If the test suite for Assimp is built in addition to the library. - - **ASSIMP_COVERALLS ( default OFF )**: Enable this to measure test coverage. - - **ASSIMP_WERROR( default OFF )**: Treat warnings as errors. - - **ASSIMP_ASAN ( default OFF )**: Enable AddressSanitizer. - - **ASSIMP_UBSAN ( default OFF )**: Enable Undefined Behavior sanitizer. - - **SYSTEM_IRRXML ( default OFF )**: Use system installed Irrlicht/IrrXML library. - - **BUILD_DOCS ( default OFF )**: Build documentation using Doxygen. - - **INJECT_DEBUG_POSTFIX( default ON )**: Inject debug postfix in .a/.so lib names - - **IGNORE_GIT_HASH ( default OFF )**: Don't call git to get the hash. - - **ASSIMP_INSTALL_PDB ( default ON )**: Install MSVC debug files. - +- **BUILD_SHARED_LIBS ( default ON )**: Generation of shared libs ( dll for windows, so for Linux ). Set this to OFF to get a static lib. +- **BUILD_FRAMEWORK ( default OFF, MacOnly)**: Build package as Mac OS X Framework bundle +- **ASSIMP_DOUBLE_PRECISION( default OFF )**: All data will be stored as double values. +- **ASSIMP_OPT_BUILD_PACKAGES ( default OFF)**: Set to ON to generate CPack configuration files and packaging targets +- **ASSIMP_ANDROID_JNIIOSYSTEM ( default OFF )**: Android JNI IOSystem support is active +- **ASSIMP_NO_EXPORT ( default OFF )**: Disable Assimp's export functionality +- **ASSIMP_BUILD_ZLIB ( default OFF )**: Build your own zlib +- **ASSIMP_BUILD_ASSIMP_TOOLS ( default ON )**: If the supplementary tools for Assimp are built in addition to the library. +- **ASSIMP_BUILD_SAMPLES ( default OFF )**: If the official samples are built as well (needs Glut). +- **ASSIMP_BUILD_TESTS ( default ON )**: If the test suite for Assimp is built in addition to the library. +- **ASSIMP_COVERALLS ( default OFF )**: Enable this to measure test coverage. +- **ASSIMP_WERROR( default OFF )**: Treat warnings as errors. +- **ASSIMP_ASAN ( default OFF )**: Enable AddressSanitizer. +- **ASSIMP_UBSAN ( default OFF )**: Enable Undefined Behavior sanitizer. +- **SYSTEM_IRRXML ( default OFF )**: Use system installed Irrlicht/IrrXML library. +- **BUILD_DOCS ( default OFF )**: Build documentation using Doxygen. +- **INJECT_DEBUG_POSTFIX( default ON )**: Inject debug postfix in .a/.so lib names +- **IGNORE_GIT_HASH ( default OFF )**: Don't call git to get the hash. +- **ASSIMP_INSTALL_PDB ( default ON )**: Install MSVC debug files. From 2f6f71651226874ac57538ff8e772d0821dead28 Mon Sep 17 00:00:00 2001 From: Charlie Gettys Date: Wed, 10 Apr 2019 12:42:19 -0400 Subject: [PATCH 8/8] Clarify build instructions --- Build.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Build.md b/Build.md index 1e28c648f..7c908606d 100644 --- a/Build.md +++ b/Build.md @@ -41,7 +41,9 @@ Version 7.3.0 of g++-mingw-w64 & gcc-mingw-w64 appears to work. Please see [CMake Cross Compiling](https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling) for general information on CMake Toolchains. -Some users have had success building assimp using MinGW on Linux using the following toolchain, which is not maintained by assimp. [linux-mingw-w64-gnuxx11.cmake](https://github.com/ruslo/polly/blob/master/linux-mingw-w64-gnuxx11.cmake) +Some users have had success building assimp using MinGW on Linux using [polly](https://github.com/ruslo/polly/). + +The following toolchain, which is not maintained by assimp, seems to work on Linux: [linux-mingw-w64-gnuxx11.cmake](https://github.com/ruslo/polly/blob/master/linux-mingw-w64-gnuxx11.cmake) The following toolchain may or may not be helpful for building assimp using MinGW on Windows (untested): [mingw-cxx17.cmake](https://github.com/ruslo/polly/blob/master/mingw-cxx17.cmake)