Warning, /maui/mauikit-accounts/src/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 # SPDX-FileCopyrightText: 2020 Carl Schwan <carl@carlschwan.eu>
0002 #
0003 # SPDX-License-Identifier: BSD-2-Clause
0004 
0005 ecm_create_qm_loader(accounts_QM_LOADER libaccountsplugin_qt)
0006 
0007 set(
0008     sources
0009     code/accounts_plugin.cpp
0010     code/mauiaccounts.cpp
0011     code/accountsdb.cpp
0012     code/accounts.qrc
0013     ${accounts_QM_LOADER}
0014 )
0015 
0016 set(
0017     headers
0018     code/mauiaccounts.h
0019     code/accountsdb.h
0020 )
0021 
0022 set(
0023     pluginData
0024     controls/qmldir
0025 )
0026 
0027 if(QUICK_COMPILER)
0028     qtquick_compiler_add_resources(accounts_QML_QRC resources.qrc)
0029 else()
0030     qt5_add_resources(accounts_QML_QRC resources.qrc)
0031 endif()
0032 
0033 ecm_generate_qmltypes(org.mauikit.accounts ${PROJECT_VERSION}
0034                       DESTINATION ${KDE_INSTALL_QMLDIR}/org/mauikit/accounts)
0035 
0036 add_library(
0037     MauiKitAccounts
0038     SHARED
0039     ${sources} ${pluginData} ${accounts_QML_QRC}
0040 )
0041 
0042 add_library(MauiKit::Accounts ALIAS MauiKitAccounts)
0043 
0044 generate_export_header(MauiKitAccounts BASE_NAME Accounts)
0045 set_target_properties(MauiKitAccounts PROPERTIES
0046     VERSION ${Accounts_VERSION_STRING}
0047     SOVERSION ${Accounts_SOVERSION}
0048     EXPORT_NAME Accounts
0049 )
0050     
0051 target_include_directories(MauiKitAccounts
0052     INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR}/MauiKit/Accounts>")
0053     
0054 target_include_directories(MauiKitAccounts PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR};${CMAKE_CURRENT_BINARY_DIR};>")
0055 
0056 if(ANDROID)
0057     target_link_libraries(MauiKitAccounts PRIVATE Qt5::AndroidExtras )
0058 
0059 elseif(UNIX)
0060     target_link_libraries(
0061         MauiKitAccounts
0062 
0063         PRIVATE
0064         KF5::ConfigCore
0065         )
0066 endif()
0067 
0068 target_link_libraries(
0069     MauiKitAccounts
0070        
0071     PRIVATE
0072         Qt5::Core
0073         Qt5::Quick
0074         Qt5::Qml
0075         Qt5::Sql
0076         Qt5::Network
0077         KF5::I18n
0078         MauiKit
0079 )
0080 
0081 install(TARGETS MauiKitAccounts EXPORT MauiKitAccountsTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
0082 
0083 install(FILES
0084     ${headers} 
0085     ${CMAKE_CURRENT_BINARY_DIR}/accounts_export.h
0086     DESTINATION ${KDE_INSTALL_INCLUDEDIR}/MauiKit/Accounts
0087     COMPONENT Devel)
0088 
0089 if (BUILD_SHARED_LIBS)
0090     add_custom_target(copy_to_bin ALL
0091         COMMAND ${CMAKE_COMMAND} -E
0092                 make_directory ${CMAKE_BINARY_DIR}/bin/org/mauikit/accounts/
0093         COMMAND ${CMAKE_COMMAND} -E
0094                 copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/controls ${CMAKE_BINARY_DIR}/bin/org/mauikit/accounts/
0095         COMMAND ${CMAKE_COMMAND} -E
0096                 copy $<TARGET_FILE:MauiKitAccounts> ${CMAKE_BINARY_DIR}/bin/org/mauikit/accounts/
0097     )
0098 
0099     install(DIRECTORY controls/ DESTINATION ${KDE_INSTALL_QMLDIR}/org/mauikit/accounts)
0100 
0101     #include(ECMGeneratePriFile)
0102     #ecm_generate_pri_file(BASE_NAME KQuickImageEditor LIB_NAME KQuickImageEditor DEPS "core qml quick svg" FILENAME_VAR PRI_FILENAME )
0103     #install(FILES ${PRI_FILENAME}
0104             #DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
0105 
0106 endif()
0107 
0108 install(TARGETS MauiKitAccounts DESTINATION ${KDE_INSTALL_QMLDIR}/org/mauikit/accounts )