Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 5bbf721612
)
r14.1.x
parent
3b8edca5ad
commit
cfafca887c
@ -0,0 +1,90 @@
|
||||
############################################
|
||||
#
|
||||
# (C) 2023 Michele Calgaro
|
||||
# Michele (DOT) Calgaro (AT) yahoo.it
|
||||
#
|
||||
# Improvements and feedback are welcome
|
||||
#
|
||||
# This file is released under GPL >= 2
|
||||
#
|
||||
############################################
|
||||
|
||||
|
||||
cmake_minimum_required( VERSION 3.5 )
|
||||
|
||||
|
||||
#### general package setup
|
||||
|
||||
project( smb4k )
|
||||
|
||||
|
||||
#### include essential cmake modules
|
||||
|
||||
include( FindPkgConfig )
|
||||
include( CheckSymbolExists )
|
||||
include( CheckIncludeFile )
|
||||
include( CheckLibraryExists )
|
||||
include( CheckCSourceCompiles )
|
||||
include( CheckCXXSourceCompiles )
|
||||
include( CheckTypeSize )
|
||||
|
||||
|
||||
#### include our cmake modules
|
||||
|
||||
include( TDEMacros )
|
||||
|
||||
|
||||
##### set version number
|
||||
|
||||
tde_set_project_version( )
|
||||
|
||||
|
||||
##### setup install paths
|
||||
|
||||
include( TDESetupPaths )
|
||||
tde_setup_paths( )
|
||||
|
||||
|
||||
##### optional stuff
|
||||
|
||||
option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
|
||||
|
||||
option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} )
|
||||
|
||||
|
||||
##### user requested modules
|
||||
|
||||
option( BUILD_ALL "Build all" ON )
|
||||
option( BUILD_DOC "Build documentation" ${BUILD_ALL} )
|
||||
option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} )
|
||||
|
||||
|
||||
|
||||
##### configure checks
|
||||
|
||||
include( ConfigureChecks.cmake )
|
||||
|
||||
|
||||
##### global compiler settings
|
||||
|
||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
|
||||
set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
|
||||
set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
|
||||
|
||||
|
||||
##### directories
|
||||
|
||||
add_subdirectory( smb4k )
|
||||
add_subdirectory( plugin )
|
||||
add_subdirectory( utilities )
|
||||
|
||||
|
||||
##### other data ################################
|
||||
|
||||
tde_conditional_add_project_docs( BUILD_DOC )
|
||||
tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po )
|
||||
|
||||
|
||||
##### write configure files
|
||||
|
||||
configure_file( config.h.cmake config.h @ONLY )
|
@ -0,0 +1,26 @@
|
||||
###########################################
|
||||
# #
|
||||
# Improvements and feedback are welcome #
|
||||
# #
|
||||
# This file is released under GPL >= 3 #
|
||||
# #
|
||||
###########################################
|
||||
|
||||
|
||||
# required stuff
|
||||
find_package( TQt )
|
||||
find_package( TDE )
|
||||
|
||||
tde_setup_architecture_flags( )
|
||||
|
||||
include(TestBigEndian)
|
||||
test_big_endian(WORDS_BIGENDIAN)
|
||||
|
||||
tde_setup_largefiles( )
|
||||
|
||||
|
||||
##### check for gcc visibility support
|
||||
|
||||
if( WITH_GCC_VISIBILITY )
|
||||
tde_setup_gcc_visibility( )
|
||||
endif( WITH_GCC_VISIBILITY )
|
@ -0,0 +1,8 @@
|
||||
#define VERSION "@VERSION@"
|
||||
|
||||
// Defined if you have fvisibility and fvisibility-inlines-hidden support.
|
||||
#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1
|
||||
|
||||
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
||||
significant byte first (like Motorola and SPARC, unlike Intel). */
|
||||
#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@
|
@ -0,0 +1,30 @@
|
||||
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_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
|
||||
##### pluginloader
|
||||
|
||||
tde_import( konqueror )
|
||||
tde_add_kpart( konqsidebar_smb4k AUTOMOC
|
||||
SOURCES smb4k_konqplugin.cpp
|
||||
LINK tdecore-shared tdeui-shared tdeio-shared tdeparts-shared konqsidebarplugin-shared smb4kcore-shared
|
||||
DESTINATION ${PLUGIN_INSTALL_DIR}
|
||||
)
|
||||
|
||||
|
||||
##### other files
|
||||
|
||||
tde_create_translated_desktop(
|
||||
SOURCE smb4k_add.desktop
|
||||
DESTINATION ${DATA_INSTALL_DIR}/konqsidebartng/add
|
||||
)
|
@ -0,0 +1 @@
|
||||
tde_add_project_translations()
|
@ -0,0 +1,46 @@
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_BINARY_DIR}
|
||||
${TQT_INCLUDE_DIRS}
|
||||
${TDE_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
link_directories(
|
||||
${TDE_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
|
||||
##### subfolders
|
||||
|
||||
add_subdirectory( core )
|
||||
add_subdirectory( dialogs )
|
||||
add_subdirectory( browser )
|
||||
add_subdirectory( configdlg )
|
||||
add_subdirectory( icons )
|
||||
add_subdirectory( iconview )
|
||||
add_subdirectory( listview )
|
||||
add_subdirectory( searchdlg )
|
||||
|
||||
|
||||
##### smb4k (executable)
|
||||
|
||||
tde_add_executable( smb4k AUTOMOC
|
||||
SOURCES main.cpp smb4k.cpp smb4ksystemtray.cpp
|
||||
LINK
|
||||
tdecore-shared tdeui-shared tdeio-shared tdeparts-shared smb4kcore-shared smb4kdialogs-shared
|
||||
DESTINATION ${BIN_INSTALL_DIR}
|
||||
)
|
||||
|
||||
|
||||
##### other files
|
||||
|
||||
tde_create_translated_desktop(
|
||||
SOURCE smb4k.desktop
|
||||
DESTINATION ${XDG_APPS_INSTALL_DIR}
|
||||
)
|
||||
|
||||
install(
|
||||
FILES smb4k_shell.rc
|
||||
DESTINATION ${DATA_INSTALL_DIR}/smb4k
|
||||
)
|
@ -0,0 +1,31 @@
|
||||
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_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
|
||||
##### smb4knetworkbrowser (shared)
|
||||
|
||||
tde_add_kpart( libsmb4knetworkbrowser AUTOMOC
|
||||
SOURCES
|
||||
smb4knetworkbrowser_part.cpp smb4knetworkbrowser.cpp
|
||||
smb4knetworkbrowseritem.cpp smb4knetworkbrowsertooltip.cpp
|
||||
LINK tdecore-shared tdeui-shared tdeparts-shared smb4kcore-shared smb4kdialogs-shared
|
||||
DESTINATION ${PLUGIN_INSTALL_DIR}
|
||||
)
|
||||
|
||||
|
||||
##### other files
|
||||
|
||||
install(
|
||||
FILES smb4knetworkbrowser_part.rc
|
||||
DESTINATION ${DATA_INSTALL_DIR}/smb4knetworkbrowserpart
|
||||
)
|
@ -0,0 +1,23 @@
|
||||
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_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
|
||||
##### smb4tdeconfigdialog (shared)
|
||||
|
||||
tde_add_kpart( libsmb4tdeconfigdialog AUTOMOC
|
||||
SOURCES
|
||||
smb4kauthoptions.cpp smb4tdeconfigdialog.cpp smb4knetworkoptions.cpp smb4tdersyncoptions.cpp
|
||||
smb4ksambaoptions.cpp smb4kshareoptions.cpp smb4ksuperuseroptions.cpp smb4kuserinterfaceoptions.cpp
|
||||
LINK tdecore-shared tdeui-shared tdeio-shared smb4kcore-shared
|
||||
DESTINATION ${PLUGIN_INSTALL_DIR}
|
||||
)
|
@ -0,0 +1,49 @@
|
||||
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_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
|
||||
##### smb4kcore (shared)
|
||||
|
||||
tde_add_library( smb4kcore SHARED AUTOMOC
|
||||
SOURCES
|
||||
smb4kauthinfo.cpp smb4kbookmark.cpp smb4kbookmarkhandler.cpp smb4kcore.cpp
|
||||
smb4kerror.cpp smb4tdefileio.cpp smb4tdeglobal.cpp smb4kglobal_p.cpp
|
||||
smb4khomesshareshandler.cpp smb4kmounter.cpp smb4kmounter_p.cpp
|
||||
smb4knetworkitems.cpp smb4kpasswordhandler.cpp smb4kpreviewer.cpp
|
||||
smb4kpreviewitem.cpp smb4kprint.cpp smb4kprintinfo.cpp smb4ksambaoptionshandler.cpp
|
||||
smb4ksambaoptionsinfo.cpp smb4kscanner.cpp smb4kscanner_p.cpp smb4ksettings.kcfgc
|
||||
smb4kshare.cpp smb4ksynchronizationinfo.cpp smb4ksynchronizer.cpp
|
||||
LINK tdecore-shared tdeui-shared tdeio-shared tdewalletclient-shared
|
||||
VERSION 2.0.0
|
||||
DESTINATION ${LIB_INSTALL_DIR}
|
||||
)
|
||||
|
||||
|
||||
##### other files
|
||||
|
||||
install(
|
||||
FILES smb4k.kcfg
|
||||
DESTINATION ${SHARE_INSTALL_PREFIX}/config.kcfg
|
||||
)
|
||||
|
||||
install(
|
||||
FILES
|
||||
smb4kauthinfo.h smb4kbookmark.h smb4kbookmarkhandler.h
|
||||
smb4kcore.h smb4kdefs.h smb4kerror.h smb4tdefileio.h smb4tdeglobal.h
|
||||
smb4khomesshareshandler.h smb4kmounter.h smb4knetworkitems.h
|
||||
smb4kpasswordhandler.h smb4kpreviewer.h smb4kpreviewitem.h
|
||||
smb4kprint.h smb4kprintinfo.h smb4ksambaoptionshandler.h
|
||||
smb4ksambaoptionsinfo.h smb4kscanner.h smb4kshare.h
|
||||
smb4ksynchronizationinfo.h smb4ksynchronizer.h
|
||||
DESTINATION ${INCLUDE_INSTALL_DIR}
|
||||
)
|
@ -0,0 +1,23 @@
|
||||
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_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
|
||||
##### smb4kdialogs (shared)
|
||||
|
||||
tde_add_library( smb4kdialogs SHARED AUTOMOC
|
||||
SOURCES
|
||||
smb4kbookmarkeditor.cpp smb4kcustomoptionsdialog.cpp smb4kmountdialog.cpp
|
||||
smb4kpreviewdialog.cpp smb4kprintdialog.cpp smb4ksynchronizationdialog.cpp
|
||||
LINK tdecore-shared tdeui-shared smb4kcore-shared
|
||||
DESTINATION ${LIB_INSTALL_DIR}
|
||||
)
|
@ -0,0 +1 @@
|
||||
tde_install_icons( ${PROJECT_NAME} )
|
@ -0,0 +1,31 @@
|
||||
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_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
|
||||
##### smb4ksharesiconview (shared)
|
||||
|
||||
tde_add_kpart( libsmb4ksharesiconview AUTOMOC
|
||||
SOURCES
|
||||
smb4ksharesiconview.cpp smb4ksharesiconview_part.cpp
|
||||
smb4ksharesiconviewitem.cpp smb4ksharesiconviewtooltip.cpp
|
||||
LINK tdecore-shared tdeui-shared tdeio-shared tdeparts-shared smb4kcore-shared smb4kdialogs-shared
|
||||
DESTINATION ${PLUGIN_INSTALL_DIR}
|
||||
)
|
||||
|
||||
|
||||
##### other files
|
||||
|
||||
install(
|
||||
FILES smb4ksharesiconview_part.rc
|
||||
DESTINATION ${DATA_INSTALL_DIR}/smb4ksharesiconviewpart
|
||||
)
|
@ -0,0 +1,31 @@
|
||||
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_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
|
||||
##### smb4kdialogs (shared)
|
||||
|
||||
tde_add_kpart( libsmb4kshareslistview AUTOMOC
|
||||
SOURCES
|
||||
smb4kshareslistview.cpp smb4kshareslistview_part.cpp
|
||||
smb4kshareslistviewitem.cpp smb4kshareslistviewtooltip.cpp
|
||||
LINK tdecore-shared tdeui-shared tdeio-shared tdeparts-shared smb4kcore-shared smb4kdialogs-shared
|
||||
DESTINATION ${PLUGIN_INSTALL_DIR}
|
||||
)
|
||||
|
||||
|
||||
##### other files
|
||||
|
||||
install(
|
||||
FILES smb4kshareslistview_part.rc
|
||||
DESTINATION ${DATA_INSTALL_DIR}/smb4kshareslistviewpart
|
||||
)
|
@ -0,0 +1,21 @@
|
||||
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_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
|
||||
##### smb4ksearchdialog (shared)
|
||||
|
||||
tde_add_kpart( libsmb4ksearchdialog AUTOMOC
|
||||
SOURCES smb4ksearchdialog.cpp smb4ksearchdialog_part.cpp smb4ksearchdialogitem.cpp
|
||||
LINK tdecore-shared tdeui-shared tdeparts-shared smb4kcore-shared
|
||||
DESTINATION ${PLUGIN_INSTALL_DIR}
|
||||
)
|
@ -0,0 +1,40 @@
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_BINARY_DIR}
|
||||
${TDE_INCLUDE_DIR}
|
||||
${TQT_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
link_directories(
|
||||
${TQT_LIBRARY_DIRS}
|
||||
${TDE_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
|
||||
##### (executable)
|
||||
|
||||
tde_add_executable( smb4k_mount AUTOMOC
|
||||
SOURCES smb4k_mount.cpp
|
||||
DESTINATION ${BIN_INSTALL_DIR}
|
||||
)
|
||||
|
||||
tde_add_executable( smb4k_umount AUTOMOC
|
||||
SOURCES smb4k_umount.cpp
|
||||
DESTINATION ${BIN_INSTALL_DIR}
|
||||
)
|
||||
|
||||
tde_add_executable( smb4k_kill AUTOMOC
|
||||
SOURCES smb4k_kill.cpp
|
||||
DESTINATION ${BIN_INSTALL_DIR}
|
||||
)
|
||||
|
||||
tde_add_executable( smb4k_cat AUTOMOC
|
||||
SOURCES smb4k_cat.cpp
|
||||
DESTINATION ${BIN_INSTALL_DIR}
|
||||
)
|
||||
|
||||
tde_add_executable( smb4k_mv AUTOMOC
|
||||
SOURCES smb4k_mv.cpp
|
||||
DESTINATION ${BIN_INSTALL_DIR}
|
||||
)
|
Loading…
Reference in new issue