2014-11-19 02:23:05 +00:00
|
|
|
project(kgpg)
|
|
|
|
|
|
|
|
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
|
2016-04-06 12:26:19 +00:00
|
|
|
find_package(KDE4 4.18.0 REQUIRED)
|
|
|
|
include(KDE4Defaults)
|
|
|
|
include_directories(${KDE4_INCLUDES})
|
2014-11-19 02:23:05 +00:00
|
|
|
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# only headers are used
|
|
|
|
find_package( Gpgme REQUIRED )
|
|
|
|
|
|
|
|
add_subdirectory( icons )
|
|
|
|
include_directories( ${KDE4_INCLUDES} ${KDEPIMLIBS_INCLUDE_DIR} ${GPGME_INCLUDES} )
|
|
|
|
|
|
|
|
option(KGPG_DEBUG_TRANSACTIONS "show commands and results of gpg calls in debug log" Off)
|
|
|
|
|
|
|
|
set(core_SRCS
|
|
|
|
core/convert.cpp
|
|
|
|
core/images.cpp
|
|
|
|
core/emailvalidator.cpp
|
|
|
|
core/kgpgkey.cpp
|
|
|
|
core/KGpgExpandableNode.cpp
|
|
|
|
core/KGpgKeyNode.cpp
|
|
|
|
core/KGpgGroupMemberNode.cpp
|
|
|
|
core/KGpgGroupNode.cpp
|
|
|
|
core/KGpgNode.cpp
|
|
|
|
core/KGpgOrphanNode.cpp
|
|
|
|
core/KGpgRefNode.cpp
|
|
|
|
core/KGpgRootNode.cpp
|
|
|
|
core/KGpgSignableNode.cpp
|
|
|
|
core/KGpgSignNode.cpp
|
|
|
|
core/KGpgSubkeyNode.cpp
|
|
|
|
core/KGpgUatNode.cpp
|
|
|
|
core/KGpgUidNode.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
set(kgpg_editor_SRCS
|
|
|
|
editor/kgpgmd5widget.cpp
|
|
|
|
editor/kgpgeditor.cpp
|
|
|
|
editor/kgpgtextedit.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
set(kgpg_model_SRCS
|
|
|
|
model/gpgservermodel.cpp
|
|
|
|
model/kgpgitemmodel.cpp
|
|
|
|
model/groupeditproxymodel.cpp
|
|
|
|
model/keylistproxymodel.cpp
|
|
|
|
model/kgpgsearchresultmodel.cpp
|
|
|
|
model/selectkeyproxymodel.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
set(kgpg_transaction_SRCS
|
|
|
|
transactions/kgpgtransaction.cpp
|
|
|
|
transactions/kgpgtransactionjob.cpp
|
|
|
|
transactions/kgpguidtransaction.cpp
|
|
|
|
transactions/kgpgeditkeytransaction.cpp
|
|
|
|
transactions/kgpgsigntransactionhelper.cpp
|
|
|
|
transactions/kgpgchangedisable.cpp
|
|
|
|
transactions/kgpgchangeexpire.cpp
|
|
|
|
transactions/kgpgchangepass.cpp
|
|
|
|
transactions/kgpgchangetrust.cpp
|
|
|
|
transactions/kgpgdelsign.cpp
|
|
|
|
transactions/kgpgdeluid.cpp
|
|
|
|
transactions/kgpgencrypt.cpp
|
|
|
|
transactions/kgpgexport.cpp
|
|
|
|
transactions/kgpgaddphoto.cpp
|
|
|
|
transactions/kgpgadduid.cpp
|
|
|
|
transactions/kgpggeneratekey.cpp
|
|
|
|
transactions/kgpggeneraterevoke.cpp
|
|
|
|
transactions/kgpgdecrypt.cpp
|
|
|
|
transactions/kgpgdelkey.cpp
|
|
|
|
transactions/kgpgimport.cpp
|
|
|
|
transactions/kgpgkeyservertransaction.cpp
|
|
|
|
transactions/kgpgkeyservergettransaction.cpp
|
|
|
|
transactions/kgpgkeyserversearchtransaction.cpp
|
|
|
|
transactions/kgpgprimaryuid.cpp
|
|
|
|
transactions/kgpgsendkeys.cpp
|
|
|
|
transactions/kgpgsignkey.cpp
|
|
|
|
transactions/kgpgsigntext.cpp
|
|
|
|
transactions/kgpgsignuid.cpp
|
|
|
|
transactions/kgpgtextorfiletransaction.cpp
|
|
|
|
transactions/kgpgverify.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
set(kgpg_SRCS ${core_SRCS} ${kgpg_editor_SRCS} ${kgpg_model_SRCS} ${kgpg_transaction_SRCS}
|
2015-09-02 02:13:50 +03:00
|
|
|
selectpublickeydialog.cpp
|
|
|
|
selectsecretkey.cpp
|
|
|
|
kgpgoptions.cpp
|
|
|
|
keysmanager.cpp
|
|
|
|
kgpg.cpp
|
|
|
|
main.cpp
|
|
|
|
kgpgkeygenerate.cpp
|
|
|
|
kgpginterface.cpp
|
|
|
|
kgpgtextinterface.cpp
|
|
|
|
gpgproc.cpp
|
|
|
|
klinebufferedprocess.cpp
|
|
|
|
keyservers.cpp
|
|
|
|
detailedconsole.cpp
|
|
|
|
keyinfodialog.cpp
|
|
|
|
newkey.cpp
|
|
|
|
keyexport.cpp
|
|
|
|
conf_encryption.cpp
|
|
|
|
kgpgrevokewidget.cpp
|
|
|
|
keytreeview.cpp
|
|
|
|
groupedit.cpp
|
|
|
|
sourceselect.cpp
|
|
|
|
kgpgchangekey.cpp
|
|
|
|
kgpgfirstassistant.cpp
|
|
|
|
kgpgexternalactions.cpp
|
|
|
|
selectexpirydate.cpp
|
|
|
|
caff.cpp
|
|
|
|
foldercompressjob.cpp
|
|
|
|
misc.cpp
|
2014-11-19 02:23:05 +00:00
|
|
|
adduid.ui
|
|
|
|
conf_gpg.ui
|
|
|
|
searchres.ui
|
|
|
|
groupedit.ui
|
|
|
|
conf_ui2.ui
|
|
|
|
conf_servers.ui
|
|
|
|
conf_misc.ui
|
|
|
|
newkey.ui
|
|
|
|
keyexport.ui
|
|
|
|
conf_encryption.ui
|
|
|
|
kgpgKeyInfo.ui
|
|
|
|
kgpgkeygenerate.ui
|
|
|
|
kgpgrevokewidget.ui
|
|
|
|
keyserver.ui
|
|
|
|
conf_decryption.ui
|
|
|
|
sourceselect.ui
|
|
|
|
)
|
|
|
|
|
2015-09-02 02:13:50 +03:00
|
|
|
qt4_add_dbus_adaptor( kgpg_SRCS org.kde.kgpg.Key.xml keysmanager.h KeysManager)
|
|
|
|
|
|
|
|
QT4_ADD_DBUS_INTERFACE(kgpg_SRCS org.kde.kgpg.Key.xml kgpg_interface )
|
2014-11-19 02:23:05 +00:00
|
|
|
|
|
|
|
kde4_add_kcfg_files(kgpg_SRCS kgpgsettings.kcfgc )
|
|
|
|
|
2015-09-02 02:13:50 +03:00
|
|
|
add_executable(kgpg ${kgpg_SRCS})
|
2014-11-19 02:23:05 +00:00
|
|
|
|
|
|
|
if (KGPG_DEBUG_TRANSACTIONS)
|
|
|
|
get_target_property(KGPG_FLAGS kgpg COMPILE_DEFINITIONS)
|
|
|
|
if (NOT KGPG_FLAGS)
|
|
|
|
# get rid of the NOTFOUND
|
|
|
|
set(KGPG_FLAGS)
|
|
|
|
endif (NOT KGPG_FLAGS)
|
|
|
|
list(APPEND KGPG_FLAGS KGPG_DEBUG_TRANSACTIONS)
|
|
|
|
set_target_properties(kgpg PROPERTIES COMPILE_DEFINITIONS "${KGPG_FLAGS}")
|
|
|
|
endif (KGPG_DEBUG_TRANSACTIONS)
|
|
|
|
|
|
|
|
target_link_libraries(kgpg
|
|
|
|
${KDE4_KIO_LIBS}
|
|
|
|
${KDE4_KABC_LIBS}
|
|
|
|
${KDE4_KUTILS_LIBS}
|
|
|
|
${KDE4_KPIMUTILS_LIBRARY}
|
|
|
|
${KDE4_SOLID_LIBS}
|
|
|
|
${KDEPIMLIBS_AKONADI_CONTACT_LIBS}
|
|
|
|
)
|
|
|
|
|
|
|
|
install(TARGETS kgpg ${INSTALL_TARGETS_DEFAULT_ARGS} )
|
|
|
|
|
|
|
|
########### install files ###############
|
|
|
|
|
|
|
|
install( FILES editor/kgpgeditor.rc keysmanager.rc tips DESTINATION ${DATA_INSTALL_DIR}/kgpg)
|
|
|
|
install( PROGRAMS kgpg.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
|
|
|
|
install( FILES kgpg.appdata.xml DESTINATION share/appdata/ )
|
|
|
|
install( FILES kgpg.kcfg DESTINATION ${KCFG_INSTALL_DIR})
|
|
|
|
install( FILES kgpg.desktop DESTINATION ${AUTOSTART_INSTALL_DIR} )
|
|
|
|
install( FILES encryptfile.desktop encryptfolder.desktop viewdecrypted.desktop DESTINATION
|
|
|
|
${SERVICES_INSTALL_DIR}/ServiceMenus)
|
|
|
|
install( FILES org.kde.kgpg.Key.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR})
|
|
|
|
|
|
|
|
kde4_install_icons( ${ICON_INSTALL_DIR} )
|