diff --git a/BPTCEncoder/CMakeLists.txt b/BPTCEncoder/CMakeLists.txt
index 6b1b125..145cf4c 100644
--- a/BPTCEncoder/CMakeLists.txt
+++ b/BPTCEncoder/CMakeLists.txt
@@ -41,6 +41,7 @@
#
INCLUDE_DIRECTORIES(${FasTC_SOURCE_DIR}/Base/include)
+INCLUDE_DIRECTORIES(${FasTC_BINARY_DIR}/Base/include)
INCLUDE_DIRECTORIES(${FasTC_SOURCE_DIR}/BPTCEncoder/include)
INCLUDE_DIRECTORIES(${FasTC_BINARY_DIR}/BPTCEncoder/include)
diff --git a/Base/CMakeLists.txt b/Base/CMakeLists.txt
index 15d1044..4dfdc82 100644
--- a/Base/CMakeLists.txt
+++ b/Base/CMakeLists.txt
@@ -49,6 +49,28 @@
#
#
+INCLUDE(CheckCXXSourceCompiles)
+CHECK_CXX_SOURCE_COMPILES("
+ #include
+ int main() {
+ int8_t x8 = 0;
+ int16_t x16 = 1;
+ int32_t x32 = 2;
+ int64_t x64 = 3;
+ uint8_t ux8 = 0;
+ uint16_t ux16 = 1;
+ uint32_t ux32 = 2;
+ uint64_t ux64 = 3;
+ return (x8 | ux8 | x16 | ux16 | x32 | ux32 | x64 | ux64);
+ }"
+ HAS_CPP11_TYPES
+)
+
+CONFIGURE_FILE(
+ "config/FasTCBaseConfig.h.in"
+ "include/FasTCBaseConfig.h"
+)
+
SET( SOURCES
"src/Image.cpp"
"src/CompressionJob.cpp"
@@ -60,6 +82,7 @@ SET( SOURCES
SET( HEADERS
"include/Color.h"
"include/CompressionJob.h"
+ "config/FasTCBaseConfig.h.in"
"include/IPixel.h"
"include/Image.h"
"include/MatrixBase.h"
@@ -75,6 +98,7 @@ SET( HEADERS
)
INCLUDE_DIRECTORIES(${FasTC_SOURCE_DIR}/Base/include)
+INCLUDE_DIRECTORIES(${FasTC_BINARY_DIR}/Base/include)
ADD_LIBRARY( FasTCBase
${HEADERS}
diff --git a/Base/config/FasTCBaseConfig.h.in b/Base/config/FasTCBaseConfig.h.in
new file mode 100644
index 0000000..b39ac46
--- /dev/null
+++ b/Base/config/FasTCBaseConfig.h.in
@@ -0,0 +1,54 @@
+/* FasTC
+ * Copyright (c) 2014 University of North Carolina at Chapel Hill.
+ * All rights reserved.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for educational, research, and non-profit purposes, without
+ * fee, and without a written agreement is hereby granted, provided that the
+ * above copyright notice, this paragraph, and the following four paragraphs
+ * appear in all copies.
+ *
+ * Permission to incorporate this software into commercial products may be
+ * obtained by contacting the authors or the Office of Technology Development
+ * at the University of North Carolina at Chapel Hill .
+ *
+ * This software program and documentation are copyrighted by the University of
+ * North Carolina at Chapel Hill. The software program and documentation are
+ * supplied "as is," without any accompanying services from the University of
+ * North Carolina at Chapel Hill or the authors. The University of North
+ * Carolina at Chapel Hill and the authors do not warrant that the operation of
+ * the program will be uninterrupted or error-free. The end-user understands
+ * that the program was developed for research purposes and is advised not to
+ * rely exclusively on the program for any reason.
+ *
+ * IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL OR THE
+ * AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL,
+ * OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF
+ * THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF NORTH CAROLINA
+ * AT CHAPEL HILL OR THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS SPECIFICALLY
+ * DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY
+ * STATUTORY WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE PROVIDED HEREUNDER IS ON
+ * AN "AS IS" BASIS, AND THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND
+ * THE AUTHORS HAVE NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
+ * ENHANCEMENTS, OR MODIFICATIONS.
+ *
+ * Please send all BUG REPORTS to .
+ *
+ * The authors may be contacted via:
+ *
+ * Pavel Krajcevski
+ * Dept of Computer Science
+ * 201 S Columbia St
+ * Frederick P. Brooks, Jr. Computer Science Bldg
+ * Chapel Hill, NC 27599-3175
+ * USA
+ *
+ *
+ */
+
+// Does our compiler support cpp11 types?
+#cmakedefine FASTC_BASE_HAS_CPP11_TYPES
diff --git a/Base/include/TexCompTypes.h b/Base/include/TexCompTypes.h
index 5290b41..dfbcd9b 100644
--- a/Base/include/TexCompTypes.h
+++ b/Base/include/TexCompTypes.h
@@ -1,30 +1,39 @@
/* FasTC
- * Copyright (c) 2012 University of North Carolina at Chapel Hill. All rights reserved.
+ * Copyright (c) 2014 University of North Carolina at Chapel Hill.
+ * All rights reserved.
*
- * Permission to use, copy, modify, and distribute this software and its documentation for educational,
- * research, and non-profit purposes, without fee, and without a written agreement is hereby granted,
- * provided that the above copyright notice, this paragraph, and the following four paragraphs appear
- * in all copies.
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for educational, research, and non-profit purposes, without
+ * fee, and without a written agreement is hereby granted, provided that the
+ * above copyright notice, this paragraph, and the following four paragraphs
+ * appear in all copies.
*
- * Permission to incorporate this software into commercial products may be obtained by contacting the
- * authors or the Office of Technology Development at the University of North Carolina at Chapel Hill .
+ * Permission to incorporate this software into commercial products may be
+ * obtained by contacting the authors or the Office of Technology Development
+ * at the University of North Carolina at Chapel Hill .
*
- * This software program and documentation are copyrighted by the University of North Carolina at Chapel Hill.
- * The software program and documentation are supplied "as is," without any accompanying services from the
- * University of North Carolina at Chapel Hill or the authors. The University of North Carolina at Chapel Hill
- * and the authors do not warrant that the operation of the program will be uninterrupted or error-free. The
- * end-user understands that the program was developed for research purposes and is advised not to rely
- * exclusively on the program for any reason.
+ * This software program and documentation are copyrighted by the University of
+ * North Carolina at Chapel Hill. The software program and documentation are
+ * supplied "as is," without any accompanying services from the University of
+ * North Carolina at Chapel Hill or the authors. The University of North
+ * Carolina at Chapel Hill and the authors do not warrant that the operation of
+ * the program will be uninterrupted or error-free. The end-user understands
+ * that the program was developed for research purposes and is advised not to
+ * rely exclusively on the program for any reason.
*
- * IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL OR THE AUTHORS BE LIABLE TO ANY PARTY FOR
- * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE
- * USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL OR THE
- * AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL OR THE
+ * AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL,
+ * OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF
+ * THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF NORTH CAROLINA
+ * AT CHAPEL HILL OR THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
*
- * THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING,
- * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY
- * STATUTORY WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY
- * OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS HAVE NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
+ * THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS SPECIFICALLY
+ * DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY
+ * STATUTORY WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE PROVIDED HEREUNDER IS ON
+ * AN "AS IS" BASIS, AND THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND
+ * THE AUTHORS HAVE NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
* ENHANCEMENTS, OR MODIFICATIONS.
*
* Please send all BUG REPORTS to .
@@ -48,6 +57,28 @@
#ifndef _TEX_COMP_TYPES_H_
#define _TEX_COMP_TYPES_H_
+#include "FasTCBaseConfig.h"
+
+// Do we support C++11?
+#ifdef FASTC_BASE_HAS_CPP11_TYPES
+#include
+
+typedef int8_t int8;
+typedef uint8_t uint8;
+
+typedef int16_t int16;
+typedef uint16_t uint16;
+
+typedef int32_t int32;
+typedef uint32_t uint32;
+
+typedef int64_t int64;
+typedef uint64_t uint64;
+
+typedef int8_t CHAR;
+
+#else
+
// Windows?
#ifdef _MSC_VER
@@ -83,4 +114,6 @@ typedef char CHAR;
#endif // _MSC_VER
+#endif // FASTC_BASE_HAS_CPP11_TYPES
+
#endif // _TEX_COMP_TYPES_H_
diff --git a/Base/test/CMakeLists.txt b/Base/test/CMakeLists.txt
index ff349c8..1ceaf56 100644
--- a/Base/test/CMakeLists.txt
+++ b/Base/test/CMakeLists.txt
@@ -49,7 +49,9 @@
#
#
-INCLUDE_DIRECTORIES(${FasTC_SOURCE_DIR}/Base/include)
+INCLUDE_DIRECTORIES(${FasTC_SOURCE_DIR}/Base/include )
+INCLUDE_DIRECTORIES(${FasTC_BINARY_DIR}/Base/include )
+
INCLUDE_DIRECTORIES(${FasTC_SOURCE_DIR}/GTest/include)
SET(TESTS
diff --git a/CLTool/CMakeLists.txt b/CLTool/CMakeLists.txt
index 2205688..73de05b 100644
--- a/CLTool/CMakeLists.txt
+++ b/CLTool/CMakeLists.txt
@@ -41,6 +41,8 @@
#
INCLUDE_DIRECTORIES( ${FasTC_SOURCE_DIR}/Base/include )
+INCLUDE_DIRECTORIES( ${FasTC_BINARY_DIR}/Base/include )
+
INCLUDE_DIRECTORIES( ${FasTC_SOURCE_DIR}/Core/include )
INCLUDE_DIRECTORIES( ${FasTC_SOURCE_DIR}/IO/include )
diff --git a/Core/CMakeLists.txt b/Core/CMakeLists.txt
index 78430b0..3af98a6 100644
--- a/Core/CMakeLists.txt
+++ b/Core/CMakeLists.txt
@@ -49,6 +49,9 @@
#
#
+INCLUDE_DIRECTORIES( ${FasTC_SOURCE_DIR}/Base/include )
+INCLUDE_DIRECTORIES( ${FasTC_BINARY_DIR}/Base/include )
+
SET( SOURCES
"src/TexComp.cpp"
"src/CompressedImage.cpp"
@@ -74,7 +77,6 @@ ELSE()
SET( LINK_FLAGS -lrt ${LINK_FLAGS} )
ENDIF()
-INCLUDE_DIRECTORIES( ${FasTC_SOURCE_DIR}/Base/include )
INCLUDE_DIRECTORIES( ${FasTC_SOURCE_DIR} )
INCLUDE_DIRECTORIES( ${FasTC_SOURCE_DIR}/ETCEncoder/include )
diff --git a/DXTEncoder/CMakeLists.txt b/DXTEncoder/CMakeLists.txt
index 9774136..015bd96 100755
--- a/DXTEncoder/CMakeLists.txt
+++ b/DXTEncoder/CMakeLists.txt
@@ -41,6 +41,7 @@
#
INCLUDE_DIRECTORIES(${FasTC_SOURCE_DIR}/Base/include)
+INCLUDE_DIRECTORIES(${FasTC_BINARY_DIR}/Base/include)
INCLUDE_DIRECTORIES(${FasTC_SOURCE_DIR}/DXTEncoder/include)
INCLUDE_DIRECTORIES(${FasTC_BINARY_DIR}/DXTEncoder/include)
diff --git a/ETCEncoder/CMakeLists.txt b/ETCEncoder/CMakeLists.txt
index a05bd4b..f23bc82 100644
--- a/ETCEncoder/CMakeLists.txt
+++ b/ETCEncoder/CMakeLists.txt
@@ -41,6 +41,7 @@
#
INCLUDE_DIRECTORIES(${FasTC_SOURCE_DIR}/Base/include)
+INCLUDE_DIRECTORIES(${FasTC_BINARY_DIR}/Base/include)
INCLUDE_DIRECTORIES(${FasTC_SOURCE_DIR}/ETCEncoder/include)
INCLUDE_DIRECTORIES(${FasTC_BINARY_DIR}/ETCEncoder/include)
diff --git a/IO/CMakeLists.txt b/IO/CMakeLists.txt
index dc90d3c..272e624 100644
--- a/IO/CMakeLists.txt
+++ b/IO/CMakeLists.txt
@@ -40,6 +40,12 @@
#
#
+INCLUDE_DIRECTORIES( ${FasTC_SOURCE_DIR}/Base/include )
+INCLUDE_DIRECTORIES( ${FasTC_BINARY_DIR}/Base/include)
+
+INCLUDE_DIRECTORIES( ${FasTC_BINARY_DIR}/IO/include )
+INCLUDE_DIRECTORIES( ${FasTC_SOURCE_DIR}/IO/include )
+
SET( SOURCES
"src/ImageWriter.cpp"
"src/ImageLoader.cpp"
@@ -108,9 +114,6 @@ CONFIGURE_FILE(
"include/ImageWriter.h"
)
-INCLUDE_DIRECTORIES( ${FasTC_BINARY_DIR}/IO/include )
-INCLUDE_DIRECTORIES( ${FasTC_SOURCE_DIR}/IO/include )
-INCLUDE_DIRECTORIES( ${FasTC_SOURCE_DIR}/Base/include )
INCLUDE_DIRECTORIES( ${FasTC_SOURCE_DIR}/Core/include )
ADD_LIBRARY(FasTCIO
diff --git a/PVRTCEncoder/CMakeLists.txt b/PVRTCEncoder/CMakeLists.txt
index 2f8845b..555c1dd 100644
--- a/PVRTCEncoder/CMakeLists.txt
+++ b/PVRTCEncoder/CMakeLists.txt
@@ -53,6 +53,7 @@ INCLUDE_DIRECTORIES(${FasTC_SOURCE_DIR}/PVRTCEncoder/include)
INCLUDE_DIRECTORIES(${FasTC_BINARY_DIR}/PVRTCEncoder/include)
INCLUDE_DIRECTORIES(${FasTC_SOURCE_DIR}/Base/include)
+INCLUDE_DIRECTORIES(${FasTC_BINARY_DIR}/Base/include)
SET( HEADERS
include/PVRTCCompressor.h
diff --git a/PVRTCEncoder/test/CMakeLists.txt b/PVRTCEncoder/test/CMakeLists.txt
index 57de2e6..a399ee8 100644
--- a/PVRTCEncoder/test/CMakeLists.txt
+++ b/PVRTCEncoder/test/CMakeLists.txt
@@ -53,7 +53,9 @@ INCLUDE_DIRECTORIES(${FasTC_SOURCE_DIR}/PVRTCEncoder/include)
INCLUDE_DIRECTORIES(${FasTC_BINARY_DIR}/PVRTCEncoder/include)
INCLUDE_DIRECTORIES(${FasTC_SOURCE_DIR}/PVRTCEncoder/src)
-INCLUDE_DIRECTORIES(${FasTC_SOURCE_DIR}/Base/include)
+INCLUDE_DIRECTORIES(${FasTC_SOURCE_DIR}/Base/include )
+INCLUDE_DIRECTORIES(${FasTC_BINARY_DIR}/Base/include )
+
INCLUDE_DIRECTORIES(${FasTC_SOURCE_DIR}/GTest/include)
SET(TESTS