summaryrefslogtreecommitdiffstats
path: root/External
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2017-12-17 03:11:56 +0000
committerEgor Yusov <egor.yusov@gmail.com>2017-12-17 03:11:56 +0000
commita03619d03a9ca6605c8ea1d3638c2b10c954edf9 (patch)
tree263fd232223acac0326ea145263bfc241881229f /External
parentCmake: downgraded minimum required version to 3.6 to allow Android build (diff)
downloadDiligentTools-a03619d03a9ca6605c8ea1d3638c2b10c954edf9.tar.gz
DiligentTools-a03619d03a9ca6605c8ea1d3638c2b10c954edf9.zip
Fixed Android warnings
Diffstat (limited to 'External')
-rw-r--r--External/libtiff-4.0.3/CMakeLists.txt1
-rw-r--r--External/libtiff-4.0.3/libtiff/tif_config.android.h3
-rw-r--r--External/libtiff-4.0.3/libtiff/tif_config.h4
-rw-r--r--External/lua-5.2.3/CMakeLists.txt11
-rw-r--r--External/zlib-1.2.8/CMakeLists.txt12
5 files changed, 30 insertions, 1 deletions
diff --git a/External/libtiff-4.0.3/CMakeLists.txt b/External/libtiff-4.0.3/CMakeLists.txt
index e87c274..0a76ad3 100644
--- a/External/libtiff-4.0.3/CMakeLists.txt
+++ b/External/libtiff-4.0.3/CMakeLists.txt
@@ -89,7 +89,6 @@ if(MSVC)
endif()
endif(MSVC)
-
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 a406470..e3826ad 100644
--- a/External/libtiff-4.0.3/libtiff/tif_config.android.h
+++ b/External/libtiff-4.0.3/libtiff/tif_config.android.h
@@ -23,6 +23,9 @@
/* 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
diff --git a/External/libtiff-4.0.3/libtiff/tif_config.h b/External/libtiff-4.0.3/libtiff/tif_config.h
index 8d039a1..6ed7d7f 100644
--- a/External/libtiff-4.0.3/libtiff/tif_config.h
+++ b/External/libtiff-4.0.3/libtiff/tif_config.h
@@ -6,4 +6,8 @@
# include "tif_config.android.h"
+#else
+
+# error "Unknown platform"
+
#endif \ No newline at end of file
diff --git a/External/lua-5.2.3/CMakeLists.txt b/External/lua-5.2.3/CMakeLists.txt
index 78d2615..383bae8 100644
--- a/External/lua-5.2.3/CMakeLists.txt
+++ b/External/lua-5.2.3/CMakeLists.txt
@@ -86,6 +86,17 @@ if(MSVC)
target_compile_options(Lua PRIVATE /W3 /wd4244 /wd4334 /wd4702)
endif(MSVC)
+if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR
+ CMAKE_CXX_COMPILER_ID STREQUAL "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]
+ target_compile_options(Lua PRIVATE -x c++)
+
+ # For loslib.c, disable the following
+ # warning: 'tmpnam' is deprecated: tempnam is unsafe, use mkstemp or tmpfile instead [-Wdeprecated-declarations]
+ set_source_files_properties(src/loslib.c PROPERTIES COMPILE_FLAGS -Wno-deprecated-declarations)
+endif()
source_group("src" FILES ${SOURCE})
source_group("include" FILES ${INCLUDE})
diff --git a/External/zlib-1.2.8/CMakeLists.txt b/External/zlib-1.2.8/CMakeLists.txt
index 7803bde..b6dc7a6 100644
--- a/External/zlib-1.2.8/CMakeLists.txt
+++ b/External/zlib-1.2.8/CMakeLists.txt
@@ -44,6 +44,18 @@ if(MSVC)
target_compile_options(ZLib PRIVATE /W3 /wd4131 /wd4127 /wd4244 /wd4996)
endif()
+if(PLATFORM_ANDROID)
+ target_compile_definitions(ZLib PRIVATE HAVE_UNISTD_H)
+endif()
+
+if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR
+ CMAKE_CXX_COMPILER_ID STREQUAL "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)
+endif()
+
+
target_include_directories(ZLib PUBLIC .)
source_group("src" FILES ${SOURCE})