File: CMakeLists.txt

package info (click to toggle)
kde4libs 4:4.14.2-5+deb8u2
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 82,428 kB
  • ctags: 99,415
  • sloc: cpp: 761,864; xml: 12,344; ansic: 6,295; java: 4,060; perl: 2,938; yacc: 2,507; python: 1,207; sh: 1,179; ruby: 337; lex: 278; makefile: 29
file content (164 lines) | stat: -rw-r--r-- 5,905 bytes parent folder | download | duplicates (4)
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164

project(kdewidgets)

add_subdirectory( pics )
add_subdirectory( tests )

include_directories(
  ${KDE4_KIO_INCLUDES}
 )


########### next target ###############

set(makekdewidgets_SRCS makekdewidgets.cpp )


kde4_add_executable(makekdewidgets NOGUI ${makekdewidgets_SRCS})

target_link_libraries(makekdewidgets  ${KDE4_KDECORE_LIBS} )

# "export" this target too so we can use the LOCATION property of the imported target in
# FindKDE4Internal.cmake to get the full path to the installed executable instead of using FIND_PROGRAM(), Alex
install(TARGETS makekdewidgets  EXPORT kdelibsToolsTargets ${INSTALL_TARGETS_DEFAULT_ARGS} )


########### next target ###############

if(QT_QTDESIGNER_FOUND)
  # get the name of the generated wrapper script (which sets up LD_LIBRARY_PATH)
  get_target_property(MAKEKDEWIDGETS_EXECUTABLE makekdewidgets WRAPPER_SCRIPT)

  add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/kdewidgets.cpp
    COMMAND "${MAKEKDEWIDGETS_EXECUTABLE}" -o ${CMAKE_CURRENT_BINARY_DIR}/kdewidgets.cpp ${CMAKE_CURRENT_SOURCE_DIR}/kde.widgets
    MAIN_DEPENDENCY kde.widgets DEPENDS makekdewidgets)

  set(kdewidgets_PART_SRCS
     classpreviews.cpp
     ${CMAKE_CURRENT_BINARY_DIR}/kdewidgets.cpp
  )

  qt4_generate_moc(${CMAKE_CURRENT_BINARY_DIR}/kdewidgets.cpp ${CMAKE_CURRENT_BINARY_DIR}/kdewidgets.moc)


  qt4_add_resources(kdewidgets_PART_SRCS kdewidgets.qrc)

  kde4_add_plugin(kdewidgets ${kdewidgets_PART_SRCS})

  target_link_libraries(kdewidgets  ${KDE4_KIO_LIBS})
  if(NOT WIN32)
    set_target_properties(kdewidgets PROPERTIES
                                     INSTALL_RPATH_USE_LINK_PATH TRUE
                                     SKIP_BUILD_RPATH TRUE
                                     BUILD_WITH_INSTALL_RPATH TRUE
                         )
  endif(NOT WIN32)

  install(TARGETS kdewidgets  DESTINATION /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/qt4/plugins/designer )

  # deprecated widgets
  if(NOT KDE_NO_DEPRECATED)
    add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/kdedeprecated.cpp
      COMMAND "${MAKEKDEWIDGETS_EXECUTABLE}" -o ${CMAKE_CURRENT_BINARY_DIR}/kdedeprecated.cpp ${CMAKE_CURRENT_SOURCE_DIR}/kdedeprecated.widgets
      MAIN_DEPENDENCY kdedeprecated.widgets DEPENDS makekdewidgets)

    set(kdedeprecated_PART_SRCS
       classpreviews.cpp
       ${CMAKE_CURRENT_BINARY_DIR}/kdedeprecated.cpp
    )

    qt4_generate_moc(${CMAKE_CURRENT_BINARY_DIR}/kdedeprecated.cpp ${CMAKE_CURRENT_BINARY_DIR}/kdedeprecated.moc)


    qt4_add_resources(kdedeprecated_PART_SRCS kdedeprecated.qrc)

    kde4_add_plugin(kdedeprecated ${kdedeprecated_PART_SRCS})

    target_link_libraries(kdedeprecated  ${KDE4_KIO_LIBS})
    if(NOT WIN32)
      set_target_properties(kdedeprecated PROPERTIES
                                          INSTALL_RPATH_USE_LINK_PATH TRUE
                                          SKIP_BUILD_RPATH TRUE
                                          BUILD_WITH_INSTALL_RPATH TRUE
                           )
    endif(NOT WIN32)

    install(TARGETS kdedeprecated  DESTINATION /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/qt4/plugins/designer )
  endif(NOT KDE_NO_DEPRECATED)


  # kdewebkit widgets
  include_directories(
    ${CMAKE_SOURCE_DIR}/kdewebkit
  )

  add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/kdewebkitwidgets.cpp
    COMMAND "${MAKEKDEWIDGETS_EXECUTABLE}" -o ${CMAKE_CURRENT_BINARY_DIR}/kdewebkitwidgets.cpp ${CMAKE_CURRENT_SOURCE_DIR}/kdewebkit.widgets
    MAIN_DEPENDENCY kdewebkit.widgets DEPENDS makekdewidgets)

  set(kdewebkitwidgets_PART_SRCS
     classpreviews.cpp
     ${CMAKE_CURRENT_BINARY_DIR}/kdewebkitwidgets.cpp
  )

  qt4_generate_moc(${CMAKE_CURRENT_BINARY_DIR}/kdewebkitwidgets.cpp ${CMAKE_CURRENT_BINARY_DIR}/kdewebkitwidgets.moc)


  qt4_add_resources(kdewebkitwidgets_PART_SRCS kdewebkitwidgets.qrc)

  kde4_add_plugin(kdewebkitwidgets ${kdewebkitwidgets_PART_SRCS})

  target_link_libraries(kdewebkitwidgets ${KDE4_KDEUI_LIBS} ${KDE4_KDEWEBKIT_LIBS} ${QT_QTWEBKIT_LIBRARY})
  if(NOT WIN32)
    set_target_properties(kdewebkitwidgets PROPERTIES
                                     INSTALL_RPATH_USE_LINK_PATH TRUE
                                     SKIP_BUILD_RPATH TRUE
                                     BUILD_WITH_INSTALL_RPATH TRUE
                         )
  endif(NOT WIN32)

  install(TARGETS kdewebkitwidgets  DESTINATION /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/qt4/plugins/designer )


  if (QT_QT3SUPPORT_FOUND)

     include_directories(
       ${CMAKE_SOURCE_DIR}/kde3support
       ${CMAKE_SOURCE_DIR}/kde3support/kdeui
     )

     add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/kde3supportwidgets.cpp
       COMMAND "${MAKEKDEWIDGETS_EXECUTABLE}" -o ${CMAKE_CURRENT_BINARY_DIR}/kde3supportwidgets.cpp ${CMAKE_CURRENT_SOURCE_DIR}/kde3support.widgets
       MAIN_DEPENDENCY kde3support.widgets DEPENDS makekdewidgets)

     set(kde3supportwidgets_PART_SRCS
        classpreviews.cpp
        ${CMAKE_CURRENT_BINARY_DIR}/kde3supportwidgets.cpp
     )

     qt4_generate_moc(${CMAKE_CURRENT_BINARY_DIR}/kde3supportwidgets.cpp ${CMAKE_CURRENT_BINARY_DIR}/kde3supportwidgets.moc)


     qt4_add_resources(kde3supportwidgets_PART_SRCS kde3supportwidgets.qrc)

     kde4_add_plugin(kde3supportwidgets ${kde3supportwidgets_PART_SRCS})

     target_link_libraries(kde3supportwidgets ${KDE4_KDE3SUPPORT_LIBS} ${KDE4_KIO_LIBS})
     if(NOT WIN32)
        set_target_properties(kde3supportwidgets PROPERTIES
                                     INSTALL_RPATH_USE_LINK_PATH TRUE
                                     SKIP_BUILD_RPATH TRUE
                                     BUILD_WITH_INSTALL_RPATH TRUE
                             )
     endif(NOT WIN32)

     install(TARGETS kde3supportwidgets  DESTINATION /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/qt4/plugins/designer )
  endif (QT_QT3SUPPORT_FOUND)
endif (QT_QTDESIGNER_FOUND)

########### install files ###############