File: CMakeLists.txt

package info (click to toggle)
nepomuk-widgets 4:4.13.1-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 908 kB
  • ctags: 386
  • sloc: cpp: 3,302; ansic: 13; makefile: 5; sh: 4
file content (122 lines) | stat: -rw-r--r-- 3,962 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
project(nepomuk-widgets)
# set_package_properties appeared in cmake 2.8.6
# TODO: Remove when kdelibs >= 4.10 will be required
cmake_minimum_required(VERSION 2.8.6 FATAL_ERROR)

set(CMAKE_NEPOMUK_WIDGETS_VERSION_MAJOR 0)
set(CMAKE_NEPOMUK_WIDGETS_VERSION_MINOR 1)
set(CMAKE_NEPOMUK_WIDGETS_VERSION_RELEASE 0)
set(CMAKE_NEPOMUK_WIDGETS_VERSION_STRING "${CMAKE_NEPOMUK_WIDGETS_VERSION_MAJOR}.${CMAKE_NEPOMUK_WIDGETS_VERSION_MINOR}.${CMAKE_NEPOMUK_WIDGETS_VERSION_RELEASE}")

# Search for the required packages
# ================================
find_package(KDE4 4.9.4 REQUIRED)
include(KDE4Defaults)

find_package(Soprano)
set_package_properties(Soprano PROPERTIES DESCRIPTION "Qt-based RDF storage and parsing solution" URL "http://soprano.sourceforge.net" TYPE REQUIRED)

find_package(NepomukCore)
set_package_properties(NepomukCore PROPERTIES DESCRIPTION "The core Nepomuk libraries" URL "http://nepomuk.kde.org" TYPE REQUIRED PURPOSE "Required for running Nepomuk")

feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)

# Some definitions
# ================
add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)

include_directories(
  ${QT_INCLUDES}
  ${KDE4_INCLUDES}
  ${SOPRANO_INCLUDE_DIR}
  ${NEPOMUK_CORE_INCLUDE_DIR}
  ${CMAKE_SOURCE_DIR}
  ${CMAKE_SOURCE_DIR}/ui
  ${CMAKE_SOURCE_DIR}/utils
)


# generate NepomukWidgetsConfig.cmake for easy utilisation of the package by other cmake build systems
# ===============================================================================================
configure_file(NepomukWidgetsConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/NepomukWidgetsConfig.cmake @ONLY)

# Generate NepomukWidgetsConfigVersion.cmake
macro_write_basic_cmake_version_file(${CMAKE_CURRENT_BINARY_DIR}/NepomukWidgetsConfigVersion.cmake
                                     ${CMAKE_NEPOMUK_WIDGETS_VERSION_MAJOR}
                                     ${CMAKE_NEPOMUK_WIDGETS_VERSION_MINOR}
                                     ${CMAKE_NEPOMUK_WIDGETS_VERSION_RELEASE}
                                     )
install(FILES
    ${CMAKE_CURRENT_BINARY_DIR}/NepomukWidgetsConfig.cmake
    ${CMAKE_CURRENT_BINARY_DIR}/NepomukWidgetsConfigVersion.cmake
    DESTINATION ${LIB_INSTALL_DIR}/cmake/NepomukWidgets)

set(nepomuk_ui_SRCS
  ui/kblocklayout.cpp
  ui/tagwidget.cpp
  ui/kedittagsdialog.cpp
  ui/tagcheckbox.cpp
  ui/filemetadatawidget.cpp
  ui/filemetadataconfigwidget.cpp
  ui/filemetadataprovider.cpp
  ui/resourceloader.cpp
  ui/indexeddataretriever.cpp
  ui/kcommentwidget.cpp
  ui/knfotranslator.cpp
  ui/metadatafilter.cpp
  ui/widgetfactory.cpp
)

set(nepomukutils_SRCS
  utils/resourcemodel.cpp
)

set(nepomukwidgets_SRCS ${nepomuk_ui_SRCS} ${nepomukutils_SRCS})

kde4_add_library(nepomukwidgets SHARED ${LIBRARY_TYPE} ${nepomukwidgets_SRCS})

target_link_libraries(nepomukwidgets
  ${QT_QTCORE_LIBRARY}
  ${QT_QTGUI_LIBRARY}
  ${QT_QTDBUS_LIBRARY}
  ${KDE4_KDECORE_LIBS}
  ${KDE4_KDEUI_LIBS}
  ${KDE4_KIO_LIBS}
  ${SOPRANO_LIBRARIES}
  ${NEPOMUK_CORE_LIBRARY}
)

target_link_libraries(nepomukwidgets
  LINK_INTERFACE_LIBRARIES
  ${KDE4_KDECORE_LIBS}
  ${KDE4_KDEUI_LIBS}
  ${SOPRANO_LIBRARIES}
)

set_target_properties(nepomukwidgets PROPERTIES
   VERSION ${GENERIC_LIB_VERSION}
   SOVERSION ${GENERIC_LIB_SOVERSION}
)

install(TARGETS nepomukwidgets EXPORT NepomukWidgetsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})

install(FILES
  nepomukwidgets_export.h
  ui/tagwidget.h
  ui/filemetadatawidget.h
  ui/filemetadataconfigwidget.h
  utils/resourcemodel.h

  DESTINATION ${INCLUDE_INSTALL_DIR}/nepomuk2 COMPONENT Devel
)

add_subdirectory(test)

# install the file with the exported targets
install(EXPORT NepomukWidgetsLibraryTargets
        DESTINATION ${LIB_INSTALL_DIR}/cmake/NepomukWidgets
        FILE NepomukWidgetsTargetsWithPrefix.cmake
        )

include(/usr/share/pkg-kde-tools/cmake/DebianABIManager.cmake)