File: CMakeLists.txt

package info (click to toggle)
apitrace 11.1%2Brepack-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 13,648 kB
  • sloc: cpp: 183,110; python: 33,685; ansic: 25,073; sh: 143; makefile: 88
file content (34 lines) | stat: -rw-r--r-- 1,117 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
##############################################################################
# Dispatch

set (CMAKE_INCLUDE_CURRENT_DIR ON)

add_custom_command (
    OUTPUT
        ${CMAKE_CURRENT_BINARY_DIR}/glproc.hpp
        ${CMAKE_CURRENT_BINARY_DIR}/glproc.cpp
    COMMAND ${Python3_EXECUTABLE}
        ${CMAKE_CURRENT_SOURCE_DIR}/glproc.py
        ${CMAKE_CURRENT_BINARY_DIR}/glproc.hpp
        ${CMAKE_CURRENT_BINARY_DIR}/glproc.cpp
    MAIN_DEPENDENCY
        glproc.py
    DEPENDS
        dispatch.py
        ${CMAKE_SOURCE_DIR}/specs/wglapi.py
        ${CMAKE_SOURCE_DIR}/specs/glxapi.py
        ${CMAKE_SOURCE_DIR}/specs/cglapi.py
        ${CMAKE_SOURCE_DIR}/specs/eglapi.py
        ${CMAKE_SOURCE_DIR}/specs/glapi.py
        ${CMAKE_SOURCE_DIR}/specs/gltypes.py
        ${CMAKE_SOURCE_DIR}/specs/stdapi.py
)


# Wrap glproc.{hpp,cpp} as a target to prevent the command from being executed
# multiple times simultanously, when the targets that depend on it are built in
# parallel.
add_convenience_library (glproc EXCLUDE_FROM_ALL
    ${CMAKE_CURRENT_BINARY_DIR}/glproc.hpp
    ${CMAKE_CURRENT_BINARY_DIR}/glproc.cpp
)