blob: b21ce3c319c08ef34e400d43e1a45d635603cc01 [file] [log] [blame]
Courtney Goeltzenleuchtere06e72d2014-08-01 12:44:23 -06001# Create the i965 XGL DRI library
Cody Northrop0eb5eea2014-09-19 15:11:52 -06002
3# Mesa required defines
Cody Northrope8455b12014-09-17 16:18:12 -06004add_definitions(-D_GNU_SOURCE -DHAVE_PTHREAD)
Cody Northrop0eb5eea2014-09-19 15:11:52 -06005# LLVM required defines
6add_definitions(-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS)
Cody Northrope8455b12014-09-17 16:18:12 -06007
Cody Northrop065538b2014-12-05 14:20:04 -07008# DEBUG and NDEBUG flags are important for proper mesa behavior
9set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG")
10set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DNDEBUG")
11set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
12set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG")
13
Cody Northrope8455b12014-09-17 16:18:12 -060014# LunarG TODO: Get the llvm-config flags hooked up correctly and remove extra definitions from above
15
Steve K14e09812014-09-19 09:45:36 -060016execute_process(COMMAND ${LUNARGLASS_PREFIX}/Core/LLVM/llvm-3.4/build/install/usr/local/bin/llvm-config --libs engine bitwriter
17 OUTPUT_VARIABLE LLVM_LIBS_ALL_1
18 RESULT_VARIABLE LLVM_LIBS_RESULT)
19
Cody Northrop0eb5eea2014-09-19 15:11:52 -060020string(REPLACE "\n" "" LLVM_LIBS_ALL ${LLVM_LIBS_ALL_1})
21message(STATUS "llvm-config lib results")
22message(STATUS ${LLVM_LIBS_ALL})
23
Steve K66d40802014-09-19 09:59:26 -060024if(NOT "${LLVM_LIBS_RESULT}" EQUAL "0")
25 message(FATAL_ERROR "llvm-config failed: " ${LLVM_LIBS_RESULT})
Steve K14e09812014-09-19 09:45:36 -060026endif()
27
Courtney Goeltzenleuchter62b2e852014-10-03 15:34:53 -060028# Expect libraries to be in either the build (release build) or dbuild (debug) directories
29if(EXISTS ${GLSLANG_PREFIX}/build/install/lib)
30 set(GLSLANG_BUILD ${GLSLANG_PREFIX}/build)
31elseif(EXISTS ${GLSLANG_PREFIX}/dbuild/install/lib)
32 set(GLSLANG_BUILD ${GLSLANG_PREFIX}/dbuild)
33else()
34 message(FATAL_ERROR "Necessary glslang libraries cannot be found: " ${GLSLANG_PREFIX})
35endif()
36
37if(EXISTS ${LUNARGLASS_PREFIX}/build/install/lib)
38 set(LUNARGLASS_BUILD ${LUNARGLASS_PREFIX}/build)
39elseif(EXISTS ${LUNARGLASS_PREFIX}/dbuild/install/lib)
40 set(LUNARGLASS_BUILD ${LUNARGLASS_PREFIX}/dbuild)
41else()
42 message(FATAL_ERROR "Necessary LunarGLASS libraries cannot be found: " ${LUNARGLASS_PREFIX})
43endif()
Cody Northrope8455b12014-09-17 16:18:12 -060044
Cody Northrop0eb5eea2014-09-19 15:11:52 -060045execute_process(COMMAND ${LUNARGLASS_PREFIX}/Core/LLVM/llvm-3.4/build/install/usr/local/bin/llvm-config --cxxflags
46 OUTPUT_VARIABLE LLVM_CXX_CONFIG_ALL_1
Steve K66d40802014-09-19 09:59:26 -060047 RESULT_VARIABLE LLVM_CXX_CONFIG_RESULT)
48
Cody Northrop0eb5eea2014-09-19 15:11:52 -060049string(REPLACE "\n" "" LLVM_CXX_CONFIG_ALL ${LLVM_CXX_CONFIG_ALL_1})
50string(REPLACE "-Woverloaded-virtual" "" LLVM_CXX_CONFIG_1 ${LLVM_CXX_CONFIG_ALL})
51string(REPLACE "-fvisibility-inlines-hidden" "" LLVM_CXX_CONFIG ${LLVM_CXX_CONFIG_1})
52message(STATUS "llvm-config cxxflags results")
53message(STATUS ${LLVM_CXX_CONFIG})
54
Steve K66d40802014-09-19 09:59:26 -060055# if(NOT "${LLVM_CXX_CONFIG_RESULT}" EQUAL "0")
56# message(FATAL_ERROR "llvm-config failed: " ${LLVM_CXX_CONFIG_RESULT})
57# endif()
58
Steve K66d40802014-09-19 09:59:26 -060059
60set_target_properties(icd
61 PROPERTIES
62 COMPILE_FLAGS "${LLVM_CXX_CONFIG}")
63
Cody Northrope8455b12014-09-17 16:18:12 -060064SET(COMPILER_LINK_DIRS
Courtney Goeltzenleuchter62b2e852014-10-03 15:34:53 -060065 ${GLSLANG_BUILD}/install/lib
Cody Northrope8455b12014-09-17 16:18:12 -060066 ${LUNARGLASS_PREFIX}/Core/LLVM/llvm-3.4/build/install/usr/local/lib
Steve K42652ba2014-10-07 10:44:41 -060067 ${LUNARGLASS_PREFIX}/build/Core
68 ${LUNARGLASS_PREFIX}/build/Frontends/glslang
69 ${LUNARGLASS_PREFIX}/build/Frontends/Bil
70 ${LUNARGLASS_PREFIX}/build/Core/Passes/Transforms
71 ${LUNARGLASS_PREFIX}/build/Core/Passes/Immutable
72 ${LUNARGLASS_PREFIX}/build/Core/Passes/Analysis
73 ${LUNARGLASS_PREFIX}/build/Core/Passes/Util
Cody Northrope8455b12014-09-17 16:18:12 -060074)
Courtney Goeltzenleuchtere06e72d2014-08-01 12:44:23 -060075
Chia-I Wuddbc8e22014-09-18 17:05:09 +080076pkg_check_modules(DRM REQUIRED libdrm libdrm_intel)
77
Cody Northrope8455b12014-09-17 16:18:12 -060078link_directories (
79 ${ICD_LIBRARY_DIRS}
80 ${DRM_LIBRARY_DIRS}
81 ${COMPILER_LINK_DIRS}
Chia-I Wuddbc8e22014-09-18 17:05:09 +080082)
83
Cody Northrope8455b12014-09-17 16:18:12 -060084SET(COMPILER_LIBS
85 glslangFrontend
Steve K42652ba2014-10-07 10:44:41 -060086 BilFrontend
Cody Northrope8455b12014-09-17 16:18:12 -060087 core
88 LLVMipo
89 glslang
Steve K42652ba2014-10-07 10:44:41 -060090 BIL
Cody Northrope8455b12014-09-17 16:18:12 -060091 OGLCompiler
92 ${LLVM_LIBS_ALL}
Courtney Goeltzenleuchtere06e72d2014-08-01 12:44:23 -060093)
94
95link_libraries (
Chia-I Wucafc88a2015-01-04 00:31:33 +080096 icd
Cody Northrope8455b12014-09-17 16:18:12 -060097 ${ICD_LIBRARIES}
98 ${DRM_LIBRARIES}
99 ${COMPILER_LIBS}
100 m
Steve Kda224042014-09-19 08:46:17 -0600101 pthread
102 dl
Cody Northrope8455b12014-09-17 16:18:12 -0600103)
104
105SET(COMPILER_INCLUDE_DIRS
106 ${GLSLANG_PREFIX}
107 ${LUNARGLASS_PREFIX}/Core/LLVM/llvm-3.4/build/install/usr/local/include
108 ${LUNARGLASS_PREFIX}
Cody Northrop0eb5eea2014-09-19 15:11:52 -0600109 ${CMAKE_CURRENT_SOURCE_DIR}
Cody Northropbc851432014-09-23 10:06:32 -0600110 compiler/shader
Cody Northrope8455b12014-09-17 16:18:12 -0600111 compiler/mesa-utils/include
Cody Northropbc851432014-09-23 10:06:32 -0600112 compiler/mesa-utils/src
Cody Northrope8455b12014-09-17 16:18:12 -0600113 compiler/mesa-utils/src/glsl
114 compiler/mesa-utils/src/mesa
Cody Northropbc851432014-09-23 10:06:32 -0600115 compiler/mesa-utils/src/mesa/program
Cody Northrope8455b12014-09-17 16:18:12 -0600116 compiler/mesa-utils/src/mapi
117)
118
119include_directories (
120 ${ICD_INCLUDE_DIRS}
121 ${DRM_INCLUDE_DIRS}
122 ${COMPILER_INCLUDE_DIRS}
123)
124
125
126SET(COMPILER_SOURCES
127 compiler/shader/ast_array_index.cpp
128 compiler/shader/ast_expr.cpp
129 compiler/shader/ast_function.cpp
130 compiler/shader/ast_to_hir.cpp
131 compiler/shader/ast_type.cpp
132 compiler/shader/builtin_functions.cpp
133 compiler/shader/builtin_types.cpp
134 compiler/shader/builtin_variables.cpp
135 compiler/shader/ir.cpp
136 compiler/shader/ir_basic_block.cpp
137 compiler/shader/ir_builder.cpp
138 compiler/shader/ir_clone.cpp
139 compiler/shader/ir_constant_expression.cpp
140 compiler/shader/ir_deserializer.cpp
141 compiler/shader/ir_equals.cpp
142 compiler/shader/ir_expression_flattening.cpp
143 compiler/shader/ir_function_can_inline.cpp
144 compiler/shader/ir_function.cpp
145 compiler/shader/ir_function_detect_recursion.cpp
146 compiler/shader/ir_hierarchical_visitor.cpp
147 compiler/shader/ir_hv_accept.cpp
148 compiler/shader/ir_import_prototypes.cpp
149 compiler/shader/ir_print_visitor.cpp
150 compiler/shader/ir_reader.cpp
151 compiler/shader/ir_rvalue_visitor.cpp
152 compiler/shader/ir_serialize.cpp
153 compiler/shader/ir_set_program_inouts.cpp
154 compiler/shader/ir_validate.cpp
155 compiler/shader/ir_variable_refcount.cpp
156 compiler/shader/link_atomics.cpp
157 compiler/shader/linker.cpp
158 compiler/shader/link_functions.cpp
159 compiler/shader/link_interface_blocks.cpp
160 compiler/shader/link_uniform_block_active_visitor.cpp
161 compiler/shader/link_uniform_blocks.cpp
162 compiler/shader/link_uniform_initializers.cpp
163 compiler/shader/link_uniforms.cpp
164 compiler/shader/link_varyings.cpp
165 compiler/shader/loop_analysis.cpp
166 compiler/shader/loop_controls.cpp
167 compiler/shader/loop_unroll.cpp
168 compiler/shader/lower_clip_distance.cpp
169 compiler/shader/lower_discard.cpp
170 compiler/shader/lower_discard_flow.cpp
171 compiler/shader/lower_if_to_cond_assign.cpp
172 compiler/shader/lower_instructions.cpp
173 compiler/shader/lower_jumps.cpp
174 compiler/shader/lower_mat_op_to_vec.cpp
175 compiler/shader/lower_named_interface_blocks.cpp
176 compiler/shader/lower_noise.cpp
177 compiler/shader/lower_offset_array.cpp
178 compiler/shader/lower_output_reads.cpp
179 compiler/shader/lower_packed_varyings.cpp
180 compiler/shader/lower_packing_builtins.cpp
181 compiler/shader/lower_texture_projection.cpp
182 compiler/shader/lower_ubo_reference.cpp
183 compiler/shader/lower_variable_index_to_cond_assign.cpp
184 compiler/shader/lower_vec_index_to_cond_assign.cpp
185 compiler/shader/lower_vec_index_to_swizzle.cpp
186 compiler/shader/lower_vector.cpp
187 compiler/shader/lower_vector_insert.cpp
188 compiler/shader/opt_algebraic.cpp
189 compiler/shader/opt_array_splitting.cpp
190 compiler/shader/opt_constant_folding.cpp
191 compiler/shader/opt_constant_propagation.cpp
192 compiler/shader/opt_constant_variable.cpp
193 compiler/shader/opt_copy_propagation.cpp
194 compiler/shader/opt_copy_propagation_elements.cpp
195 compiler/shader/opt_cse.cpp
196 compiler/shader/opt_dead_builtin_varyings.cpp
197 compiler/shader/opt_dead_code.cpp
198 compiler/shader/opt_dead_code_local.cpp
199 compiler/shader/opt_dead_functions.cpp
200 compiler/shader/opt_flatten_nested_if_blocks.cpp
201 compiler/shader/opt_flip_matrices.cpp
202 compiler/shader/opt_function_inlining.cpp
203 compiler/shader/opt_if_simplification.cpp
204 compiler/shader/opt_noop_swizzle.cpp
205 compiler/shader/opt_redundant_jumps.cpp
206 compiler/shader/opt_structure_splitting.cpp
207 compiler/shader/opt_swizzle_swizzle.cpp
208 compiler/shader/opt_tree_grafting.cpp
209 compiler/shader/opt_vectorize.cpp
210 compiler/shader/s_expression.cpp
211# compiler/shader/shader_deserialize.cpp
212# compiler/shader/shader_serialize.cpp
213# compiler/shader/standalone_scaffolding.cpp
214 compiler/shader/strtod.cpp
215
216 compiler/mesa-utils/src/glsl/ralloc.c
217 compiler/mesa-utils/src/mesa/program/program.c
218# compiler/mesa-utils/src/mesa/program/prog_execute.c
219 # compiler/mesa-utils/src/mesa/program/prog_noise.c
Steve Kda224042014-09-19 08:46:17 -0600220 compiler/mesa-utils/src/mesa/program/prog_statevars.c
Cody Northrope8455b12014-09-17 16:18:12 -0600221 # compiler/mesa-utils/src/mesa/program/prog_opt_constant_fold.c
222 compiler/mesa-utils/src/mesa/program/symbol_table.c
Steve Kda224042014-09-19 08:46:17 -0600223# compiler/mesa-utils/src/mesa/program/prog_cache.c
Cody Northrope8455b12014-09-17 16:18:12 -0600224 compiler/mesa-utils/src/mesa/program/prog_instruction.c
225 # compiler/mesa-utils/src/mesa/program/prog_optimize.c
226 # compiler/mesa-utils/src/mesa/program/arbprogparse.c
227 compiler/mesa-utils/src/mesa/program/prog_hash_table.c
228 compiler/mesa-utils/src/mesa/program/prog_parameter.c
229 # compiler/mesa-utils/src/mesa/program/prog_diskcache.c
230 # compiler/mesa-utils/src/mesa/program/program_parse.tab.c
231 # compiler/mesa-utils/src/mesa/program/programopt.c
232 # compiler/mesa-utils/src/mesa/program/prog_print.c
233 # compiler/mesa-utils/src/mesa/program/program_parse_extra.c
234 # compiler/mesa-utils/src/mesa/program/prog_parameter_layout.c
Cody Northropbc851432014-09-23 10:06:32 -0600235 compiler/mesa-utils/src/mesa/program/register_allocate.c
Cody Northrope8455b12014-09-17 16:18:12 -0600236 # compiler/mesa-utils/src/mesa/math/m_matrix.c
237 # compiler/mesa-utils/src/mesa/main/enums.c
238 # compiler/mesa-utils/src/mesa/main/imports.c
239 compiler/mesa-utils/src/mesa/main/hash.c
240 compiler/mesa-utils/src/mesa/main/hash_table.c
241 # compiler/mesa-utils/src/mesa/main/errors.c
242 # compiler/mesa-utils/src/mesa/main/formats.c
243
244 compiler/mesa-utils/src/mesa/main/errors.c
245 # compiler/mesa-utils/src/mesa/main/context.c
246 compiler/mesa-utils/src/mesa/main/enums.c
247 compiler/mesa-utils/src/mesa/main/imports.c
248 compiler/mesa-utils/src/mesa/main/version.c
Cody Northropfb3b8982014-10-21 09:47:26 -0600249 compiler/mesa-utils/src/mesa/main/uniforms.c
Cody Northrope8455b12014-09-17 16:18:12 -0600250
Cody Northrop0eb5eea2014-09-19 15:11:52 -0600251 #compiler/mesa-utils/src/mesa/main/shaderobj.c
252
Cody Northropbce1b882014-10-20 16:42:23 -0600253 compiler/mesa-utils/src/mesa/program/sampler.cpp
254
Cody Northrope8455b12014-09-17 16:18:12 -0600255 compiler/shader/glsl_glass_manager.cpp
256 compiler/shader/glsl_glass_backend_translator.cpp
257 compiler/shader/glsl_glass_backend.cpp
258
259 compiler/shader/glsl_parser_extras.cpp
260 compiler/shader/ossource.cpp
261 compiler/shader/standalone_scaffolding.cpp
262 compiler/shader/glsl_types.cpp
263 compiler/shader/glsl_symbol_table.cpp
264 compiler/shader/hir_field_selection.cpp
265
Cody Northrop0eb5eea2014-09-19 15:11:52 -0600266 compiler/shader/compiler_interface.cpp
267
Cody Northropbc851432014-09-23 10:06:32 -0600268 # File required for backend compiler
269 compiler/pipeline/pipeline_compiler_interface.cpp
Chia-I Wu7115a7a2014-10-22 13:48:59 +0800270 compiler/pipeline/pipeline_compiler_interface_meta.cpp
Chia-I Wue25293b2014-10-22 13:23:31 +0800271 compiler/pipeline/brw_blorp_blit_eu.cpp
Cody Northropbc851432014-09-23 10:06:32 -0600272 compiler/pipeline/brw_shader.cpp
273 compiler/pipeline/brw_fs.cpp
274 compiler/pipeline/brw_fs_visitor.cpp
275 compiler/pipeline/brw_fs_live_variables.cpp
276 compiler/pipeline/brw_cfg.cpp
277 compiler/pipeline/brw_fs_cse.cpp
278 compiler/pipeline/brw_fs_copy_propagation.cpp
279 compiler/pipeline/brw_fs_peephole_predicated_break.cpp
280 compiler/pipeline/brw_fs_dead_code_eliminate.cpp
281 compiler/pipeline/brw_fs_sel_peephole.cpp
282 compiler/pipeline/brw_dead_control_flow.cpp
283 compiler/pipeline/brw_fs_saturate_propagation.cpp
284 compiler/pipeline/brw_fs_register_coalesce.cpp
285 compiler/pipeline/brw_schedule_instructions.cpp
286 compiler/pipeline/brw_fs_reg_allocate.cpp
287 compiler/pipeline/brw_fs_generator.cpp
288 compiler/pipeline/brw_lower_texture_gradients.cpp
289 compiler/pipeline/brw_cubemap_normalize.cpp
290 compiler/pipeline/brw_lower_unnormalized_offset.cpp
291 compiler/pipeline/brw_fs_channel_expressions.cpp
292 compiler/pipeline/brw_fs_vector_splitting.cpp
Cody Northrope8455b12014-09-17 16:18:12 -0600293
Cody Northropbc851432014-09-23 10:06:32 -0600294 compiler/pipeline/brw_disasm.c
295 compiler/pipeline/brw_device_info.c
296 compiler/pipeline/brw_eu.c
297 compiler/pipeline/brw_program.c
298 compiler/pipeline/brw_wm.c
299 compiler/pipeline/brw_eu_emit.c
300 compiler/pipeline/brw_eu_compact.c
301 compiler/pipeline/intel_debug.c
Cody Northrop83e2b032014-09-25 17:00:31 -0600302
303 compiler/pipeline/brw_vs.c
304 compiler/pipeline/brw_vec4.cpp
305 compiler/pipeline/brw_vec4_visitor.cpp
306 compiler/pipeline/brw_vec4_vs_visitor.cpp
307 compiler/pipeline/brw_vec4_live_variables.cpp
308 compiler/pipeline/brw_vec4_copy_propagation.cpp
309 compiler/pipeline/brw_vec4_reg_allocate.cpp
310 compiler/pipeline/brw_vec4_generator.cpp
311 compiler/pipeline/gen8_vec4_generator.cpp
Cody Northrope8455b12014-09-17 16:18:12 -0600312 )
313
Chia-I Wufa6b3502014-12-15 23:46:12 +0800314set_source_files_properties(
315 compiler/shader/glsl_glass_manager.cpp
316 compiler/shader/glsl_glass_backend_translator.cpp
317 compiler/shader/glsl_glass_backend.cpp
318 compiler/shader/glsl_parser_extras.cpp
319 PROPERTIES COMPILE_FLAGS "-Wno-unknown-pragmas -Wno-ignored-qualifiers")
320
Cody Northrope8455b12014-09-17 16:18:12 -0600321SET(STANDALONE_COMPILER_SOURCES
322 compiler/shader/main.cpp
323 ${COMPILER_SOURCES}
Chia-I Wu155be032014-08-02 09:14:28 +0800324)
325
Chia-I Wuf77c2902015-01-04 00:34:44 +0800326add_custom_command(OUTPUT intel_gpa.c
327 COMMAND ${PROJECT_SOURCE_DIR}/xgl-generate.py icd-get-proc-addr > intel_gpa.c
328 DEPENDS ${PROJECT_SOURCE_DIR}/xgl-generate.py ${PROJECT_SOURCE_DIR}/xgl.py)
329
Courtney Goeltzenleuchtercec72952014-08-01 18:06:40 -0600330SET(SOURCES
Chia-I Wu09142132014-08-11 15:42:55 +0800331 cmd.c
Chia-I Wu00b51a82014-09-09 12:07:37 +0800332 cmd_decode.c
Chia-I Wuc14d1562014-10-17 09:49:22 +0800333 cmd_meta.c
Chia-I Wu31ecdc72014-08-31 12:58:56 +0800334 cmd_mi.c
Chia-I Wu525c6602014-08-27 10:22:34 +0800335 cmd_prepare.c
Chia-I Wub2755562014-08-20 13:38:52 +0800336 cmd_pipeline.c
Chia-I Wue54854a2014-08-05 10:23:50 +0800337 dev.c
Chia-I Wu75577d92014-08-11 10:54:33 +0800338 dset.c
Chia-I Wu41be94b2014-08-19 14:46:02 +0800339 intel.c
Chia-I Wuf77c2902015-01-04 00:34:44 +0800340 intel_gpa.c
Chia-I Wu9737a102014-08-07 07:59:51 +0800341 event.c
Chia-I Wubdf4c562014-08-07 06:36:33 +0800342 fence.c
Chia-I Wuac6ba132014-08-07 14:21:43 +0800343 format.c
Chia-I Wu214dac62014-08-05 11:07:40 +0800344 gpu.c
Chia-I Wufeb441f2014-08-08 21:27:38 +0800345 img.c
Chia-I Wu8a8d8b62014-08-14 13:26:26 +0800346 layout.c
Chia-I Wuf9911eb2014-08-06 13:50:31 +0800347 mem.c
Chia-I Wu82f50aa2014-08-05 10:43:03 +0800348 obj.c
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -0600349 pipeline.c
Chia-I Wu6b4b2782014-09-02 13:11:32 +0800350 pipeline_shader.c
Chia-I Wue18ff1b2014-08-07 13:38:51 +0800351 query.c
Chia-I Wue09b5362014-08-07 09:25:14 +0800352 queue.c
Chia-I Wu28b89962014-08-18 14:40:49 +0800353 sampler.c
Courtney Goeltzenleuchter52ec3362014-08-19 11:52:02 -0600354 shader.c
Chia-I Wua5714e82014-08-11 15:33:42 +0800355 state.c
Chia-I Wu5a323262014-08-11 10:31:53 +0800356 view.c
Chia-I Wu770b3092014-08-05 14:22:03 +0800357 kmd/winsys_drm.c
Cody Northrope8455b12014-09-17 16:18:12 -0600358 ${COMPILER_SOURCES}
Courtney Goeltzenleuchtercec72952014-08-01 18:06:40 -0600359 )
360
Chia-I Wub5e95f92014-09-23 15:36:53 +0800361pkg_check_modules(DRI3 xcb xcb-dri3 xcb-present)
Chia-I Wu1db76e02014-09-15 14:21:14 +0800362if (DRI3_FOUND)
363 add_definitions(-DENABLE_WSI_X11)
364 include_directories(${DRI3_INCLUDE_DIRS})
365 link_directories(${DRI3_LIBRARY_DIRS})
366 link_libraries(${DRI3_LIBRARIES})
367 set(SOURCES ${SOURCES} wsi_x11.c)
368endif()
369
Chia-I Wucafc88a2015-01-04 00:31:33 +0800370add_library(XGL_i965 SHARED ${SOURCES})
Cody Northrope8455b12014-09-17 16:18:12 -0600371
Chia-I Wu96177272015-01-03 15:27:41 +0800372# set -Bsymbolic-functions for xglGetProcAddr()
373set_target_properties(XGL_i965 PROPERTIES
374 LINK_FLAGS -Wl,-Bsymbolic-functions)
375
Cody Northrop1b8b8fd2014-09-25 13:56:51 -0600376#add_executable(xglCompiler
377# ${STANDALONE_COMPILER_SOURCES}
378#)