diff options
Diffstat (limited to 'dispatch/CMakeLists.txt')
-rw-r--r-- | dispatch/CMakeLists.txt | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/dispatch/CMakeLists.txt b/dispatch/CMakeLists.txt index 5892c700..64577baa 100644 --- a/dispatch/CMakeLists.txt +++ b/dispatch/CMakeLists.txt @@ -7,8 +7,13 @@ include_directories ( ) add_custom_command ( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/glproc.hpp - COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/glproc.py > ${CMAKE_CURRENT_BINARY_DIR}/glproc.hpp + OUTPUT + ${CMAKE_CURRENT_BINARY_DIR}/glproc.hpp + ${CMAKE_CURRENT_BINARY_DIR}/glproc.cpp + COMMAND ${PYTHON_EXECUTABLE} + ${CMAKE_CURRENT_SOURCE_DIR}/glproc.py + ${CMAKE_CURRENT_BINARY_DIR}/glproc.hpp + ${CMAKE_CURRENT_BINARY_DIR}/glproc.cpp DEPENDS glproc.py dispatch.py @@ -26,11 +31,15 @@ add_custom_command ( # Wrap glproc.hpp as a target to prevent the command from being executed # multiple times simulatenously, when the targets that depend on it are built # in parallel. -add_custom_target (glproc DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/glproc.hpp) +add_custom_target (glproc DEPENDS + ${CMAKE_CURRENT_BINARY_DIR}/glproc.hpp + ${CMAKE_CURRENT_BINARY_DIR}/glproc.cpp +) add_convenience_library (glproc_gl EXCLUDE_FROM_ALL glproc_gl.cpp + ${CMAKE_CURRENT_BINARY_DIR}/glproc.cpp ) add_dependencies (glproc_gl glproc) @@ -38,6 +47,7 @@ add_dependencies (glproc_gl glproc) if (ENABLE_EGL) add_convenience_library (glproc_egl EXCLUDE_FROM_ALL glproc_egl.cpp + ${CMAKE_CURRENT_BINARY_DIR}/glproc.cpp ) add_dependencies (glproc_egl glproc) |