Factor autogen validation utilities out of ProcTable

This commit is contained in:
Corentin Wallez
2018-05-18 15:07:22 -04:00
committed by Corentin Wallez
parent 7d95c40163
commit e8c8f020fb
5 changed files with 92 additions and 29 deletions

View File

@@ -19,6 +19,18 @@ set(NULL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/null)
set(OPENGL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/opengl)
set(VULKAN_DIR ${CMAKE_CURRENT_SOURCE_DIR}/vulkan)
Generate(
LIB_NAME backend_utils_autogen
LIB_TYPE STATIC
FOLDER "backend"
PRINT_NAME "Autogenerated backend utilities"
COMMAND_LINE_ARGS
${GENERATOR_COMMON_ARGS}
-T backend_utils
)
target_link_libraries(backend_utils_autogen nxtcpp)
target_include_directories(backend_utils_autogen PUBLIC ${GENERATED_DIR})
function(GenerateProcTable backend)
Generate(
LIB_NAME ${backend}_autogen
@@ -29,7 +41,7 @@ function(GenerateProcTable backend)
${GENERATOR_COMMON_ARGS}
-T ${backend}
)
target_link_libraries(${backend}_autogen nxtcpp)
target_link_libraries(${backend}_autogen nxtcpp backend_utils_autogen)
target_include_directories(${backend}_autogen PRIVATE ${SRC_DIR})
target_include_directories(${backend}_autogen PUBLIC ${GENERATED_DIR})
endfunction()
@@ -304,7 +316,7 @@ if (NXT_ENABLE_VULKAN)
endif()
################################################################################
# Common sources definition of the library
# Common sources and definition of the library
################################################################################
list(APPEND BACKEND_SOURCES