diff --git a/kmymoney/mymoney/CMakeLists.txt b/kmymoney/mymoney/CMakeLists.txt index d946435e8..9c7ef6608 100644 --- a/kmymoney/mymoney/CMakeLists.txt +++ b/kmymoney/mymoney/CMakeLists.txt @@ -1,122 +1,119 @@ add_subdirectory( storage ) add_subdirectory( payeeidentifier ) ########### next target ############### set(kmm_mymoney_LIB_SRCS mymoneymoney.cpp mymoneyfinancialcalculator.cpp mymoneytransactionfilter.cpp mymoneyfile.cpp mymoneykeyvaluecontainer.cpp mymoneyobject.cpp mymoneypayeeidentifiercontainer.cpp mymoneysplit.cpp mymoneyinstitution.cpp mymoneyinvesttransaction.cpp mymoneyutils.cpp mymoneysecurity.cpp mymoneytransaction.cpp mymoneyschedule.cpp mymoneypayee.cpp mymoneytracer.cpp mymoneytag.cpp mymoneycategory.cpp mymoneycostcenter.cpp mymoneyaccount.cpp mymoneyaccountloan.cpp mymoneyreport.cpp mymoneystatement.cpp mymoneyprice.cpp mymoneybudget.cpp mymoneyforecast.cpp mymoneybalancecache.cpp onlinejob.cpp onlinejobadministration.cpp onlinejobmessage.cpp onlinejobfolder.cpp mymoneycontact.cpp payeeidentifiermodel.cpp ) # storage_a_SOURCES cannot be set in storage directory on MS Windows # because, while building kmm_storage, linker reports many undefined symbols # which are in fact available in kmm_mymoney set(storage_a_SOURCES ./storage/imymoneystorageformat.cpp ./storage/mymoneystoragemgr.cpp ./storage/mymoneystoragenames.cpp ) set(onlineTask_a_SOURCES ./onlinetasks/sepa/sepaonlinetransferimpl.cpp ./onlinetasks/sepa/sepaonlinetransfer.cpp ./onlinetasks/unavailabletask/tasks/unavailabletask.cpp ) # NOTE: this payeeIdentifier and its cmake file cannot be used as a template # This payeeIdentifier must be linked with payeeIdentifierLoader because it # is a fallback if something failed during loading of plugins (for xml files only) set(payeeidentifier_a_SOURCES ./payeeidentifier/ibanbic/ibanbic.cpp ./payeeidentifier/nationalaccount/nationalaccount.cpp ./payeeidentifier/unavailableplugin/unavailableplugin.cpp ) list(APPEND storage_a_SOURCES $<$,$,$>: ./storage/mymoneystoragedump.cpp>) list(APPEND kmm_mymoney_LIB_SRCS ${storage_a_SOURCES}) list(APPEND kmm_mymoney_LIB_SRCS ${onlineTask_a_SOURCES}) list(APPEND kmm_mymoney_LIB_SRCS ${payeeidentifier_a_SOURCES}) set(mymoney_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/kmm_mymoney_export.h mymoneyobject.h mymoneyaccount.h mymoneycategory.h mymoneyexception.h mymoneyfile.h mymoneyfinancialcalculator.h mymoneyinstitution.h mymoneyinvesttransaction.h mymoneykeyvaluecontainer.h mymoneymoney.h mymoneypayee.h mymoneytag.h mymoneyprice.h mymoneyreport.h mymoneyschedule.h mymoneysecurity.h mymoneysplit.h mymoneystatement.h mymoneytransactionfilter.h mymoneytransaction.h mymoneyutils.h mymoneybudget.h mymoneyforecast.h imymoneyprocessingcalendar.h mymoneycostcenter.h mymoneyunittestable.h mymoneypayeeidentifiercontainer.h onlinejob.h onlinejobtyped.h onlinejobmessage.h onlinejobfolder.h ) add_library(kmm_mymoney SHARED ${kmm_mymoney_LIB_SRCS}) -kde_target_enable_exceptions(kmm_mymoney PUBLIC) - -target_compile_features(kmm_mymoney PUBLIC cxx_nullptr PRIVATE cxx_decltype cxx_lambdas cxx_constexpr cxx_range_for) generate_export_header(kmm_mymoney BASE_NAME kmm_mymoney) target_link_libraries(kmm_mymoney PUBLIC kmm_icons Qt5::Xml Qt5::Core Qt5::Gui KF5::Service KF5::I18n Alkimia::alkimia kmm_payeeidentifier_loader kmm_payeeidentifier kmm_plugin # TODO: fix this KF5::XmlGui PRIVATE onlinetask_interfaces ) if(KMM_ADDRESSBOOK_FOUND) target_link_libraries(kmm_mymoney PUBLIC KF5::IdentityManagement KF5::AkonadiCore KF5::Contacts) endif() set_target_properties(kmm_mymoney PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR}) ########### install files ############### install(TARGETS kmm_mymoney ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} ) install(FILES ${mymoney_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/kmymoney COMPONENT Devel) ############## tests #################### if(BUILD_TESTING) add_subdirectory(tests) endif() diff --git a/kmymoney/plugins/kbanking/CMakeLists.txt b/kmymoney/plugins/kbanking/CMakeLists.txt index 526c5ec1b..0f12fb6a4 100644 --- a/kmymoney/plugins/kbanking/CMakeLists.txt +++ b/kmymoney/plugins/kbanking/CMakeLists.txt @@ -1,64 +1,61 @@ # patch the version with the version defined in the build system configure_file(${CMAKE_CURRENT_SOURCE_DIR}/kbanking.json.in ${CMAKE_CURRENT_BINARY_DIR}/kbanking.json @ONLY) add_subdirectory( dialogs ) add_subdirectory( widgets ) add_subdirectory( qml ) add_subdirectory( tasksettings ) set(kbanking_PART_SRCS kbanking.cpp banking.cpp aqbankingkmmoperators.cpp gwenhywfarqtoperators.cpp gwenkdegui.cpp ) kconfig_add_kcfg_files(kbanking_PART_SRCS kbankingsettings.kcfgc) kcoreaddons_add_plugin(kbanking SOURCES ${kbanking_PART_SRCS} JSON "${CMAKE_CURRENT_BINARY_DIR}/kbanking.json" INSTALL_NAMESPACE "kmymoney") #kcoreaddons_add_plugin sets LIBRARY_OUTPUT_DIRECTORY to ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${INSTALL_NAMESPACE} set_target_properties(kbanking PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}") target_link_libraries(kbanking kbanking_dialogs kbanking_widgets kbanking_tasksettings kmm_mymoney kmm_widgets kmm_plugin KF5::ConfigCore KF5::ConfigGui Qt5::Core Alkimia::alkimia gwenhywfar::core gwenhywfar::gui-cpp gwenhywfar::gui-qt5 aqbanking::aqbanking ) -# List might not be complete -target_compile_features(kbanking PRIVATE cxx_generalized_initializers cxx_nullptr) - # Add new menu entries if debugging is enabled set(KMM_BANKING_DEBUG_OPTIONS) # preprocessor definitions in case this is a debug build string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_TOLOWER) if("${CMAKE_BUILD_TYPE_TOLOWER}" MATCHES "debug") file(READ kbanking_debug.rc KMM_BANKING_DEBUG_OPTIONS) endif() configure_file(kbanking.rc "${CMAKE_CURRENT_BINARY_DIR}/kbanking.rc" @ONLY) ########### install files ############### install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kbanking.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/kbanking) install(FILES kbanking.kcfg DESTINATION ${KCFG_INSTALL_DIR}) diff --git a/kmymoney/plugins/sql/CMakeLists.txt b/kmymoney/plugins/sql/CMakeLists.txt index 3497352fd..34ad22732 100644 --- a/kmymoney/plugins/sql/CMakeLists.txt +++ b/kmymoney/plugins/sql/CMakeLists.txt @@ -1,48 +1,46 @@ add_subdirectory(payeeidentifier) add_subdirectory(onlinetasks) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/sqlstorage.json.in ${CMAKE_CURRENT_BINARY_DIR}/sqlstorage.json @ONLY) set(sqlstorage_SOURCES sqlstorage.cpp mymoneystoragesql.cpp mymoneydbdef.cpp mymoneydbdriver.cpp kselectdatabasedlg.cpp kgeneratesqldlg.cpp kmymoneystorageplugin.cpp ) ki18n_wrap_ui(sqlstorage_SOURCES kselectdatabasedlg.ui kgeneratesqldlg.ui) kcoreaddons_add_plugin(sqlstorage SOURCES ${sqlstorage_SOURCES} JSON "${CMAKE_CURRENT_BINARY_DIR}/sqlstorage.json" INSTALL_NAMESPACE "kmymoney") #kcoreaddons_add_plugin sets LIBRARY_OUTPUT_DIRECTORY to ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${INSTALL_NAMESPACE} set_target_properties(sqlstorage PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}") -kde_target_enable_exceptions(sqlstorage PUBLIC) - target_link_libraries(sqlstorage PUBLIC kmm_plugin kmm_widgets PRIVATE Qt5::Sql kmm_utils_platformtools ) install(FILES sqlstorage.rc DESTINATION "${KXMLGUI_INSTALL_DIR}/sqlstorage") install(FILES kmymoney-sqlstorageplugin.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR} ) if(BUILD_TESTING) add_subdirectory(tests) endif() diff --git a/kmymoney/plugins/xml/CMakeLists.txt b/kmymoney/plugins/xml/CMakeLists.txt index 1bd6250c9..201612676 100644 --- a/kmymoney/plugins/xml/CMakeLists.txt +++ b/kmymoney/plugins/xml/CMakeLists.txt @@ -1,46 +1,44 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/xmlstorage.json.in ${CMAKE_CURRENT_BINARY_DIR}/xmlstorage.json @ONLY) set(xmlstorage_SOURCES xmlstorage.cpp mymoneystoragexml.cpp mymoneystoragenames.cpp mymoneystorageanon.cpp kgpgkeyselectiondlg.cpp ) ki18n_wrap_ui(xmlstorage_SOURCES kgpgkeyselectiondlg.ui) kcoreaddons_add_plugin(xmlstorage SOURCES ${xmlstorage_SOURCES} JSON "${CMAKE_CURRENT_BINARY_DIR}/xmlstorage.json" INSTALL_NAMESPACE "kmymoney") #kcoreaddons_add_plugin sets LIBRARY_OUTPUT_DIRECTORY to ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${INSTALL_NAMESPACE} set_target_properties(xmlstorage PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}") -# kde_target_enable_exceptions(xmlstorage PUBLIC) - target_link_libraries(xmlstorage PUBLIC kmm_plugin PRIVATE Qt5::Xml KF5::Archive KF5::I18n KF5::CoreAddons kgpgfile kmymoney_common ) install(FILES xmlstorage.rc DESTINATION "${KXMLGUI_INSTALL_DIR}/xmlstorage") # install(FILES kmymoney-xmlstorageplugin.desktop # DESTINATION ${SERVICETYPES_INSTALL_DIR} # ) # if(BUILD_TESTING) # add_subdirectory(tests) # endif() diff --git a/kmymoney/settings/CMakeLists.txt b/kmymoney/settings/CMakeLists.txt index 0fb00ceed..e053cf999 100644 --- a/kmymoney/settings/CMakeLists.txt +++ b/kmymoney/settings/CMakeLists.txt @@ -1,35 +1,33 @@ kconfig_add_kcfg_files( kmm_settings_SRCS kmymoneysettings.kcfgc ) add_library(kmm_settings SHARED ${kmm_settings_SRCS}) -target_compile_features(kmm_settings PUBLIC cxx_nullptr PRIVATE cxx_decltype cxx_lambdas cxx_constexpr cxx_range_for) - set_target_properties(kmm_settings PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR} ) generate_export_header(kmm_settings BASE_NAME kmm_settings) target_link_libraries(kmm_settings PRIVATE KF5::ConfigWidgets) set(kmm_settings_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/kmm_settings_export.h ${CMAKE_CURRENT_BINARY_DIR}/kmymoneysettings.h kmymoneysettings_addons.h) install(TARGETS kmm_settings ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} ) install(FILES kmymoney.kcfg DESTINATION ${KCFG_INSTALL_DIR} ) install(FILES kmymoney.upd DESTINATION ${KCONF_UPDATE_INSTALL_DIR} ) install(FILES ${kmm_settings_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/kmymoney COMPONENT Devel)