summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2021-01-25 15:48:29 +0200
committerMavridis Philippe <mavridisf@gmail.com>2021-01-25 15:48:29 +0200
commit3988d0b5dd1614839cee5a6aa23439cc156efe2d (patch)
treebf9b1f58ac0f799a9895aae701d7af93107f06b9 /src
parentc06676f232466dcc7917299b75f5296ff830b01c (diff)
downloadklamav-3988d0b5dd1614839cee5a6aa23439cc156efe2d.tar.gz
klamav-3988d0b5dd1614839cee5a6aa23439cc156efe2d.zip
CMake conversion
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt75
-rw-r--r--src/about/CMakeLists.txt4
-rw-r--r--src/action/CMakeLists.txt4
-rw-r--r--src/icons/CMakeLists.txt2
-rw-r--r--src/klammail/CMakeLists.txt20
-rw-r--r--src/sqlite/CMakeLists.txt54
6 files changed, 159 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 0000000..a520911
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,75 @@
+add_subdirectory( about )
+add_subdirectory( action )
+add_subdirectory( icons )
+
+tde_conditional_add_subdirectory( WITH_EMBEDDED_SQLITE sqlite )
+tde_conditional_add_subdirectory( BUILD_KLAMMAIL klammail )
+
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+ ${LIBCLAMAV_INCLUDE_DIR}
+ ${ZLIB_INCLUDE_DIR}
+ ${CMAKE_SOURCE_DIR}/src/sqlite
+ ${SQLITE_INCLUDE_DIR}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+##### klamav (executable)
+# @SOURCES: autoscanoptions.ui excluded until autoscan reimplemented
+
+tde_add_executable( ${PROJECT_NAME} AUTOMOC
+
+ SOURCES
+ main.cpp klamav.cpp freshklam.cpp sigtool.cpp
+ klamscan.cpp kuarantine.cpp welcome.cpp dbviewer.cpp
+ frame.cpp tabwidget.cpp viewer.cpp pageviewer.cpp
+ klamav_run.cpp dcopklamscan.skel directorylist.cpp
+ scanviewer.cpp schedule.cpp datepicker.cpp
+ cthost.cpp ctcron.cpp ctmonth.cpp ctdom.cpp
+ ctdow.cpp cttask.cpp ctvariable.cpp
+ ktlistitem.cpp ktlisttask.cpp ktlisttasks.cpp
+ ktview.cpp ktlistcron.cpp kticon.cpp
+ activityviewer.cpp collectiondb.cpp
+ configdialog.cpp klamavconfig.kcfgc
+ archivelimits.ui archivetypes.ui specialfiletypes.ui
+ firstrunwizard.ui logoptions.ui
+ k3bjobprogressosd_mod.cpp
+
+ LINK
+ tdeio-shared
+ tdehtml-shared
+ tdeui-shared
+ tdecore-shared
+ ${LIBCLAMAV_LIBRARIES}
+ ${SQLITE_LIBRARIES}
+ ${ZLIB_LIBRARIES}
+
+ DESTINATION ${BIN_INSTALL_DIR}
+)
+
+tde_create_translated_desktop( ${PROJECT_NAME}.desktop )
+
+tde_create_translated_desktop(
+ SOURCE eventsrc
+ DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}
+)
+
+##### install servicemenu
+install(
+ FILES klamav-dropdown.desktop
+ DESTINATION ${DATA_INSTALL_DIR}/konqueror/servicemenus
+)
+
+##### install XML-GUI resource file
+install(
+ FILES klamavui.rc
+ DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}
+)
diff --git a/src/about/CMakeLists.txt b/src/about/CMakeLists.txt
new file mode 100644
index 0000000..405fd2f
--- /dev/null
+++ b/src/about/CMakeLists.txt
@@ -0,0 +1,4 @@
+install(
+ FILES aboutklamav.html main.html nodb.html wait.html klamav.css top-right-klamav.png klam.png
+ DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}/about
+)
diff --git a/src/action/CMakeLists.txt b/src/action/CMakeLists.txt
new file mode 100644
index 0000000..d1d3018
--- /dev/null
+++ b/src/action/CMakeLists.txt
@@ -0,0 +1,4 @@
+install(
+ FILES ScanWithKlamAV
+ DESTINATION ${BIN_INSTALL_DIR}
+)
diff --git a/src/icons/CMakeLists.txt b/src/icons/CMakeLists.txt
new file mode 100644
index 0000000..847f496
--- /dev/null
+++ b/src/icons/CMakeLists.txt
@@ -0,0 +1,2 @@
+tde_install_icons( DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}/icons )
+tde_install_icons( app-klamav )
diff --git a/src/klammail/CMakeLists.txt b/src/klammail/CMakeLists.txt
new file mode 100644
index 0000000..235fc9d
--- /dev/null
+++ b/src/klammail/CMakeLists.txt
@@ -0,0 +1,20 @@
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_SOURCE_DIR}/src
+ ${LIBCLAMAV_INCLUDE_DIR}
+)
+
+##### klammail (executable)
+
+tde_add_executable( klammail AUTOMOC
+
+ SOURCES
+ clamdmail.c options.c output.c memory.c cfgparser.c client.c
+
+ LINK
+ ${LIBCLAMAV_LIBRARIES}
+
+ DESTINATION ${BIN_INSTALL_DIR}
+)
diff --git a/src/sqlite/CMakeLists.txt b/src/sqlite/CMakeLists.txt
new file mode 100644
index 0000000..f38d08a
--- /dev/null
+++ b/src/sqlite/CMakeLists.txt
@@ -0,0 +1,54 @@
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_SOURCE_DIR}/src
+ ${ZLIB_INCLUDE_DIR}
+)
+
+
+##### SQLite (static)
+
+tde_add_library( sqlite STATIC_PIC
+
+ SOURCES
+ alter.c
+ attach.c
+ auth.c
+ btree.c
+ build.c
+ callback.c
+ date.c
+ delete.c
+ expr.c
+ func.c
+ hash.c
+ insert.c
+ legacy.c
+ main.c
+ opcodes.c
+ os_unix.c
+ os_win.c
+ pager.c
+ parse.c
+ pragma.c
+ prepare.c
+ printf.c
+ random.c
+ select.c
+ table.c
+ tokenize.c
+ trigger.c
+ update.c
+ utf.c
+ util.c
+ vacuum.c
+ vdbe.c
+ vdbeapi.c
+ vdbeaux.c
+ vdbemem.c
+ where.c
+
+ LINK
+ ${ZLIB_LIBRARIES}
+)