]> git.cworth.org Git - apitrace/blob - dispatch/CMakeLists.txt
Use skiplist-based FastCallSet within trace::CallSet
[apitrace] / dispatch / CMakeLists.txt
1 ##############################################################################
2 # Dispatch
3
4 include_directories (
5     ${CMAKE_CURRENT_BINARY_DIR}
6     ${CMAKE_CURRENT_SOURCE_DIR}
7 )
8
9 add_custom_command (
10     OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/glproc.hpp
11     COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/glproc.py > ${CMAKE_CURRENT_BINARY_DIR}/glproc.hpp
12     DEPENDS
13         glproc.py
14         dispatch.py
15         ${CMAKE_SOURCE_DIR}/specs/wglapi.py
16         ${CMAKE_SOURCE_DIR}/specs/glxapi.py
17         ${CMAKE_SOURCE_DIR}/specs/cglapi.py
18         ${CMAKE_SOURCE_DIR}/specs/eglapi.py
19         ${CMAKE_SOURCE_DIR}/specs/glesapi.py
20         ${CMAKE_SOURCE_DIR}/specs/glapi.py
21         ${CMAKE_SOURCE_DIR}/specs/gltypes.py
22         ${CMAKE_SOURCE_DIR}/specs/stdapi.py
23 )
24
25
26 # Wrap glproc.hpp as a target to prevent the command from being executed
27 # multiple times simulatenously, when the targets that depend on it are built
28 # in parallel.
29 add_custom_target (glproc DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/glproc.hpp)
30
31
32 add_library (glproc_gl STATIC EXCLUDE_FROM_ALL
33     glproc_gl.cpp
34 )
35
36 add_dependencies (glproc_gl glproc)
37
38 set_target_properties (glproc_gl PROPERTIES
39     # Ensure it can be statically linked in shared libraries
40     COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_CXX_FLAGS}"
41 )
42
43 if (ENABLE_EGL)
44     add_library (glproc_egl STATIC EXCLUDE_FROM_ALL
45         glproc_egl.cpp
46     )
47
48     add_dependencies (glproc_egl glproc)
49
50     set_target_properties (glproc_egl PROPERTIES
51         # Ensure it can be statically linked in shared libraries
52         COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_CXX_FLAGS}"
53     )
54 endif ()
55