mirror of
https://github.com/latentPrion/cppbessot.git
synced 2026-04-17 18:44:23 +00:00
Move mustache templates into Cppbessot main dir
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
include_guard(GLOBAL)
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/dbGenerationCommon.cmake")
|
||||
set(_CPPBESSOT_DB_GEN_CPP_DIR "${CMAKE_CURRENT_LIST_DIR}")
|
||||
|
||||
function(cppbessot_add_db_gen_cpp_target version)
|
||||
# Purpose: Register C++ model generation target using checked-in templates.
|
||||
@@ -12,9 +13,14 @@ function(cppbessot_add_db_gen_cpp_target version)
|
||||
# - Files under `<version>/generated-cpp-source`.
|
||||
cppbessot_validate_schema_version("${version}")
|
||||
cppbessot_get_version_dir(_version_dir "${version}")
|
||||
if(DEFINED CPPBESSOT_MODULE_ROOT AND NOT "${CPPBESSOT_MODULE_ROOT}" STREQUAL "")
|
||||
set(_module_root "${CPPBESSOT_MODULE_ROOT}")
|
||||
else()
|
||||
get_filename_component(_module_root "${_CPPBESSOT_DB_GEN_CPP_DIR}/.." ABSOLUTE)
|
||||
endif()
|
||||
|
||||
set(_openapi_file "${_version_dir}/openapi/openapi.yaml")
|
||||
set(_template_dir "${_version_dir}/openapi/templates/cpp-odb-json")
|
||||
set(_template_dir "${_module_root}/openapi/templates/cpp-odb-json")
|
||||
set(_template_config "${_template_dir}/config.yaml")
|
||||
set(_output_dir "${_version_dir}/generated-cpp-source")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user