summaryrefslogtreecommitdiffstats
path: root/languages/cpp/app_templates/kscons_kxt/SConscript-src
blob: bc91cc0ba2ae67cf67fa79bdfe59ce5d6e67a0a5 (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
#! /usr/bin/env python
# SConscript for %{APPNAMELC} compilation and installation

############################
## Configuration

## use the environment set in the top-level
## SConstruct file

Import('env')
myenv=env.Copy()

#############################
## Programs to build

%{APPNAMELC}_sources="""
settings.kcfgc
main.cpp
prefs.cpp
%{APPNAMELC}.skel
%{APPNAMELC}.cpp
%{APPNAMELC}view.cpp
prefs-base.ui
%{APPNAMELC}view_base.ui
"""

# Our main program
# KDEprogram add the file to the install targets automatically,
# so you do not need to write myenv.KDEinstall( env['KDEBIN'], %{APPNAMELC})
myenv.KDEprogram( "%{APPNAMELC}", %{APPNAMELC}_sources )

############################
## Customization

## Additional include paths for compiling the source files
## Always add '../' (top-level directory) because tqmoc makes code that needs it
myenv.KDEaddpaths_includes( "./ ../" )

## Necessary libraries to link against
myenv.KDEaddlibs( "qt-mt kio kdecore kdeprint" )

## This shows how to add other link flags to the program
# myenv.KDEaddflags_link('-export-dynamic')

## If you are using QThread, add this line
# myenv.KDEaddflags_link( '-DQT_THREAD_SUPPORT' )

#############################
## Installation

## NOTE 1: The program is installed automatically
## NOTE 2: KDEinstall( resource_type, subdirectory, list_of_files )

## The ui.rc file and the tips go into datadir/appname/
myenv.KDEinstall( 'KDEDATA', '/%{APPNAMELC}', '%{APPNAMELC}ui.rc' )
myenv.KDEinstall( 'KDEDATA', '/%{APPNAMELC}', 'tips' )

## The kcfg file is installed in a global kcfg directory
myenv.KDEinstall( 'KDEKCFG', '', '%{APPNAMELC}.kcfg' )

## Warning : there is a difference between the normal destop file used for the menu
##     and the servicetype desktop file, so they go in different directories
myenv.KDEinstall( 'KDEMENU', 'Utilities/', '%{APPNAMELC}.desktop' )

## Use this when you need to install a mimetype file
#myenv.KDEinstall( 'KDEMIME', 'application', 'x-%{APPNAMELC}.desktop' )

## Installing icons is easy (hi-16-app-%{APPNAMELC}.png, hi-22-app-%{APPNAMELC}.png)
#myenv.KDEicon()

## do not forget that this is a python script so even loops are allowed... :)