DOXYGEN: add generated code to doxygen source dir
parent
c4ee3a3363
commit
3e622f4edd
|
@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.1)
|
||||||
project(engine VERSION "0.0.1")
|
project(engine VERSION "0.0.1")
|
||||||
set(ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE STRING "Root dir")
|
set(ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE STRING "Root dir")
|
||||||
set(SCRIPTS_CMAKE_DIR ${PROJECT_SOURCE_DIR}/cmake)
|
set(SCRIPTS_CMAKE_DIR ${PROJECT_SOURCE_DIR}/cmake)
|
||||||
|
set(GENERATE_DIR ${CMAKE_BINARY_DIR}/generated CACHE STRING "Generated code dir")
|
||||||
add_custom_target(codegen)
|
add_custom_target(codegen)
|
||||||
|
|
||||||
include(${SCRIPTS_CMAKE_DIR}/common.cmake)
|
include(${SCRIPTS_CMAKE_DIR}/common.cmake)
|
||||||
|
|
|
@ -774,7 +774,7 @@ WARN_LOGFILE =
|
||||||
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
|
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
|
||||||
# Note: If this tag is empty the current directory is searched.
|
# Note: If this tag is empty the current directory is searched.
|
||||||
|
|
||||||
INPUT = @CMAKE_CURRENT_SOURCE_DIR@/src/
|
INPUT = @CMAKE_CURRENT_SOURCE_DIR@/src/ @GENERATE_DIR@
|
||||||
|
|
||||||
# This tag can be used to specify the character encoding of the source files
|
# This tag can be used to specify the character encoding of the source files
|
||||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
||||||
|
|
|
@ -49,7 +49,7 @@ macro(generate_shaders TARGET)
|
||||||
set(files ${ARGV})
|
set(files ${ARGV})
|
||||||
list(REMOVE_AT files 0)
|
list(REMOVE_AT files 0)
|
||||||
set(_headers)
|
set(_headers)
|
||||||
set(GEN_DIR ${CMAKE_BINARY_DIR}/gen-shaders/${TARGET}/)
|
set(GEN_DIR ${GENERATE_DIR}/shaders/${TARGET}/)
|
||||||
set(_template ${ROOT_DIR}/src/tools/shadertool/ShaderTemplate.h.in)
|
set(_template ${ROOT_DIR}/src/tools/shadertool/ShaderTemplate.h.in)
|
||||||
set(_template_ub ${ROOT_DIR}/src/tools/shadertool/UniformBufferTemplate.h.in)
|
set(_template_ub ${ROOT_DIR}/src/tools/shadertool/UniformBufferTemplate.h.in)
|
||||||
file(MAKE_DIRECTORY ${GEN_DIR})
|
file(MAKE_DIRECTORY ${GEN_DIR})
|
||||||
|
@ -102,7 +102,7 @@ macro(generate_compute_shaders TARGET)
|
||||||
set(files ${ARGV})
|
set(files ${ARGV})
|
||||||
list(REMOVE_AT files 0)
|
list(REMOVE_AT files 0)
|
||||||
set(_headers)
|
set(_headers)
|
||||||
set(GEN_DIR ${CMAKE_BINARY_DIR}/gen-compute-shaders/${TARGET}/)
|
set(GEN_DIR ${GENERATE_DIR}/compute-shaders/${TARGET}/)
|
||||||
set(_template ${ROOT_DIR}/src/tools/computeshadertool/ComputeShaderTemplate.h.in)
|
set(_template ${ROOT_DIR}/src/tools/computeshadertool/ComputeShaderTemplate.h.in)
|
||||||
file(MAKE_DIRECTORY ${GEN_DIR})
|
file(MAKE_DIRECTORY ${GEN_DIR})
|
||||||
target_include_directories(${TARGET} PUBLIC ${GEN_DIR})
|
target_include_directories(${TARGET} PUBLIC ${GEN_DIR})
|
||||||
|
@ -151,7 +151,7 @@ macro(generate_compute_shaders TARGET)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
macro(generate_db_models TARGET INPUT OUTPUT)
|
macro(generate_db_models TARGET INPUT OUTPUT)
|
||||||
set(GEN_DIR ${CMAKE_BINARY_DIR}/gen-dbmodels/${TARGET}/)
|
set(GEN_DIR ${GENERATE_DIR}/dbmodels/${TARGET}/)
|
||||||
file(MAKE_DIRECTORY ${GEN_DIR})
|
file(MAKE_DIRECTORY ${GEN_DIR})
|
||||||
target_include_directories(${TARGET} PUBLIC ${GEN_DIR})
|
target_include_directories(${TARGET} PUBLIC ${GEN_DIR})
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
|
@ -179,7 +179,7 @@ endmacro()
|
||||||
macro(generate_protocol TARGET)
|
macro(generate_protocol TARGET)
|
||||||
set(files ${ARGV})
|
set(files ${ARGV})
|
||||||
list(REMOVE_AT files 0)
|
list(REMOVE_AT files 0)
|
||||||
set(GEN_DIR ${CMAKE_BINARY_DIR}/gen-protocol/${TARGET}/)
|
set(GEN_DIR ${GENERATE_DIR}/protocol/${TARGET}/)
|
||||||
file(MAKE_DIRECTORY ${GEN_DIR})
|
file(MAKE_DIRECTORY ${GEN_DIR})
|
||||||
target_include_directories(${TARGET} PUBLIC ${GEN_DIR})
|
target_include_directories(${TARGET} PUBLIC ${GEN_DIR})
|
||||||
set(_headers)
|
set(_headers)
|
||||||
|
|
Loading…
Reference in New Issue