Properly defining build-time defines in config.h
authorChris Russ <christoph.russ@roames.com.au>
Sat, 16 Jul 2016 06:02:47 +0000 (16:02 +1000)
committerChris Russ <christoph.russ@roames.com.au>
Sat, 16 Jul 2016 08:23:33 +0000 (18:23 +1000)
CMakeLists.txt
code/CMakeLists.txt
include/assimp/Importer.hpp
include/assimp/config.h.in [moved from include/assimp/config.h with 99% similarity]

index 71e4969..f6a0a4e 100644 (file)
@@ -95,9 +95,17 @@ configure_file(
   ${CMAKE_CURRENT_BINARY_DIR}/revision.h
 )
 
+SET( HEADER_PATH include/assimp )
+
+configure_file(
+  ${HEADER_PATH}/config.h.in
+  ${ASSIMP_INCLUDE_INSTALL_DIR}/assimp/config.h
+)
+
 include_directories(
     ./
     ${CMAKE_CURRENT_BINARY_DIR}
+    ${CMAKE_CURRENT_BINARY_DIR}/include
 )
 
 OPTION(ASSIMP_OPT_BUILD_PACKAGES "Set to ON to generate CPack configuration files and packaging targets" OFF)
index 35ecf50..93fd8e4 100644 (file)
@@ -58,7 +58,6 @@ SET( PUBLIC_HEADERS
   ${HEADER_PATH}/camera.h
   ${HEADER_PATH}/color4.h
   ${HEADER_PATH}/color4.inl
-  ${HEADER_PATH}/config.h
   ${HEADER_PATH}/defs.h
   ${HEADER_PATH}/cfileio.h
   ${HEADER_PATH}/light.h
index 3dd50ef..b18998c 100644 (file)
@@ -51,8 +51,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #endif // __cplusplus
 
 // Public ASSIMP data structures
-#include "types.h"
-#include "config.h"
+#include <assimp/types.h>
+#include <assimp/config.h>
 
 namespace Assimp    {
     // =======================================================================
similarity index 99%
rename from include/assimp/config.h
rename to include/assimp/config.h.in
index 842646b..ede1d97 100644 (file)
@@ -905,4 +905,14 @@ enum aiComponent
 
 #define AI_CONFIG_EXPORT_XFILE_64BIT "EXPORT_XFILE_64BIT"
 
+
+// ---------- All the Build/Compile-time defines ------------
+
+/** @brief Specifies if double precision is supported inside assimp
+ *
+ * Property type: Bool. Default value: undefined.
+ */
+
+#cmakedefine AI_DOUBLE_PRECISION 1
+
 #endif // !! AI_CONFIG_H_INC