Merge "Check only what's needed and use threshold"
[platform/upstream/VK-GL-CTS.git] / external / openglcts / modules / CMakeLists.txt
1 # GL-CTS
2
3 include_directories(
4         common
5         gl
6         gles2
7         gles3
8         gles31
9         gles32
10         glesext
11         .
12         )
13
14 if (DEQP_GTF_AVAILABLE)
15         include_directories(${GTF_HOME}/glcts-gtf)
16 endif ()
17
18 add_subdirectory(common)
19 add_subdirectory(gl)
20 add_subdirectory(gles2)
21 add_subdirectory(gles3)
22 add_subdirectory(gles31)
23 add_subdirectory(gles32)
24 add_subdirectory(glesext)
25
26 if (DEQP_GTF_AVAILABLE)
27         set(GTF_DIR ${GTF_HOME})
28         add_subdirectory(${GTF_HOME}/glcts-gtf gtf)
29 endif ()
30
31 # glcTestPackageRegistry.cpp includes dEQP modules directly
32 include_directories(
33         ${PROJECT_SOURCE_DIR}/modules/egl
34         ${PROJECT_SOURCE_DIR}/modules/gles2
35         ${PROJECT_SOURCE_DIR}/modules/gles3
36         ${PROJECT_SOURCE_DIR}/modules/gles31
37         )
38
39 set(GLCTS_SRCS
40         glcTestPackageRegistry.cpp
41         )
42
43 set(GLCTS_LIBS
44         glcts-common-nocontext-package
45         glcts-gl
46         glcts-es2
47         glcts-es3
48         glcts-es31
49         glcts-es32
50         glcts-esext
51         deqp-egl${MODULE_LIB_TARGET_POSTFIX}
52         deqp-gles2${MODULE_LIB_TARGET_POSTFIX}
53         deqp-gles3${MODULE_LIB_TARGET_POSTFIX}
54         deqp-gles31${MODULE_LIB_TARGET_POSTFIX}
55         )
56
57 # \note This module contains multiple packages (ES2-CTS, ES3-CTS, ..)
58 add_deqp_module(glcts "${GLCTS_SRCS}" "${GLCTS_LIBS}" glcTestPackageEntry.cpp)
59
60 # Data directories
61 add_data_dir(glcts ../data gl_cts/data)
62 add_data_dir(glcts ../../../data/gles2 gles2)
63 add_data_dir(glcts ../../../data/gles3 gles3)
64 add_data_dir(glcts ../../../data/gles31 gles31)
65
66 # CTS Test Runner
67 add_subdirectory(runner)
68 include_directories(runner)
69
70 if (DE_OS_IS_WIN32 OR DE_OS_IS_OSX OR DE_OS_IS_UNIX OR DE_OS_IS_IOS OR DE_OS_IS_QNX)
71         # Stand-alone cts-runner executable
72         add_executable(cts-runner runner/glcTestRunnerMain.cpp glcTestPackageEntry.cpp)
73         target_link_libraries(cts-runner tcutil-platform glcts-runner glcts${MODULE_LIB_TARGET_POSTFIX})
74
75 elseif (DE_OS_IS_ANDROID)
76
77         # glcAndroidMain.cpp contains additional entry points for
78         # different CTS versions. We need to add it to DEQP_MODULE_ENTRY_POINTS
79         # in order to include them in final libdeqp.so.
80         set(DEQP_MODULE_ENTRY_POINTS    ${DEQP_MODULE_ENTRY_POINTS} ${CMAKE_CURRENT_SOURCE_DIR}/runner/glcAndroidMain.cpp PARENT_SCOPE)
81         set(DEQP_MODULE_LIBRARIES               ${DEQP_MODULE_LIBRARIES} glcts-runner PARENT_SCOPE)
82 endif ()