summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2024-10-31 22:50:43 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2024-11-12 08:45:45 +0900
commit2c316e3037228223164adf5cd3446cf47f1744a4 (patch)
treeaf6e77666ad71fef428f47d93c45bc8d5893308d /src
parent83ad5951652a1e115427d48ceaa6a2885740b4e8 (diff)
downloadkrecipes-2c316e3037228223164adf5cd3446cf47f1744a4.tar.gz
krecipes-2c316e3037228223164adf5cd3446cf47f1744a4.zip
CMake conversionHEADmaster
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt61
-rw-r--r--src/backends/CMakeLists.txt31
-rw-r--r--src/backends/MySQL/CMakeLists.txt12
-rw-r--r--src/backends/PostgreSQL/CMakeLists.txt16
-rw-r--r--src/backends/SQLite/CMakeLists.txt13
-rw-r--r--src/datablocks/CMakeLists.txt16
-rw-r--r--src/dialogs/CMakeLists.txt38
-rw-r--r--src/exporters/CMakeLists.txt14
-rw-r--r--src/importers/CMakeLists.txt13
-rw-r--r--src/widgets/CMakeLists.txt22
10 files changed, 236 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 0000000..5634bb3
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,61 @@
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_BINARY_DIR}
+ ${TQT_INCLUDE_DIRS}
+ ${TDE_INCLUDE_DIR}
+)
+
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+##### subfolders
+
+add_subdirectory( backends )
+add_subdirectory( datablocks )
+add_subdirectory( dialogs )
+add_subdirectory( exporters )
+add_subdirectory( importers )
+add_subdirectory( widgets )
+
+
+##### krecipes (executable)
+
+tde_add_executable( krecipes AUTOMOC
+ SOURCES
+ main.cpp krecipes.cpp krecipesview.cpp pref.cpp
+ krecipesiface.skel krecipesdbiface.skel
+ propertycalculator.cpp setupwizard.cpp
+ shoppingcalculator.cpp kstartuplogo.cpp
+ recipeactionshandler.cpp recipefilter.cpp
+ convert_sqlite3.cpp klomanager.cpp
+ LINK
+ krecipesdbs-static krecipesexporters-static krecipesimporters-static
+ krecipesdialogs-static krecipeswidgets-static datablocks-static
+ tdecore-shared tdeui-shared tdeio-shared tdeparts-shared
+ tdefx-shared tdehtml-shared DCOP-shared
+ DESTINATION ${BIN_INSTALL_DIR}
+)
+
+
+##### other files
+
+install(
+ FILES krecipes.xpm
+ DESTINATION ${SHARE_INSTALL_PREFIX}/pixmaps
+)
+
+install(
+ FILES krecipesui.rc
+ DESTINATION ${DATA_INSTALL_DIR}/krecipes
+)
+
+tde_create_translated_desktop(
+ SOURCE krecipes.desktop
+ DESTINATION ${XDG_APPS_INSTALL_DIR}
+)
+
+tde_install_icons( DESTINATION ${SHARE_INSTALL_PREFIX}/icons )
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}
+)
diff --git a/src/backends/MySQL/CMakeLists.txt b/src/backends/MySQL/CMakeLists.txt
new file mode 100644
index 0000000..60d9a0c
--- /dev/null
+++ b/src/backends/MySQL/CMakeLists.txt
@@ -0,0 +1,12 @@
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+
+##### krecmysql (static)
+
+tde_add_library( krecmysql STATIC_PIC AUTOMOC
+ SOURCES mysqlrecipedb.cpp
+ LINK krecipesdbs-static ${MYSQL_LIBRARIES}
+)
diff --git a/src/backends/PostgreSQL/CMakeLists.txt b/src/backends/PostgreSQL/CMakeLists.txt
new file mode 100644
index 0000000..fa825e0
--- /dev/null
+++ b/src/backends/PostgreSQL/CMakeLists.txt
@@ -0,0 +1,16 @@
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+link_directories(
+ ${LIBPQ_LIBRARY_DIRS}
+)
+
+##### krecpsql (static)
+
+tde_add_library( krecpsql STATIC_PIC AUTOMOC
+ SOURCES psqlrecipedb.cpp
+ LINK krecipesdbs-static ${LIBPQ_LIBRARIES}
+)
+
diff --git a/src/backends/SQLite/CMakeLists.txt b/src/backends/SQLite/CMakeLists.txt
new file mode 100644
index 0000000..c039413
--- /dev/null
+++ b/src/backends/SQLite/CMakeLists.txt
@@ -0,0 +1,13 @@
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+
+##### krecsqlite (static)
+
+tde_add_library( krecsqlite STATIC_PIC AUTOMOC
+ SOURCES literecipedb.cpp
+ LINK krecipesdbs-static ${SQLITE3_LIBRARIES}
+)
+
diff --git a/src/datablocks/CMakeLists.txt b/src/datablocks/CMakeLists.txt
new file mode 100644
index 0000000..73612f2
--- /dev/null
+++ b/src/datablocks/CMakeLists.txt
@@ -0,0 +1,16 @@
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+
+##### datablocks (static)
+
+tde_add_library( datablocks STATIC_PIC AUTOMOC
+ SOURCES
+ recipelist.cpp constraintlist.cpp categorytree.cpp kreborder.cpp
+ recipe.cpp ingredient.cpp ingredientlist.cpp elementlist.cpp
+ element.cpp ingredientproperty.cpp ingredientpropertylist.cpp
+ unit.cpp unitratio.cpp unitratiolist.cpp mixednumber.cpp rating.cpp
+ weight.cpp
+)
diff --git a/src/dialogs/CMakeLists.txt b/src/dialogs/CMakeLists.txt
new file mode 100644
index 0000000..cc48e9c
--- /dev/null
+++ b/src/dialogs/CMakeLists.txt
@@ -0,0 +1,38 @@
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+
+##### krecipesdialogs (static)
+
+tde_add_library( krecipesdialogs STATIC_PIC AUTOMOC
+ SOURCES
+ advancedsearchdialog.cpp recipeimportdialog.cpp
+ dietwizarddialog.cpp recipeinputdialog.cpp
+ recipeviewdialog.cpp selectrecipedialog.cpp
+ ingredientsdialog.cpp selectunitdialog.cpp
+ createelementdialog.cpp propertiesdialog.cpp
+ createpropertydialog.cpp selectpropertydialog.cpp
+ unitsdialog.cpp dependanciesdialog.cpp
+ shoppinglistdialog.cpp shoppinglistviewdialog.cpp
+ selectcategoriesdialog.cpp categorieseditordialog.cpp
+ authorsdialog.cpp selectauthorsdialog.cpp
+ resizerecipedialog.cpp
+ dietviewdialog.cpp ingredientmatcherdialog.cpp
+ usdadatadialog.cpp prepmethodsdialog.cpp
+ createcategorydialog.cpp borderdialog.cpp
+ refineshoppinglistdialog.cpp pagesetupdialog.cpp
+ dbimportdialog.cpp createunitdialog.cpp
+ setupdisplay.cpp
+ ingredientparserdialog.cpp ingredientgroupsdialog.cpp
+ editratingdialog.cpp similarcategoriesdialog.cpp
+ conversiondialog.cpp createingredientweightdialog.cpp
+ recipeprintpreview.cpp
+)
+
+set_property(
+ SOURCE recipeinputdialog.cpp
+ APPEND PROPERTY OBJECT_DEPENDS
+ ${CMAKE_BINARY_DIR}/src/widgets/ratingdisplaywidget.h
+)
diff --git a/src/exporters/CMakeLists.txt b/src/exporters/CMakeLists.txt
new file mode 100644
index 0000000..4a747e7
--- /dev/null
+++ b/src/exporters/CMakeLists.txt
@@ -0,0 +1,14 @@
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+
+##### krecipesexporters (static)
+
+tde_add_library( krecipesexporters STATIC_PIC AUTOMOC
+ SOURCES
+ kreexporter.cpp baseexporter.cpp cookmlexporter.cpp
+ recipemlexporter.cpp mmfexporter.cpp htmlexporter.cpp plaintextexporter.cpp
+ rezkonvexporter.cpp htmlbookexporter.cpp
+)
diff --git a/src/importers/CMakeLists.txt b/src/importers/CMakeLists.txt
new file mode 100644
index 0000000..65eb42a
--- /dev/null
+++ b/src/importers/CMakeLists.txt
@@ -0,0 +1,13 @@
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+
+##### krecipesimporters (static)
+
+tde_add_library( krecipesimporters STATIC_PIC AUTOMOC
+ SOURCES
+ mx2importer.cpp mmfimporter.cpp mxpimporter.cpp nycgenericimporter.cpp recipemlimporter.cpp
+ baseimporter.cpp kreimporter.cpp rezkonvimporter.cpp kredbimporter.cpp
+)
diff --git a/src/widgets/CMakeLists.txt b/src/widgets/CMakeLists.txt
new file mode 100644
index 0000000..36d8229
--- /dev/null
+++ b/src/widgets/CMakeLists.txt
@@ -0,0 +1,22 @@
+include_directories(
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+
+##### krecipeswidgets (static)
+
+tde_add_library( krecipeswidgets STATIC_PIC AUTOMOC
+ SOURCES
+ krelistview.cpp kremenu.cpp
+ paneldeco.cpp ingredientlistview.cpp unitlistview.cpp
+ propertylistview.cpp prepmethodlistview.cpp categorylistview.cpp
+ authorlistview.cpp recipelistview.cpp categorycombobox.cpp
+ kretextedit.cpp dblistviewbase.cpp
+ conversiontable.cpp fractioninput.cpp ingredientcombobox.cpp
+ headercombobox.cpp prepmethodcombobox.cpp
+ inglistviewitem.cpp kdateedit.cpp kdatepickerpopup.cpp
+ headerlistview.cpp ratingwidget.cpp kwidgetlistbox.cpp
+ ratingdisplaywidget.ui criteriacombobox.cpp ingredientinputwidget.cpp
+ unitcombobox.cpp amountunitinput.cpp weightinput.cpp
+)