forked from root-project/root
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rootcintrule.pri
116 lines (99 loc) · 3.45 KB
/
rootcintrule.pri
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
#
# author Valeri Fine (fine@bnl.gov)
#-------------------------------------------------------------------------
# Qmake include file to add the rules to create RootCint Dictionary
#-------------------------------------------------------------------------
#
# $Id: rootcintrule.pri,v 1.20 2008/09/25 22:19:24 fine Exp $
#
# Copyright (C) 2002 by Valeri Fine. All rights reserved.
#
#-------------------------------------------------------------------------
#
##
# Usage: (aux file for rootcint.pri qmake include file)
# -----
# Defines the qmake rule generate the RootCint dictionary with qmake
#
# This is the "private" qmake include file.
# It should NOT be used alone.
#
# USE "rootcint.pri" instead
#-------------------------------------------------------------------------------------
# 1. Include this file into your project with QMAKE include statement:
#
# !exists ($$(ROOTSYS)/include/rootcintrule.pri){
# message "The rootcintrules.pri was not found"
# }
# exists ($$(ROOTSYS)/include/rootcintrule.pri){
# include ($$(ROOTSYS)/include/rootcintrule.pri)
# }
#
# 2. Provide the list of the class header files followed by the appropriated LinkDef.h file
# within your prpoject with CREATE_ROOT_DICT_FOR_CLASSES QMAKE variable
# -----------------------------------------------
#
# For example
#
# . . .
# !exists ($$(ROOTSYS)/include/rootcintrule.pri){
# message "The rootcintrule.pri was not found"
# }
# exists ($$(ROOTSYS)/include/rootcintrule.pri){
# include ($(ROOTSYS)/include/rootcintrule.pri)
# CREATE_ROOT_DICT_FOR_CLASSES = ${HEADERS} MyParticle.h MyDetector.h MyEvent.h ShowerMain.h
# CREATE_ROOT_DICT_FOR_CLASSES *= ${HEADERS} RSLinkDef.h
# }
# . . .
# -----------------------------------------------
#
# 3. Run "qmake"
# 4. Run "make"
#
# -----------------------------------------------
# define whether the current QMake is from Qt4 distribution
MYVERSION = $$[QMAKE_VERSION]
ISQT4 = $$find(MYVERSION, ^[2-9])
win32 {
# Required to use dynamic_cast
CONFIG *= rtti
}
include__File = $$(QTROOTSYSDIR)/include
exists ( $$include__File ){
DEPENDPATH *= $(QTROOTSYSDIR)/include
win32 {
INCLUDEPATH *= "%QTROOTSYSDIR%/include"
}
unix {
INCLUDEPATH *= "$(QTROOTSYSDIR)/include"
}
}
include__File = $$(ROOTSYS)/include
exists ($$include__File){
DEPENDPATH *= $(ROOTSYS)/include
win32 {
INCLUDEPATH *= "%ROOTSYS%/include"
}
unix {
INCLUDEPATH *= "$(ROOTSYS)/include"
}
}
!isEmpty( CREATE_ROOT_DICT_FOR_CLASSES ) {
DICTDEFINES += -DQT_VERSION=0x30000
QT_VERSION=$$[QT_VERSION]
contains( QT_VERSION, "^4.*" ) {
DICTDEFINES -= -DQT_VERSION=0x30000
DICTDEFINES *= -DQT_VERSION=0x40000
}
ROOT_CINT_TARGET = $${TARGET}
SOURCES *= $${ROOT_CINT_TARGET}Dict.cxx
rootcint.target = $${ROOT_CINT_TARGET}Dict.cxx
win32: rootcint.commands +="$$(ROOTSYS)\bin\rootcint.exe"
unix: rootcint.commands +=$(ROOTSYS)/bin/rootcint
rootcint.commands += -f $$rootcint.target -c -p $$DICTDEFINES $(INCPATH) $$CREATE_ROOT_DICT_FOR_CLASSES
rootcint.depends = $$CREATE_ROOT_DICT_FOR_CLASSES
rootcintecho.commands = @echo "Generating dictionary $$rootcint.target for $$CREATE_ROOT_DICT_FOR_CLASSES classes"
unix: QMAKE_EXTRA_UNIX_TARGETS += rootcintecho rootcint
win32: QMAKE_EXTRA_WIN_TARGETS += rootcintecho rootcint
QMAKE_CLEAN += $${ROOT_CINT_TARGET}Dict.cxx $${ROOT_CINT_TARGET}Dict.h
}