blob: 3a62dc4eeb951b8b50c65aef8559044f3307be08 [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
Mark Lobodzinski953a1692015-01-09 15:12:03 -06008set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DXGL_PROTOTYPES")
9
Cody Northrop065538b2014-12-05 14:20:04 -070010# DEBUG and NDEBUG flags are important for proper mesa behavior
11set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG")
12set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DNDEBUG")
13set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
14set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG")
15
Cody Northrope8455b12014-09-17 16:18:12 -060016# LunarG TODO: Get the llvm-config flags hooked up correctly and remove extra definitions from above
17
Steve K14e09812014-09-19 09:45:36 -060018execute_process(COMMAND ${LUNARGLASS_PREFIX}/Core/LLVM/llvm-3.4/build/install/usr/local/bin/llvm-config --libs engine bitwriter
19 OUTPUT_VARIABLE LLVM_LIBS_ALL_1
20 RESULT_VARIABLE LLVM_LIBS_RESULT)
21
Cody Northrop0eb5eea2014-09-19 15:11:52 -060022string(REPLACE "\n" "" LLVM_LIBS_ALL ${LLVM_LIBS_ALL_1})
23message(STATUS "llvm-config lib results")
24message(STATUS ${LLVM_LIBS_ALL})
25
Steve K66d40802014-09-19 09:59:26 -060026if(NOT "${LLVM_LIBS_RESULT}" EQUAL "0")
27 message(FATAL_ERROR "llvm-config failed: " ${LLVM_LIBS_RESULT})
Steve K14e09812014-09-19 09:45:36 -060028endif()
29
Courtney Goeltzenleuchter62b2e852014-10-03 15:34:53 -060030# Expect libraries to be in either the build (release build) or dbuild (debug) directories
31if(EXISTS ${GLSLANG_PREFIX}/build/install/lib)
32 set(GLSLANG_BUILD ${GLSLANG_PREFIX}/build)
33elseif(EXISTS ${GLSLANG_PREFIX}/dbuild/install/lib)
34 set(GLSLANG_BUILD ${GLSLANG_PREFIX}/dbuild)
35else()
36 message(FATAL_ERROR "Necessary glslang libraries cannot be found: " ${GLSLANG_PREFIX})
37endif()
38
39if(EXISTS ${LUNARGLASS_PREFIX}/build/install/lib)
40 set(LUNARGLASS_BUILD ${LUNARGLASS_PREFIX}/build)
41elseif(EXISTS ${LUNARGLASS_PREFIX}/dbuild/install/lib)
42 set(LUNARGLASS_BUILD ${LUNARGLASS_PREFIX}/dbuild)
43else()
44 message(FATAL_ERROR "Necessary LunarGLASS libraries cannot be found: " ${LUNARGLASS_PREFIX})
45endif()
Cody Northrope8455b12014-09-17 16:18:12 -060046
Cody Northrop0eb5eea2014-09-19 15:11:52 -060047execute_process(COMMAND ${LUNARGLASS_PREFIX}/Core/LLVM/llvm-3.4/build/install/usr/local/bin/llvm-config --cxxflags
48 OUTPUT_VARIABLE LLVM_CXX_CONFIG_ALL_1
Steve K66d40802014-09-19 09:59:26 -060049 RESULT_VARIABLE LLVM_CXX_CONFIG_RESULT)
50
Cody Northrop0eb5eea2014-09-19 15:11:52 -060051string(REPLACE "\n" "" LLVM_CXX_CONFIG_ALL ${LLVM_CXX_CONFIG_ALL_1})
52string(REPLACE "-Woverloaded-virtual" "" LLVM_CXX_CONFIG_1 ${LLVM_CXX_CONFIG_ALL})
53string(REPLACE "-fvisibility-inlines-hidden" "" LLVM_CXX_CONFIG ${LLVM_CXX_CONFIG_1})
54message(STATUS "llvm-config cxxflags results")
55message(STATUS ${LLVM_CXX_CONFIG})
56
Steve K66d40802014-09-19 09:59:26 -060057# if(NOT "${LLVM_CXX_CONFIG_RESULT}" EQUAL "0")
58# message(FATAL_ERROR "llvm-config failed: " ${LLVM_CXX_CONFIG_RESULT})
59# endif()
60
Steve K66d40802014-09-19 09:59:26 -060061
62set_target_properties(icd
63 PROPERTIES
64 COMPILE_FLAGS "${LLVM_CXX_CONFIG}")
65
Cody Northrope8455b12014-09-17 16:18:12 -060066SET(COMPILER_LINK_DIRS
Courtney Goeltzenleuchter62b2e852014-10-03 15:34:53 -060067 ${GLSLANG_BUILD}/install/lib
Cody Northrope8455b12014-09-17 16:18:12 -060068 ${LUNARGLASS_PREFIX}/Core/LLVM/llvm-3.4/build/install/usr/local/lib
Steve K42652ba2014-10-07 10:44:41 -060069 ${LUNARGLASS_PREFIX}/build/Core
70 ${LUNARGLASS_PREFIX}/build/Frontends/glslang
71 ${LUNARGLASS_PREFIX}/build/Frontends/Bil
72 ${LUNARGLASS_PREFIX}/build/Core/Passes/Transforms
73 ${LUNARGLASS_PREFIX}/build/Core/Passes/Immutable
74 ${LUNARGLASS_PREFIX}/build/Core/Passes/Analysis
75 ${LUNARGLASS_PREFIX}/build/Core/Passes/Util
Cody Northrope8455b12014-09-17 16:18:12 -060076)
Courtney Goeltzenleuchtere06e72d2014-08-01 12:44:23 -060077
Chia-I Wuddbc8e22014-09-18 17:05:09 +080078pkg_check_modules(DRM REQUIRED libdrm libdrm_intel)
79
Cody Northrope8455b12014-09-17 16:18:12 -060080link_directories (
81 ${ICD_LIBRARY_DIRS}
82 ${DRM_LIBRARY_DIRS}
83 ${COMPILER_LINK_DIRS}
Chia-I Wuddbc8e22014-09-18 17:05:09 +080084)
85
Cody Northrope8455b12014-09-17 16:18:12 -060086SET(COMPILER_LIBS
87 glslangFrontend
Steve K42652ba2014-10-07 10:44:41 -060088 BilFrontend
Cody Northrope8455b12014-09-17 16:18:12 -060089 core
90 LLVMipo
91 glslang
Steve K42652ba2014-10-07 10:44:41 -060092 BIL
Cody Northrope8455b12014-09-17 16:18:12 -060093 OGLCompiler
94 ${LLVM_LIBS_ALL}
Courtney Goeltzenleuchtere06e72d2014-08-01 12:44:23 -060095)
96
97link_libraries (
Chia-I Wucafc88a2015-01-04 00:31:33 +080098 icd
Cody Northrope8455b12014-09-17 16:18:12 -060099 ${ICD_LIBRARIES}
100 ${DRM_LIBRARIES}
101 ${COMPILER_LIBS}
102 m
Steve Kda224042014-09-19 08:46:17 -0600103 pthread
104 dl
Cody Northrope8455b12014-09-17 16:18:12 -0600105)
106
107SET(COMPILER_INCLUDE_DIRS
108 ${GLSLANG_PREFIX}
109 ${LUNARGLASS_PREFIX}/Core/LLVM/llvm-3.4/build/install/usr/local/include
110 ${LUNARGLASS_PREFIX}
Cody Northrop0eb5eea2014-09-19 15:11:52 -0600111 ${CMAKE_CURRENT_SOURCE_DIR}
Cody Northropbc851432014-09-23 10:06:32 -0600112 compiler/shader
Cody Northrope8455b12014-09-17 16:18:12 -0600113 compiler/mesa-utils/include
Cody Northropbc851432014-09-23 10:06:32 -0600114 compiler/mesa-utils/src
Cody Northrope8455b12014-09-17 16:18:12 -0600115 compiler/mesa-utils/src/glsl
116 compiler/mesa-utils/src/mesa
Cody Northropbc851432014-09-23 10:06:32 -0600117 compiler/mesa-utils/src/mesa/program
Cody Northrope8455b12014-09-17 16:18:12 -0600118 compiler/mesa-utils/src/mapi
119)
120
121include_directories (
122 ${ICD_INCLUDE_DIRS}
123 ${DRM_INCLUDE_DIRS}
124 ${COMPILER_INCLUDE_DIRS}
125)
126
127
128SET(COMPILER_SOURCES
129 compiler/shader/ast_array_index.cpp
130 compiler/shader/ast_expr.cpp
131 compiler/shader/ast_function.cpp
132 compiler/shader/ast_to_hir.cpp
133 compiler/shader/ast_type.cpp
134 compiler/shader/builtin_functions.cpp
135 compiler/shader/builtin_types.cpp
136 compiler/shader/builtin_variables.cpp
137 compiler/shader/ir.cpp
138 compiler/shader/ir_basic_block.cpp
139 compiler/shader/ir_builder.cpp
140 compiler/shader/ir_clone.cpp
141 compiler/shader/ir_constant_expression.cpp
142 compiler/shader/ir_deserializer.cpp
143 compiler/shader/ir_equals.cpp
144 compiler/shader/ir_expression_flattening.cpp
145 compiler/shader/ir_function_can_inline.cpp
146 compiler/shader/ir_function.cpp
147 compiler/shader/ir_function_detect_recursion.cpp
148 compiler/shader/ir_hierarchical_visitor.cpp
149 compiler/shader/ir_hv_accept.cpp
150 compiler/shader/ir_import_prototypes.cpp
151 compiler/shader/ir_print_visitor.cpp
152 compiler/shader/ir_reader.cpp
153 compiler/shader/ir_rvalue_visitor.cpp
154 compiler/shader/ir_serialize.cpp
155 compiler/shader/ir_set_program_inouts.cpp
156 compiler/shader/ir_validate.cpp
157 compiler/shader/ir_variable_refcount.cpp
158 compiler/shader/link_atomics.cpp
159 compiler/shader/linker.cpp
160 compiler/shader/link_functions.cpp
161 compiler/shader/link_interface_blocks.cpp
162 compiler/shader/link_uniform_block_active_visitor.cpp
163 compiler/shader/link_uniform_blocks.cpp
164 compiler/shader/link_uniform_initializers.cpp
165 compiler/shader/link_uniforms.cpp
166 compiler/shader/link_varyings.cpp
167 compiler/shader/loop_analysis.cpp
168 compiler/shader/loop_controls.cpp
169 compiler/shader/loop_unroll.cpp
170 compiler/shader/lower_clip_distance.cpp
171 compiler/shader/lower_discard.cpp
172 compiler/shader/lower_discard_flow.cpp
173 compiler/shader/lower_if_to_cond_assign.cpp
174 compiler/shader/lower_instructions.cpp
175 compiler/shader/lower_jumps.cpp
176 compiler/shader/lower_mat_op_to_vec.cpp
177 compiler/shader/lower_named_interface_blocks.cpp
178 compiler/shader/lower_noise.cpp
179 compiler/shader/lower_offset_array.cpp
180 compiler/shader/lower_output_reads.cpp
181 compiler/shader/lower_packed_varyings.cpp
182 compiler/shader/lower_packing_builtins.cpp
183 compiler/shader/lower_texture_projection.cpp
184 compiler/shader/lower_ubo_reference.cpp
185 compiler/shader/lower_variable_index_to_cond_assign.cpp
186 compiler/shader/lower_vec_index_to_cond_assign.cpp
187 compiler/shader/lower_vec_index_to_swizzle.cpp
188 compiler/shader/lower_vector.cpp
189 compiler/shader/lower_vector_insert.cpp
190 compiler/shader/opt_algebraic.cpp
191 compiler/shader/opt_array_splitting.cpp
192 compiler/shader/opt_constant_folding.cpp
193 compiler/shader/opt_constant_propagation.cpp
194 compiler/shader/opt_constant_variable.cpp
195 compiler/shader/opt_copy_propagation.cpp
196 compiler/shader/opt_copy_propagation_elements.cpp
197 compiler/shader/opt_cse.cpp
198 compiler/shader/opt_dead_builtin_varyings.cpp
199 compiler/shader/opt_dead_code.cpp
200 compiler/shader/opt_dead_code_local.cpp
201 compiler/shader/opt_dead_functions.cpp
202 compiler/shader/opt_flatten_nested_if_blocks.cpp
203 compiler/shader/opt_flip_matrices.cpp
204 compiler/shader/opt_function_inlining.cpp
205 compiler/shader/opt_if_simplification.cpp
206 compiler/shader/opt_noop_swizzle.cpp
207 compiler/shader/opt_redundant_jumps.cpp
208 compiler/shader/opt_structure_splitting.cpp
209 compiler/shader/opt_swizzle_swizzle.cpp
210 compiler/shader/opt_tree_grafting.cpp
211 compiler/shader/opt_vectorize.cpp
212 compiler/shader/s_expression.cpp
213# compiler/shader/shader_deserialize.cpp
214# compiler/shader/shader_serialize.cpp
215# compiler/shader/standalone_scaffolding.cpp
216 compiler/shader/strtod.cpp
217
218 compiler/mesa-utils/src/glsl/ralloc.c
219 compiler/mesa-utils/src/mesa/program/program.c
220# compiler/mesa-utils/src/mesa/program/prog_execute.c
221 # compiler/mesa-utils/src/mesa/program/prog_noise.c
Steve Kda224042014-09-19 08:46:17 -0600222 compiler/mesa-utils/src/mesa/program/prog_statevars.c
Cody Northrope8455b12014-09-17 16:18:12 -0600223 # compiler/mesa-utils/src/mesa/program/prog_opt_constant_fold.c
224 compiler/mesa-utils/src/mesa/program/symbol_table.c
Steve Kda224042014-09-19 08:46:17 -0600225# compiler/mesa-utils/src/mesa/program/prog_cache.c
Cody Northrope8455b12014-09-17 16:18:12 -0600226 compiler/mesa-utils/src/mesa/program/prog_instruction.c
227 # compiler/mesa-utils/src/mesa/program/prog_optimize.c
228 # compiler/mesa-utils/src/mesa/program/arbprogparse.c
229 compiler/mesa-utils/src/mesa/program/prog_hash_table.c
230 compiler/mesa-utils/src/mesa/program/prog_parameter.c
231 # compiler/mesa-utils/src/mesa/program/prog_diskcache.c
232 # compiler/mesa-utils/src/mesa/program/program_parse.tab.c
233 # compiler/mesa-utils/src/mesa/program/programopt.c
234 # compiler/mesa-utils/src/mesa/program/prog_print.c
235 # compiler/mesa-utils/src/mesa/program/program_parse_extra.c
236 # compiler/mesa-utils/src/mesa/program/prog_parameter_layout.c
Cody Northropbc851432014-09-23 10:06:32 -0600237 compiler/mesa-utils/src/mesa/program/register_allocate.c
Cody Northrope8455b12014-09-17 16:18:12 -0600238 # compiler/mesa-utils/src/mesa/math/m_matrix.c
239 # compiler/mesa-utils/src/mesa/main/enums.c
240 # compiler/mesa-utils/src/mesa/main/imports.c
241 compiler/mesa-utils/src/mesa/main/hash.c
242 compiler/mesa-utils/src/mesa/main/hash_table.c
243 # compiler/mesa-utils/src/mesa/main/errors.c
244 # compiler/mesa-utils/src/mesa/main/formats.c
245
246 compiler/mesa-utils/src/mesa/main/errors.c
247 # compiler/mesa-utils/src/mesa/main/context.c
248 compiler/mesa-utils/src/mesa/main/enums.c
249 compiler/mesa-utils/src/mesa/main/imports.c
250 compiler/mesa-utils/src/mesa/main/version.c
Cody Northropfb3b8982014-10-21 09:47:26 -0600251 compiler/mesa-utils/src/mesa/main/uniforms.c
Cody Northrope8455b12014-09-17 16:18:12 -0600252
Cody Northrop0eb5eea2014-09-19 15:11:52 -0600253 #compiler/mesa-utils/src/mesa/main/shaderobj.c
254
Cody Northropbce1b882014-10-20 16:42:23 -0600255 compiler/mesa-utils/src/mesa/program/sampler.cpp
256
Cody Northrope8455b12014-09-17 16:18:12 -0600257 compiler/shader/glsl_glass_manager.cpp
258 compiler/shader/glsl_glass_backend_translator.cpp
259 compiler/shader/glsl_glass_backend.cpp
260
261 compiler/shader/glsl_parser_extras.cpp
262 compiler/shader/ossource.cpp
263 compiler/shader/standalone_scaffolding.cpp
264 compiler/shader/glsl_types.cpp
265 compiler/shader/glsl_symbol_table.cpp
266 compiler/shader/hir_field_selection.cpp
267
Cody Northrop0eb5eea2014-09-19 15:11:52 -0600268 compiler/shader/compiler_interface.cpp
269
Cody Northropbc851432014-09-23 10:06:32 -0600270 # File required for backend compiler
271 compiler/pipeline/pipeline_compiler_interface.cpp
Chia-I Wu7115a7a2014-10-22 13:48:59 +0800272 compiler/pipeline/pipeline_compiler_interface_meta.cpp
Chia-I Wue25293b2014-10-22 13:23:31 +0800273 compiler/pipeline/brw_blorp_blit_eu.cpp
Cody Northropbc851432014-09-23 10:06:32 -0600274 compiler/pipeline/brw_shader.cpp
275 compiler/pipeline/brw_fs.cpp
276 compiler/pipeline/brw_fs_visitor.cpp
277 compiler/pipeline/brw_fs_live_variables.cpp
278 compiler/pipeline/brw_cfg.cpp
279 compiler/pipeline/brw_fs_cse.cpp
280 compiler/pipeline/brw_fs_copy_propagation.cpp
281 compiler/pipeline/brw_fs_peephole_predicated_break.cpp
282 compiler/pipeline/brw_fs_dead_code_eliminate.cpp
283 compiler/pipeline/brw_fs_sel_peephole.cpp
284 compiler/pipeline/brw_dead_control_flow.cpp
285 compiler/pipeline/brw_fs_saturate_propagation.cpp
286 compiler/pipeline/brw_fs_register_coalesce.cpp
287 compiler/pipeline/brw_schedule_instructions.cpp
288 compiler/pipeline/brw_fs_reg_allocate.cpp
289 compiler/pipeline/brw_fs_generator.cpp
290 compiler/pipeline/brw_lower_texture_gradients.cpp
291 compiler/pipeline/brw_cubemap_normalize.cpp
292 compiler/pipeline/brw_lower_unnormalized_offset.cpp
293 compiler/pipeline/brw_fs_channel_expressions.cpp
294 compiler/pipeline/brw_fs_vector_splitting.cpp
Cody Northrope8455b12014-09-17 16:18:12 -0600295
Cody Northropbc851432014-09-23 10:06:32 -0600296 compiler/pipeline/brw_disasm.c
297 compiler/pipeline/brw_device_info.c
298 compiler/pipeline/brw_eu.c
299 compiler/pipeline/brw_program.c
300 compiler/pipeline/brw_wm.c
301 compiler/pipeline/brw_eu_emit.c
302 compiler/pipeline/brw_eu_compact.c
303 compiler/pipeline/intel_debug.c
Cody Northrop83e2b032014-09-25 17:00:31 -0600304
305 compiler/pipeline/brw_vs.c
306 compiler/pipeline/brw_vec4.cpp
307 compiler/pipeline/brw_vec4_visitor.cpp
308 compiler/pipeline/brw_vec4_vs_visitor.cpp
309 compiler/pipeline/brw_vec4_live_variables.cpp
310 compiler/pipeline/brw_vec4_copy_propagation.cpp
311 compiler/pipeline/brw_vec4_reg_allocate.cpp
312 compiler/pipeline/brw_vec4_generator.cpp
313 compiler/pipeline/gen8_vec4_generator.cpp
Cody Northrope8455b12014-09-17 16:18:12 -0600314 )
315
Chia-I Wufa6b3502014-12-15 23:46:12 +0800316set_source_files_properties(
317 compiler/shader/glsl_glass_manager.cpp
318 compiler/shader/glsl_glass_backend_translator.cpp
319 compiler/shader/glsl_glass_backend.cpp
320 compiler/shader/glsl_parser_extras.cpp
321 PROPERTIES COMPILE_FLAGS "-Wno-unknown-pragmas -Wno-ignored-qualifiers")
322
Cody Northrope8455b12014-09-17 16:18:12 -0600323SET(STANDALONE_COMPILER_SOURCES
324 compiler/shader/main.cpp
325 ${COMPILER_SOURCES}
Chia-I Wu155be032014-08-02 09:14:28 +0800326)
327
Chia-I Wuf77c2902015-01-04 00:34:44 +0800328add_custom_command(OUTPUT intel_gpa.c
329 COMMAND ${PROJECT_SOURCE_DIR}/xgl-generate.py icd-get-proc-addr > intel_gpa.c
330 DEPENDS ${PROJECT_SOURCE_DIR}/xgl-generate.py ${PROJECT_SOURCE_DIR}/xgl.py)
331
Courtney Goeltzenleuchtercec72952014-08-01 18:06:40 -0600332SET(SOURCES
Chia-I Wu09142132014-08-11 15:42:55 +0800333 cmd.c
Chia-I Wu00b51a82014-09-09 12:07:37 +0800334 cmd_decode.c
Chia-I Wuc14d1562014-10-17 09:49:22 +0800335 cmd_meta.c
Chia-I Wu31ecdc72014-08-31 12:58:56 +0800336 cmd_mi.c
Chia-I Wu525c6602014-08-27 10:22:34 +0800337 cmd_prepare.c
Chia-I Wub2755562014-08-20 13:38:52 +0800338 cmd_pipeline.c
Chia-I Wue54854a2014-08-05 10:23:50 +0800339 dev.c
Chia-I Wu75577d92014-08-11 10:54:33 +0800340 dset.c
Chia-I Wu41be94b2014-08-19 14:46:02 +0800341 intel.c
Chia-I Wuf77c2902015-01-04 00:34:44 +0800342 intel_gpa.c
Chia-I Wu9737a102014-08-07 07:59:51 +0800343 event.c
Chia-I Wubdf4c562014-08-07 06:36:33 +0800344 fence.c
Chia-I Wuac6ba132014-08-07 14:21:43 +0800345 format.c
Chia-I Wu214dac62014-08-05 11:07:40 +0800346 gpu.c
Chia-I Wufeb441f2014-08-08 21:27:38 +0800347 img.c
Chia-I Wu8a8d8b62014-08-14 13:26:26 +0800348 layout.c
Chia-I Wuf9911eb2014-08-06 13:50:31 +0800349 mem.c
Chia-I Wu82f50aa2014-08-05 10:43:03 +0800350 obj.c
Courtney Goeltzenleuchter05a60542014-08-15 14:54:34 -0600351 pipeline.c
Chia-I Wue18ff1b2014-08-07 13:38:51 +0800352 query.c
Chia-I Wue09b5362014-08-07 09:25:14 +0800353 queue.c
Chia-I Wu28b89962014-08-18 14:40:49 +0800354 sampler.c
Courtney Goeltzenleuchter52ec3362014-08-19 11:52:02 -0600355 shader.c
Chia-I Wua5714e82014-08-11 15:33:42 +0800356 state.c
Chia-I Wu5a323262014-08-11 10:31:53 +0800357 view.c
Chia-I Wu770b3092014-08-05 14:22:03 +0800358 kmd/winsys_drm.c
Cody Northrope8455b12014-09-17 16:18:12 -0600359 ${COMPILER_SOURCES}
Courtney Goeltzenleuchtercec72952014-08-01 18:06:40 -0600360 )
361
Chia-I Wub5e95f92014-09-23 15:36:53 +0800362pkg_check_modules(DRI3 xcb xcb-dri3 xcb-present)
Chia-I Wu1db76e02014-09-15 14:21:14 +0800363if (DRI3_FOUND)
364 add_definitions(-DENABLE_WSI_X11)
365 include_directories(${DRI3_INCLUDE_DIRS})
366 link_directories(${DRI3_LIBRARY_DIRS})
367 link_libraries(${DRI3_LIBRARIES})
368 set(SOURCES ${SOURCES} wsi_x11.c)
369endif()
370
Chia-I Wucafc88a2015-01-04 00:31:33 +0800371add_library(XGL_i965 SHARED ${SOURCES})
Cody Northrope8455b12014-09-17 16:18:12 -0600372
Chia-I Wu96177272015-01-03 15:27:41 +0800373# set -Bsymbolic-functions for xglGetProcAddr()
374set_target_properties(XGL_i965 PROPERTIES
375 LINK_FLAGS -Wl,-Bsymbolic-functions)
376
Cody Northrop1b8b8fd2014-09-25 13:56:51 -0600377#add_executable(xglCompiler
378# ${STANDALONE_COMPILER_SOURCES}
379#)