summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2017-12-20 01:54:14 +0000
committerEgor Yusov <egor.yusov@gmail.com>2017-12-20 01:54:14 +0000
commitd948508aa22ff273c915397f5aba365ac10bd4e4 (patch)
treedf290fe8e06965c4a29892c727518cb9f2cf3a40
parentRemoved jni/Visual GDB build from legacy projects (diff)
downloadDiligentTools-d948508aa22ff273c915397f5aba365ac10bd4e4.tar.gz
DiligentTools-d948508aa22ff273c915397f5aba365ac10bd4e4.zip
Enabling linux build
-rw-r--r--External/libtiff-4.0.3/CMakeLists.txt16
-rw-r--r--External/libtiff-4.0.3/libtiff/tif_config.android.h4
-rw-r--r--External/libtiff-4.0.3/libtiff/tif_config.h4
-rw-r--r--External/libtiff-4.0.3/libtiff/tif_config.linux.h71
-rw-r--r--External/libtiff-4.0.3/libtiff/tiffconf.h8
-rw-r--r--External/libtiff-4.0.3/libtiff/tiffconf.linux.h (renamed from External/libtiff-4.0.3/libtiff/tiffconf.android.h)0
-rw-r--r--External/lua-5.2.3/CMakeLists.txt2
-rw-r--r--External/zlib-1.2.8/CMakeLists.txt2
-rw-r--r--RenderScript/CMakeLists.txt3
9 files changed, 100 insertions, 10 deletions
diff --git a/External/libtiff-4.0.3/CMakeLists.txt b/External/libtiff-4.0.3/CMakeLists.txt
index 0a76ad3..ff3b031 100644
--- a/External/libtiff-4.0.3/CMakeLists.txt
+++ b/External/libtiff-4.0.3/CMakeLists.txt
@@ -47,7 +47,7 @@ set(SOURCE
if(PLATFORM_WIN32)
list(APPEND SOURCE libtiff/tif_win32.c)
-elseif(PLATFORM_ANDROID OR PLATFORM_UNIVERSAL_WINDOWS)
+elseif(PLATFORM_ANDROID OR PLATFORM_UNIVERSAL_WINDOWS OR PLATFORM_LINUX)
list(APPEND SOURCE libtiff/tif_unix.c)
else()
message(FATAL_ERROR "Unknown platform")
@@ -64,7 +64,7 @@ set(INCLUDE
libtiff/tif_fax3.h
libtiff/tif_predict.h
libtiff/tiff.h
- libtiff/tiffconf.android.h
+ libtiff/tiffconf.linux.h
libtiff/tiffconf.h
libtiff/tiffconf.vc.h
libtiff/tiffconf.wince.h
@@ -89,6 +89,18 @@ if(MSVC)
endif()
endif(MSVC)
+if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+ # Suppress the following warnings in tif_unix.c
+ # cast from pointer to integer of different size [-Wpointer-to-int-cast]
+ # and
+ # cast to pointer from integer of different size [-Wint-to-pointer-cast]
+ set_source_files_properties(
+ libtiff/tif_unix.c
+ PROPERTIES
+ COMPILE_FLAGS "-Wno-pointer-to-int-cast -Wno-int-to-pointer-cast"
+ )
+endif()
+
target_link_libraries(LibTiff PRIVATE BuildSettings)
target_include_directories(LibTiff
diff --git a/External/libtiff-4.0.3/libtiff/tif_config.android.h b/External/libtiff-4.0.3/libtiff/tif_config.android.h
index e3826ad..517c3bf 100644
--- a/External/libtiff-4.0.3/libtiff/tif_config.android.h
+++ b/External/libtiff-4.0.3/libtiff/tif_config.android.h
@@ -21,7 +21,7 @@
//#define HAVE_IO_H 1
/* Define to 1 if you have the <search.h> header file. */
-//#define HAVE_SEARCH_H 1
+#define HAVE_SEARCH_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
@@ -50,7 +50,6 @@
/* Set the native cpu bit order */
#define HOST_FILLORDER FILLORDER_LSB2MSB
-#define snprintf _snprintf
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
@@ -64,7 +63,6 @@
# endif
#endif
-#define lfind _lfind
/*
* Local Variables:
* mode: c
diff --git a/External/libtiff-4.0.3/libtiff/tif_config.h b/External/libtiff-4.0.3/libtiff/tif_config.h
index 6ed7d7f..45df73e 100644
--- a/External/libtiff-4.0.3/libtiff/tif_config.h
+++ b/External/libtiff-4.0.3/libtiff/tif_config.h
@@ -6,6 +6,10 @@
# include "tif_config.android.h"
+#elif defined(PLATFORM_LINUX)
+
+# include "tif_config.linux.h"
+
#else
# error "Unknown platform"
diff --git a/External/libtiff-4.0.3/libtiff/tif_config.linux.h b/External/libtiff-4.0.3/libtiff/tif_config.linux.h
new file mode 100644
index 0000000..536d1b6
--- /dev/null
+++ b/External/libtiff-4.0.3/libtiff/tif_config.linux.h
@@ -0,0 +1,71 @@
+/* Define to 1 if you have the <assert.h> header file. */
+#define HAVE_ASSERT_H 1
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define as 0 or 1 according to the floating point format suported by the
+ machine */
+#define HAVE_IEEEFP 1
+
+/* Define to 1 if you have the `jbg_newlen' function. */
+#define HAVE_JBG_NEWLEN 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <io.h> header file. */
+//#define HAVE_IO_H 1
+
+/* Define to 1 if you have the <search.h> header file. */
+#define HAVE_SEARCH_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the `setmode' function. */
+#define HAVE_SETMODE 1
+
+/* The size of a `int', as computed by sizeof. */
+#define SIZEOF_INT 4
+
+/* The size of a `long', as computed by sizeof. */
+#define SIZEOF_LONG 4
+
+/* Signed 64-bit type formatter */
+#define TIFF_INT64_FORMAT "%lld"
+
+/* Signed 64-bit type */
+#define TIFF_INT64_T signed long long
+
+/* Unsigned 64-bit type formatter */
+#define TIFF_UINT64_FORMAT "%llu"
+
+/* Unsigned 64-bit type */
+#define TIFF_UINT64_T unsigned long long
+
+/* Set the native cpu bit order */
+#define HOST_FILLORDER FILLORDER_LSB2MSB
+
+/* Define to 1 if your processor stores words with the most significant byte
+ first (like Motorola and SPARC, unlike Intel and VAX). */
+/* #undef WORDS_BIGENDIAN */
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
+# ifndef inline
+# define inline __inline
+# endif
+#endif
+
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 8
+ * fill-column: 78
+ * End:
+ */
diff --git a/External/libtiff-4.0.3/libtiff/tiffconf.h b/External/libtiff-4.0.3/libtiff/tiffconf.h
index cd026b2..8806afc 100644
--- a/External/libtiff-4.0.3/libtiff/tiffconf.h
+++ b/External/libtiff-4.0.3/libtiff/tiffconf.h
@@ -2,8 +2,12 @@
# include "tiffconf.vc.h"
-#elif defined(PLATFORM_ANDROID)
+#elif defined(PLATFORM_ANDROID) || defined(PLATFORM_LINUX)
-# include "tiffconf.android.h"
+# include "tiffconf.linux.h"
+
+#else
+
+# error Unsupported platform
#endif \ No newline at end of file
diff --git a/External/libtiff-4.0.3/libtiff/tiffconf.android.h b/External/libtiff-4.0.3/libtiff/tiffconf.linux.h
index f01b835..f01b835 100644
--- a/External/libtiff-4.0.3/libtiff/tiffconf.android.h
+++ b/External/libtiff-4.0.3/libtiff/tiffconf.linux.h
diff --git a/External/lua-5.2.3/CMakeLists.txt b/External/lua-5.2.3/CMakeLists.txt
index 383bae8..6e4ee5c 100644
--- a/External/lua-5.2.3/CMakeLists.txt
+++ b/External/lua-5.2.3/CMakeLists.txt
@@ -87,7 +87,7 @@ if(MSVC)
endif(MSVC)
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR
- CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ CMAKE_CXX_COMPILER_ID MATCHES "GNU")
# Setting LANGUAGE to CXX is not enough for clang, so use -x c++ to compile c files as c++ and suppress
# the following warning:
# clang++.exe: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
diff --git a/External/zlib-1.2.8/CMakeLists.txt b/External/zlib-1.2.8/CMakeLists.txt
index b6dc7a6..a7ad493 100644
--- a/External/zlib-1.2.8/CMakeLists.txt
+++ b/External/zlib-1.2.8/CMakeLists.txt
@@ -49,7 +49,7 @@ if(PLATFORM_ANDROID)
endif()
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR
- CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ CMAKE_CXX_COMPILER_ID MATCHES "GNU")
# For inflate.c, disable the following
# warning: shifting a negative signed value is undefined [-Wshift-negative-value]
set_source_files_properties(inflate.c PROPERTIES COMPILE_FLAGS -Wno-shift-negative-value)
diff --git a/RenderScript/CMakeLists.txt b/RenderScript/CMakeLists.txt
index aef4334..0521027 100644
--- a/RenderScript/CMakeLists.txt
+++ b/RenderScript/CMakeLists.txt
@@ -71,7 +71,8 @@ PUBLIC
include
)
-if(PLATFORM_ANDROID)
+if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR
+ CMAKE_CXX_COMPILER_ID MATCHES "GNU")
# Suppress warnings from applying the ‘offsetof’ macro to a non-POD type
# warning: offset of on non-standard-layout type [-Winvalid-offsetof]
# This is OK because the warning is generated for simple structs (such as TextureDesc)