Compilation fixes for QNX platform
authorAbhinav Shukla <abhinavs@nvidia.com>
Fri, 7 Jul 2017 11:31:22 +0000 (17:01 +0530)
committerAbhinav Shukla <abhinavs@nvidia.com>
Fri, 14 Jul 2017 12:56:32 +0000 (18:26 +0530)
Modifies some CMakeLists.txt to add QNX specific checks
using the 'DE_OS_QNX' or 'DE_OS_IS_QNX' compilation flags.

Doesn't change functionality for any other platform.

VK-GL-CTS issue: 537

Components: Framework

Change-Id: I34d4091f2b0f064f22abc4996abb4bed94e4a83f

external/libpng/CMakeLists.txt
external/zlib/CMakeLists.txt
framework/delibs/debase/CMakeLists.txt
framework/delibs/depool/CMakeLists.txt
framework/delibs/dethread/unix/deThreadUnix.c
framework/delibs/deutil/CMakeLists.txt
framework/qphelper/CMakeLists.txt

index 0cbed64..7181ba4 100644 (file)
@@ -53,7 +53,7 @@ if (DE_DEBUG EQUAL 1)
        add_definitions(-DPNG_DEBUG)
 endif ()
 
-if (DE_OS_IS_UNIX)
+if (DE_OS_IS_UNIX OR DE_OS_IS_QNX)
        # for snprintf()
        add_definitions(-D_XOPEN_SOURCE=600)
 endif ()
index f59e023..40ca18d 100644 (file)
@@ -60,7 +60,7 @@ elseif (DE_COMPILER_IS_GCC OR DE_COMPILER_IS_CLANG)
 
 endif ()
 
-if (DE_OS_IS_UNIX)
+if (DE_OS_IS_UNIX OR DE_OS_IS_QNX)
        add_definitions(-D_XOPEN_SOURCE=600)
 endif ()
 
index 636d73e..800507e 100644 (file)
@@ -29,7 +29,7 @@ set(DEBASE_SRCS
 add_library(debase STATIC ${DEBASE_SRCS})
 
 # link debase to libm on unix systems
-if (DE_OS_IS_UNIX)
+if (DE_OS_IS_UNIX OR DE_OS_IS_QNX)
        target_link_libraries(debase m)
 
        add_definitions(-D_XOPEN_SOURCE=600)
index 3a10ec2..1270d45 100644 (file)
@@ -27,7 +27,7 @@ set(DEPOOL_SRCS
        dePoolTest.h
        )
 
-if (DE_OS_IS_UNIX)
+if (DE_OS_IS_UNIX OR DE_OS_IS_QNX)
        # vsnprintf
        add_definitions(-D_XOPEN_SOURCE=600)
 endif ()
index 2e10168..2837291 100644 (file)
@@ -35,7 +35,9 @@
 #include <unistd.h>
 #include <pthread.h>
 #include <sched.h>
-#include <sys/syscall.h>
+#if (DE_OS == DE_OS_UNIX) || (DE_OS == DE_OS_ANDROID)
+#      include <sys/syscall.h>
+#endif
 
 #if (DE_OS == DE_OS_OSX) || (DE_OS == DE_OS_IOS)
 #      if !defined(_SC_NPROCESSORS_CONF)
index c98a1da..cee5409 100644 (file)
@@ -41,7 +41,7 @@ if (DE_OS_IS_WIN32)
        set(DEUTIL_LIBS WS2_32)
 endif ()
 
-if (DE_OS_IS_UNIX)
+if (DE_OS_IS_UNIX OR DE_OS_IS_QNX)
        add_definitions(-D_XOPEN_SOURCE=600)
 endif ()
 
index 46b6a9f..e803cb9 100644 (file)
@@ -25,7 +25,7 @@ set(QPHELPER_LIBS
        ${PNG_LIBRARY}
        )
 
-if (DE_OS_IS_UNIX)
+if (DE_OS_IS_UNIX OR DE_OS_IS_QNX)
        # For vsnprintf()
        add_definitions(-D_XOPEN_SOURCE=600)
 endif ()