Chia-I Wu | 5e14be6 | 2014-11-19 22:45:51 +0800 | [diff] [blame] | 1 | add_custom_command(OUTPUT dispatch.c |
Chia-I Wu | b3d5e19 | 2015-01-04 10:15:48 +0800 | [diff] [blame] | 2 | COMMAND ${PROJECT_SOURCE_DIR}/xgl-generate.py loader-entrypoints > dispatch.c |
| 3 | DEPENDS ${PROJECT_SOURCE_DIR}/xgl-generate.py ${PROJECT_SOURCE_DIR}/xgl.py) |
Jon Ashburn | d38bfb1 | 2014-10-14 19:15:22 -0600 | [diff] [blame] | 4 | |
Chia-I Wu | f46b81a | 2015-01-04 11:12:47 +0800 | [diff] [blame] | 5 | add_custom_command(OUTPUT table_ops.h |
| 6 | COMMAND ${PROJECT_SOURCE_DIR}/xgl-generate.py dispatch-table-ops loader > table_ops.h |
| 7 | DEPENDS ${PROJECT_SOURCE_DIR}/xgl-generate.py ${PROJECT_SOURCE_DIR}/xgl.py) |
| 8 | |
Jon Ashburn | d38bfb1 | 2014-10-14 19:15:22 -0600 | [diff] [blame] | 9 | include_directories( |
| 10 | ${CMAKE_CURRENT_SOURCE_DIR} |
Chia-I Wu | f46b81a | 2015-01-04 11:12:47 +0800 | [diff] [blame] | 11 | ${CMAKE_CURRENT_BINARY_DIR} |
Jon Ashburn | d38bfb1 | 2014-10-14 19:15:22 -0600 | [diff] [blame] | 12 | ) |
Chia-I Wu | 0c10534 | 2014-08-03 09:31:26 +0800 | [diff] [blame] | 13 | |
Mark Lobodzinski | 391bb6d | 2015-01-09 15:12:03 -0600 | [diff] [blame^] | 14 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DXGL_PROTOTYPES") |
| 15 | |
Chia-I Wu | f46b81a | 2015-01-04 11:12:47 +0800 | [diff] [blame] | 16 | add_library(XGL SHARED loader.c dispatch.c table_ops.h) |
Chia-I Wu | 5f72d0f | 2014-08-01 11:21:23 +0800 | [diff] [blame] | 17 | set_target_properties(XGL PROPERTIES SOVERSION 0) |
| 18 | target_link_libraries(XGL -ldl -lpthread) |