summaryrefslogtreecommitdiffstats
path: root/cervisia/CMakeLists.txt
blob: b4f6f7c3ae4efbfe7ef728f586a57f149dfaa0a3 (plain)
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
#################################################
#
#  (C) 2010-2011 Serghei Amelian
#  serghei (DOT) amelian (AT) gmail.com
#
#  Improvements and feedback are welcome
#
#  This file is released under GPL >= 2
#
#################################################

project( cervisia )

add_subdirectory( cvsservice )
add_subdirectory( pics )

add_definitions( -D_BSD_SOURCE )

include_directories(
  ${CMAKE_CURRENT_BINARY_DIR}
  ${CMAKE_BINARY_DIR}/cervisia/cvsservice
  ${TDE_INCLUDE_DIR}
  ${TQT_INCLUDE_DIRS}
)

link_directories(
  ${TQT_LIBRARY_DIRS}
)


##### other data ################################

tde_install_icons( )

install( FILES
    cervisia.desktop
  DESTINATION ${XDG_APPS_INSTALL_DIR} )

install( FILES
    cervisiapart.kcfg
  DESTINATION ${KCFG_INSTALL_DIR} )

install( FILES
    cervisiaui.rc
  DESTINATION ${DATA_INSTALL_DIR}/cervisiapart )

install( FILES
    cervisiashellui.rc eventsrc
  DESTINATION ${DATA_INSTALL_DIR}/cervisia )

install( FILES
    cervisia.upd
  DESTINATION ${KCONF_UPDATE_INSTALL_DIR} )

install( PROGRAMS
    move_repositories.pl change_colors.pl
    cervisia-normalize_cvsroot.pl cervisia-change_repos_list.pl
  DESTINATION ${KCONF_UPDATE_INSTALL_DIR} )


macro( _pod2man )
  foreach( _pod ${ARGN} )
    add_custom_command(
      OUTPUT ${_pod}.1
      COMMAND pod2man ${CMAKE_CURRENT_SOURCE_DIR}/${_pod}.pod > ${_pod}.1.in
      COMMAND
        sed -e 's%_KDEHTMLDIR_%'${HTML_INSTALL_DIR}'%g;'
            -e 's%_KDECONFDIR_%'${CONFIG_INSTALL_DIR}'%g;'
            < ${_pod}.1.in > ${_pod}.1
      DEPENDS ${_pod}.pod )
    add_custom_target( "${_pod}-man" ALL DEPENDS ${_pod}.1 )
    install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${_pod}.1 DESTINATION ${MAN_INSTALL_DIR}/man1 )
  endforeach( )
endmacro()

_pod2man( cervisia )


##### cervisia (static) #########################

tde_add_library( cervisia STATIC_PIC AUTOMOC
  SOURCES
    annotatedlg.cpp diffdlg.cpp patchoptiondlg.cpp logdlg.cpp
    progressdlg.cpp progressdlg.skel resolvedlg.cpp resolvedlg_p.cpp
    annotateview.cpp diffview.cpp loglist.cpp logplainview.cpp
    logtree.cpp annotatectl.cpp loginfo.cpp misc.cpp qttableview.cpp
    tooltip.cpp cervisiasettings.kcfgc settingsdlg.cpp
    settingsdlg_advanced.ui
  DEPENDENCIES cvsservice-shared
)


##### libcervisiapart (module) ##################

tde_add_kpart( libcervisiapart AUTOMOC
  SOURCES
    updateview.cpp protocolview.cpp protocolview.skel watchdlg.cpp
    changelogdlg.cpp historydlg.cpp repositorydlg.cpp commitdlg.cpp
    checkoutdlg.cpp updatedlg.cpp tagdlg.cpp mergedlg.cpp cvsdir.cpp
    repositories.cpp cervisiapart.cpp addrepositorydlg.cpp
    addremovedlg.cpp watchersdlg.cpp updateview_items.cpp
    updateview_visitors.cpp entry.cpp entry_status.cpp stringmatcher.cpp
    cvsinitdlg.cpp ignorelistbase.cpp dirignorelist.cpp
    globalignorelist.cpp editwithmenu.cpp logmessageedit.cpp
  LINK cervisia-static cvsservice-shared kutils-shared
  DESTINATION ${PLUGIN_INSTALL_DIR}
)


##### cervisia (tdeinit) ########################

tde_add_tdeinit_executable( cervisia AUTOMOC
  SOURCES
    main.cpp cervisiashell.cpp
  LINK cervisia-static cvsservice-shared kutils-shared
)


##### install import cmake modules ###############

tde_install_export( )