summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-10-07 05:04:42 (GMT)
committerMontel Laurent <montel@kde.org>2016-10-07 05:04:42 (GMT)
commitce7f4f09a2e5d65296cb3782e890bd8f35334ff4 (patch)
tree33a077a1c905bd3b0d965f18d369b1e5449ea013
parent6a74866b315dafaf6df157acdb5d2e96deacad57 (diff)
Create lib
-rw-r--r--kaddressbookimportexport/CMakeLists.txt34
-rw-r--r--kaddressbookimportexport/KF5KaddressbookImportExportConfig.cmake.in3
-rw-r--r--kaddressbookimportexport/src/CMakeLists.txt76
3 files changed, 113 insertions, 0 deletions
diff --git a/kaddressbookimportexport/CMakeLists.txt b/kaddressbookimportexport/CMakeLists.txt
index febd4f0..55b781f 100644
--- a/kaddressbookimportexport/CMakeLists.txt
+++ b/kaddressbookimportexport/CMakeLists.txt
@@ -1 +1,35 @@
+project(kaddressbookimportexport)
+ecm_setup_version(${KDEPIM_APPS_LIB_VERSION} VARIABLE_PREFIX KADDRESSBOOKIMPORTEXPORT
+ VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kaddressbookimportexport_version.h"
+ PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5KaddressbookImportExportConfigVersion.cmake"
+ SOVERSION 5
+)
+
+########### Targets ###########
+
+add_definitions("-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII")
+
+########### CMake Config Files ###########
+set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5KaddressbookImportExport")
+
+ecm_configure_package_config_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/KF5KaddressbookImportExportConfig.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/KF5KaddressbookImportExportConfig.cmake"
+ INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
+)
+
+install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/KF5KaddressbookImportExportConfig.cmake"
+ "${CMAKE_CURRENT_BINARY_DIR}/KF5KaddressbookImportExportConfigVersion.cmake"
+ DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
+ COMPONENT Devel
+)
+
+install(EXPORT KF5KaddressbookImportExportTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5KaddressbookImportExportTargets.cmake NAMESPACE KF5::)
+
+install(FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/kaddressbookimportexport_version.h
+ DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5} COMPONENT Devel
+)
+
add_subdirectory(src)
diff --git a/kaddressbookimportexport/KF5KaddressbookImportExportConfig.cmake.in b/kaddressbookimportexport/KF5KaddressbookImportExportConfig.cmake.in
new file mode 100644
index 0000000..c42e8b4
--- /dev/null
+++ b/kaddressbookimportexport/KF5KaddressbookImportExportConfig.cmake.in
@@ -0,0 +1,3 @@
+@PACKAGE_INIT@
+
+include("${CMAKE_CURRENT_LIST_DIR}/KF5KaddressbookImportExportTargets.cmake")
diff --git a/kaddressbookimportexport/src/CMakeLists.txt b/kaddressbookimportexport/src/CMakeLists.txt
index 6c7957a..686cadb 100644
--- a/kaddressbookimportexport/src/CMakeLists.txt
+++ b/kaddressbookimportexport/src/CMakeLists.txt
@@ -1 +1,77 @@
+add_definitions( -DQT_NO_CAST_FROM_ASCII )
+add_definitions( -DQT_NO_CAST_TO_ASCII )
add_definitions(-DTRANSLATION_DOMAIN=\"libkaddressbookimportexport\")
+
+set(kaddressbook_importexport_LIB_SRCS
+ kaddressbookimportexportplugin.cpp
+)
+
+add_library(KF5KaddressbookImportExport ${kaddressbook_importexport_LIB_SRCS})
+generate_export_header(KF5KaddressbookImportExport BASE_NAME kaddressbook_importexport)
+
+add_library(KF5::KaddressbookImportExport ALIAS KF5KaddressbookImportExport)
+
+target_include_directories(KF5KaddressbookImportExport INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/KaddressbookImportExport/;${KDE_INSTALL_INCLUDEDIR_KF5}/kaddressbookimportexport>")
+target_include_directories(KF5KaddressbookImportExport PUBLIC "$<BUILD_INTERFACE:${kaddressbookimportexport_SOURCE_DIR}/src;${kaddressbookimportexport_BINARY_DIR}/src;${Grantlee_INCLUDE_DIRS}>")
+
+
+target_link_libraries(KF5KaddressbookImportExport
+PRIVATE
+ KF5::ConfigWidgets
+ KF5::Service
+ KF5::IconThemes
+ KF5::I18n
+ KF5::PimCommon
+)
+
+set_target_properties(KF5KaddressbookImportExport PROPERTIES
+ VERSION ${KADDRESSBOOKGRANTLEE_VERSION_STRING}
+ SOVERSION ${KADDRESSBOOKGRANTLEE_SOVERSION}
+ EXPORT_NAME KaddressbookImportExport
+)
+
+install(TARGETS
+ KF5KaddressbookImportExport
+ EXPORT KF5KaddressbookImportExportTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS} ${LIBRARY_NAMELINK}
+)
+
+
+
+# ecm_generate_headers(KaddressbookImportExport_CamelCaseprinting_HEADERS
+# HEADER_NAMES
+# GrantleePrint
+# REQUIRED_HEADERS KaddressbookImportExport_printing_HEADERS
+# RELATIVE printing
+# PREFIX KaddressbookImportExport
+# )
+
+ecm_generate_pri_file(BASE_NAME KaddressbookImportExport
+ LIB_NAME KF5KaddressbookImportExport
+ DEPS "Grantlee5" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5}/KaddressbookImportExport
+)
+
+
+# install(FILES
+# ${KaddressbookImportExport_CamelCasewidgets_HEADERS}
+# ${KaddressbookImportExport_CamelCaseformatter_HEADERS}
+# ${KaddressbookImportExport_CamelCaseprinting_HEADERS}
+# DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/KaddressbookImportExport
+# COMPONENT Devel
+# )
+
+# install(FILES
+# ${KaddressbookImportExport_HEADERS}
+# ${KaddressbookImportExport_widgets_HEADERS}
+# ${CMAKE_CURRENT_BINARY_DIR}/kaddressbook_grantlee_export.h
+# ${KaddressbookImportExport_formatter_HEADERS}
+# ${KaddressbookImportExport_printing_HEADERS}
+# DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/kaddressbookimportexport
+# COMPONENT Devel
+# )
+
+install(FILES
+ ${PRI_FILENAME}
+ DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
+
+
+