Module: kamailio Branch: master Commit: 2ec8ddba5eeaeea1c7292d1aa56ed90dc834341e URL: https://github.com/kamailio/kamailio/commit/2ec8ddba5eeaeea1c7292d1aa56ed90d...
Author: Xenofon Karamanos xk@gilawa.com Committer: Xenofon Karamanos xk@gilawa.com Date: 2025-05-23T10:56:50Z
cmake: Move prefix/suffix calculation back.
- Prefix depends on each table name.. - Fix postgress with correct install folder.....
---
Modified: cmake/dbschema.cmake
---
Diff: https://github.com/kamailio/kamailio/commit/2ec8ddba5eeaeea1c7292d1aa56ed90d... Patch: https://github.com/kamailio/kamailio/commit/2ec8ddba5eeaeea1c7292d1aa56ed90d...
---
diff --git a/cmake/dbschema.cmake b/cmake/dbschema.cmake index 17528d83ed0..dcd7bb0645b 100644 --- a/cmake/dbschema.cmake +++ b/cmake/dbschema.cmake @@ -50,26 +50,13 @@ function(add_db_target db_name xsl_file) # For consistency, we are now using the new names. # For compatibility with tools, we are still using the old names for install folder
- # Determine the prefix/suffix - if(db_name STREQUAL "db_berkeley" - OR db_name STREQUAL "db_redis" - OR db_name STREQUAL "db_text" - OR db_name STREQUAL "db_mongodb" - ) - set(prefix '') - set(folder_suffix "${MAIN_NAME}") - else() - set(prefix "${table}-") - set(folder_suffix '') - endif() - # install folder based on db_name if(db_name STREQUAL "db_mongodb") set(install_folder "mongodb") elseif(db_name STREQUAL "db_mysql") set(install_folder "mysql") elseif(db_name STREQUAL "db_postgres") - set(install_folder "mysql") + set(install_folder "postgres") elseif(db_name STREQUAL "db_text") set(install_folder "dbtext") else() @@ -79,6 +66,19 @@ function(add_db_target db_name xsl_file) # Loop through each table and add a command for xsltproc foreach(table ${EXTRACTED_TABLES})
+ # Determine the prefix/suffix + if(db_name STREQUAL "db_berkeley" + OR db_name STREQUAL "db_redis" + OR db_name STREQUAL "db_text" + OR db_name STREQUAL "db_mongodb" + ) + set(prefix '') + set(folder_suffix "${MAIN_NAME}") + else() + set(prefix "${table}-") + set(folder_suffix '') + endif() + # Stringparam db is the db_* module name add_custom_command( TARGET dbschema_${db_name}