1 add_definitions(-DSOURCE_DIR="${piglit_SOURCE_DIR}/")
3 if(PIGLIT_HAS_POSIX_CLOCK_MONOTONIC AND HAVE_LIBRT)
7 # CMake requires that source file properties be set in the same directory where
8 # the property is used.
9 set_source_files_properties(
10 ${piglit_dispatch_gen_outputs}
11 PROPERTIES GENERATED 1
14 link_libraries(${CMAKE_DL_LIBS})
21 link_libraries(${XKBCOMMON_LIBRARIES})
22 include_directories(${XKBCOMMON_INCLUDE_DIRS})
26 link_libraries(${PNG_LIBRARIES})
27 include_directories(${PNG_INCLUDE_DIRS})
31 ${CMAKE_CURRENT_BINARY_DIR}
32 ${CMAKE_CURRENT_SOURCE_DIR}
44 ${OPENGL_INCLUDE_PATH}
45 ${Waffle_INCLUDE_DIRS}
52 piglit-dispatch-init.c
55 piglit-test-pattern.cpp
60 piglit-framework-gl/piglit_gl_framework.c
66 sized-internalformats.c
67 ${CMAKE_BINARY_DIR}/tests/util/piglit-util-gl-enum-gen.c
75 list(APPEND UTIL_GL_SOURCES
76 piglit-framework-gl/piglit_fbo_framework.c
77 piglit-framework-gl/piglit_wfl_framework.c
78 piglit-framework-gl/piglit_winsys_framework.c
79 piglit-framework-gl/piglit_sl_framework.c
84 list(APPEND UTIL_GL_SOURCES
85 piglit-framework-gl/piglit_wgl_framework.c
89 list(APPEND UTIL_GL_SOURCES
90 piglit-framework-gl/piglit_gbm_framework.c
92 list(APPEND UTIL_GL_LIBS
96 if(PIGLIT_HAS_WAYLAND)
97 list(APPEND UTIL_GL_SOURCES
98 piglit-framework-gl/piglit_wl_framework.c
100 list(APPEND UTIL_GL_INCLUDES
101 ${WAYLAND_wayland-client_INCLUDEDIR}
105 list(APPEND UTIL_GL_SOURCES
106 piglit-framework-gl/piglit_x11_framework.c
110 list(APPEND UTIL_GL_LIBS
113 IF(PIGLIT_BUILD_GLX_TESTS)
114 list(APPEND UTIL_GL_LIBS
117 ENDIF(PIGLIT_BUILD_GLX_TESTS)
119 list(APPEND UTIL_GL_SOURCES
120 piglit-framework-gl/piglit_glut_framework.c
123 list(APPEND UTIL_GL_LIBS
128 if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
129 # One needs to have at least one hardware driver present, otherwise
130 # there is no point compiling just the dispatcher.
131 if(PIGLIT_BUILD_DMA_BUF_TESTS)
132 add_definitions(-DHAVE_LIBDRM)
134 list(APPEND UTIL_GL_SOURCES
135 piglit-framework-gl/piglit_drm_dma_buf.c
138 list(APPEND UTIL_GL_LIBS
144 list(APPEND UTIL_GL_INCLUDES
145 ${LIBDRM_INCLUDE_DIRS}
147 ${XCB_DRI2_INCLUDE_DIRS}
152 list(APPEND UTIL_GL_LIBS ${X11_X11_LIB})
155 if(PIGLIT_HAS_WAYLAND)
156 list(APPEND UTIL_GL_LIBS ${WAYLAND_LDFLAGS})
159 endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
162 list(APPEND UTIL_SOURCES msvc/getopt.c)
165 piglit_include_target_api()