summaryrefslogtreecommitdiffstats
path: root/src/backends/CMakeLists.txt
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2024-10-31 22:50:43 +0900
committerMichele Calgaro <[email protected]>2024-11-12 08:45:45 +0900
commit2c316e3037228223164adf5cd3446cf47f1744a4 (patch)
treeaf6e77666ad71fef428f47d93c45bc8d5893308d /src/backends/CMakeLists.txt
parent83ad5951652a1e115427d48ceaa6a2885740b4e8 (diff)
downloadkrecipes-2c316e3037228223164adf5cd3446cf47f1744a4.tar.gz
krecipes-2c316e3037228223164adf5cd3446cf47f1744a4.zip
CMake conversion
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'src/backends/CMakeLists.txt')
-rw-r--r--src/backends/CMakeLists.txt31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/backends/CMakeLists.txt b/src/backends/CMakeLists.txt
new file mode 100644
index 0000000..42ba0e8
--- /dev/null
+++ b/src/backends/CMakeLists.txt
@@ -0,0 +1,31 @@
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+
+##### subfolders
+
+tde_conditional_add_subdirectory( WITH_MYSQL MySQL )
+tde_conditional_add_subdirectory( WITH_POSTGRESQL PostgreSQL )
+tde_conditional_add_subdirectory( WITH_SQLITE3 SQLite )
+
+
+##### krecipesdbs (static)
+
+# backend libraries list
+set( BACKEND_LIBRARIES "" )
+if( WITH_MYSQL )
+ list( APPEND BACKEND_LIBRARIES "krecmysql-static" )
+endif( )
+if( WITH_POSTGRESQL )
+ list( APPEND BACKEND_LIBRARIES "krecpsql-static" )
+endif( )
+if( WITH_SQLITE3 )
+ list( APPEND BACKEND_LIBRARIES "krecsqlite-static" )
+endif( )
+
+tde_add_library( krecipesdbs STATIC_PIC AUTOMOC
+ SOURCES recipedb.cpp qsqlrecipedb.cpp progressinterface.cpp
+ LINK ${BACKEND_LIBRARIES}
+)