1 # Platform port library
3 # Target file may define TCUTIL_PLATFORM_SRCS
4 if (NOT DEFINED TCUTIL_PLATFORM_SRCS)
6 set(TCUTIL_PLATFORM_SRCS
7 win32/tcuWin32Platform.hpp
8 win32/tcuWin32Platform.cpp
9 win32/tcuWGLContextFactory.hpp
10 win32/tcuWGLContextFactory.cpp
14 win32/tcuWin32Window.cpp
15 win32/tcuWin32Window.hpp
16 win32/tcuWin32EGLNativeDisplayFactory.hpp
17 win32/tcuWin32EGLNativeDisplayFactory.cpp
18 win32/tcuWin32VulkanPlatform.hpp
19 win32/tcuWin32VulkanPlatform.cpp
22 elseif ((DE_OS_IS_UNIX OR DE_OS_IS_OSX) AND DEQP_USE_X11)
23 message(STATUS "DEQP_SUPPORT_GLX = ${DEQP_SUPPORT_GLX}")
25 add_definitions(-DDEQP_SUPPORT_GLX=1)
28 set(TCUTIL_PLATFORM_SRCS
31 X11/tcuX11EglPlatform.hpp
32 X11/tcuX11EglPlatform.cpp
33 X11/tcuX11Platform.hpp
34 X11/tcuX11Platform.cpp
35 X11/tcuX11VulkanPlatform.hpp
36 X11/tcuX11VulkanPlatform.cpp
39 set(TCUTIL_PLATFORM_SRCS
40 ${TCUTIL_PLATFORM_SRCS}
46 set(TCUTIL_PLATFORM_SRCS
47 ${TCUTIL_PLATFORM_SRCS}
48 X11/tcuX11GlxPlatform.hpp
49 X11/tcuX11GlxPlatform.cpp
52 elseif (DE_OS_IS_ANDROID)
53 set(TCUTIL_PLATFORM_SRCS
54 android/tcuAndroidExecService.cpp
55 android/tcuAndroidExecService.hpp
58 if (DE_ANDROID_API GREATER 8)
59 # Add NativeActivity code
60 set(TCUTIL_PLATFORM_SRCS
61 ${TCUTIL_PLATFORM_SRCS}
62 android/tcuAndroidAssets.cpp
63 android/tcuAndroidAssets.hpp
64 android/tcuAndroidInternals.cpp
65 android/tcuAndroidInternals.hpp
66 android/tcuAndroidNativeActivity.cpp
67 android/tcuAndroidNativeActivity.hpp
68 android/tcuAndroidPlatform.cpp
69 android/tcuAndroidPlatform.hpp
70 android/tcuAndroidRenderActivity.cpp
71 android/tcuAndroidRenderActivity.hpp
72 android/tcuAndroidTestActivity.cpp
73 android/tcuAndroidTestActivity.hpp
74 android/tcuAndroidUtil.cpp
75 android/tcuAndroidUtil.hpp
76 android/tcuAndroidWindow.cpp
77 android/tcuAndroidWindow.hpp
82 set(TCUTIL_PLATFORM_SRCS
90 set(TCUTIL_PLATFORM_SRCS
91 osx/tcuOSXPlatform.cpp
92 osx/tcuOSXPlatform.hpp
96 set(TCUTIL_PLATFORM_SRCS
97 vanilla/tcuVanillaPlatform.cpp
103 add_library(tcutil-platform STATIC ${TCUTIL_PLATFORM_SRCS})
105 # Add vkutil to the deps before tcutil so that it picks up the c++11 dependencies
106 target_link_libraries(tcutil-platform vkutil)
108 target_link_libraries(tcutil-platform tcutil ${TCUTIL_PLATFORM_LIBS})
110 # Always link to glutil as some platforms such as Win32 always support GL
111 target_link_libraries(tcutil-platform glutil)
113 # Always link to eglutil
114 target_link_libraries(tcutil-platform eglutil)
118 find_package(X11 REQUIRED)
119 target_link_libraries(tcutil-platform ${X11_LIBRARIES})
121 find_package(XCB REQUIRED)
122 target_link_libraries(tcutil-platform ${XCB_LIBRARIES})
123 add_definitions(-DDEQP_SUPPORT_XCB=1)
125 if (DEQP_SUPPORT_GLX)
126 # GLX functions don't currently have wrappers, so link directly to libGL.
127 target_link_libraries(tcutil-platform GL)