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 set(TCUTIL_PLATFORM_SRCS
26 X11/tcuX11Platform.hpp
27 X11/tcuX11Platform.cpp
30 set(TCUTIL_PLATFORM_SRCS
31 ${TCUTIL_PLATFORM_SRCS}
32 X11/tcuX11EglPlatform.hpp
33 X11/tcuX11EglPlatform.cpp
37 set(TCUTIL_PLATFORM_SRCS
38 ${TCUTIL_PLATFORM_SRCS}
39 X11/tcuX11GlxPlatform.hpp
40 X11/tcuX11GlxPlatform.cpp
43 if (NOT (DEQP_SUPPORT_EGL OR DEQP_SUPPORT_GLX))
44 message(FATAL_ERROR "At least one of EGL and GLX must be enabled for X11")
46 elseif (DE_OS_IS_ANDROID)
47 set(TCUTIL_PLATFORM_SRCS
48 android/tcuAndroidExecService.cpp
49 android/tcuAndroidExecService.hpp
52 if (DE_ANDROID_API GREATER 8)
53 # Add NativeActivity code
54 set(TCUTIL_PLATFORM_SRCS
55 ${TCUTIL_PLATFORM_SRCS}
56 android/tcuAndroidAssets.cpp
57 android/tcuAndroidAssets.hpp
58 android/tcuAndroidInternals.cpp
59 android/tcuAndroidInternals.hpp
60 android/tcuAndroidNativeActivity.cpp
61 android/tcuAndroidNativeActivity.hpp
62 android/tcuAndroidPlatform.cpp
63 android/tcuAndroidPlatform.hpp
64 android/tcuAndroidRenderActivity.cpp
65 android/tcuAndroidRenderActivity.hpp
66 android/tcuAndroidTestActivity.cpp
67 android/tcuAndroidTestActivity.hpp
68 android/tcuAndroidUtil.cpp
69 android/tcuAndroidUtil.hpp
70 android/tcuAndroidWindow.cpp
71 android/tcuAndroidWindow.hpp
76 set(TCUTIL_PLATFORM_SRCS
84 set(TCUTIL_PLATFORM_SRCS
85 osx/tcuOSXPlatform.cpp
86 osx/tcuOSXPlatform.hpp
90 set(TCUTIL_PLATFORM_SRCS
91 vanilla/tcuVanillaPlatform.cpp
97 add_library(tcutil-platform STATIC ${TCUTIL_PLATFORM_SRCS})
99 # Add vkutil to the deps before tcutil so that it picks up the c++11 dependencies
100 target_link_libraries(tcutil-platform vkutil)
102 target_link_libraries(tcutil-platform tcutil ${TCUTIL_PLATFORM_LIBS})
104 # Always link to glutil as some platforms such as Win32 always support GL
105 target_link_libraries(tcutil-platform glutil)
107 # Always link to eglutil
108 target_link_libraries(tcutil-platform eglutil)
112 find_package(X11 REQUIRED)
113 target_link_libraries(tcutil-platform ${X11_LIBRARIES})
114 if (DEQP_SUPPORT_GLX)
115 # GLX functions don't currently have wrappers, so link directly to libGL.
116 target_link_libraries(tcutil-platform GL)