1 | #------------------------------------------------------------------------------ |
---|
2 | # sources.cmake |
---|
3 | # Module : G4UIbasic |
---|
4 | # Package: Geant4.src.G4interfaces.G4UIbasic |
---|
5 | # |
---|
6 | # Sources description for a library. |
---|
7 | # Lists the sources and headers of the code explicitely. |
---|
8 | # Lists include paths needed. |
---|
9 | # Lists the internal granular and global dependencies of the library. |
---|
10 | # Source specific properties should be added at the end. |
---|
11 | # |
---|
12 | # Generated on : 24/9/2010 |
---|
13 | # |
---|
14 | # $Id: sources.cmake,v 1.4 2010/11/29 17:04:04 bmorgan Exp $ |
---|
15 | # GEANT4 Tag $Name: geant4-09-04-ref-00 $ |
---|
16 | # |
---|
17 | #------------------------------------------------------------------------------ |
---|
18 | |
---|
19 | # List external includes needed. |
---|
20 | include_directories(${CLHEP_INCLUDE_DIRS}) |
---|
21 | |
---|
22 | # List internal includes needed. |
---|
23 | include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include) |
---|
24 | include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include) |
---|
25 | include_directories(${CMAKE_SOURCE_DIR}/source/interfaces/common/include) |
---|
26 | |
---|
27 | # |
---|
28 | # Module has optional sources |
---|
29 | # |
---|
30 | include(Geant4MacroDefineModule) |
---|
31 | |
---|
32 | # List those always built |
---|
33 | set(G4INTERFACES_BASIC_MODULE_HEADERS |
---|
34 | G4UIArrayString.hh |
---|
35 | G4UIExecutive.hh |
---|
36 | G4UIExecutive.icc |
---|
37 | G4UIcsh.hh |
---|
38 | G4UIterminal.hh |
---|
39 | G4VUIshell.hh) |
---|
40 | |
---|
41 | set(G4INTERFACES_BASIC_MODULE_SOURCES |
---|
42 | G4UIArrayString.cc |
---|
43 | G4UIcsh.cc |
---|
44 | G4UIterminal.cc |
---|
45 | G4VUIshell.cc) |
---|
46 | |
---|
47 | |
---|
48 | set(G4INTERFACES_BASIC_MODULE_LINK_LIBRARIES ) |
---|
49 | |
---|
50 | |
---|
51 | # |
---|
52 | # Tcsh only on UNIX style systems |
---|
53 | # |
---|
54 | if(UNIX) |
---|
55 | list(APPEND G4INTERFACES_BASIC_MODULE_HEADERS G4UItcsh.hh) |
---|
56 | list(APPEND G4INTERFACES_BASIC_MODULE_SOURCES G4UItcsh.cc) |
---|
57 | endif() |
---|
58 | |
---|
59 | |
---|
60 | # |
---|
61 | # Win32 terminal only on Win32 and if selected. |
---|
62 | # |
---|
63 | if(WIN32 AND GEANT4_USE_WIN32TERMINAL) |
---|
64 | list(APPEND G4INTERFACES_BASIC_MODULE_HEADERS G4UIWin32.hh) |
---|
65 | list(APPEND G4INTERFACES_BASIC_MODULE_SOURCES G4UIWin32.cc) |
---|
66 | endif() |
---|
67 | |
---|
68 | |
---|
69 | # |
---|
70 | # Qt only if selected. |
---|
71 | # |
---|
72 | if(GEANT4_USE_QT) |
---|
73 | list(APPEND G4INTERFACES_BASIC_MODULE_HEADERS G4UIQt.hh) |
---|
74 | list(APPEND G4INTERFACES_BASIC_MODULE_SOURCES G4UIQt.cc) |
---|
75 | |
---|
76 | # Now need to add Qt in to build moc wrappers |
---|
77 | include(${QT_USE_FILE}) |
---|
78 | |
---|
79 | # Add the moc sources - must use an absolute path to the files being |
---|
80 | # wrapped |
---|
81 | QT4_WRAP_CPP(G4INTERFACES_MOC_SOURCES |
---|
82 | ${CMAKE_SOURCE_DIR}/source/interfaces/basic/include/G4UIQt.hh |
---|
83 | OPTIONS -DG4UI_BUILD_QT_SESSION) |
---|
84 | |
---|
85 | list(APPEND G4INTERFACES_BASIC_MODULE_SOURCES ${G4INTERFACES_MOC_SOURCES}) |
---|
86 | |
---|
87 | # Add the definitions |
---|
88 | # We have to also add in G4INTY_BUILD_QT 'cause G4QT header needs that... |
---|
89 | GEANT4_ADD_COMPILE_DEFINITIONS(SOURCES G4UIQt.cc |
---|
90 | COMPILE_DEFINITIONS G4UI_BUILD_QT_SESSION;G4INTY_BUILD_QT) |
---|
91 | |
---|
92 | # and for the moc file... |
---|
93 | set_source_files_properties(${G4INTERFACES_MOC_SOURCES} |
---|
94 | PROPERTIES COMPILE_DEFINITIONS G4UI_BUILD_QT_SESSION) |
---|
95 | |
---|
96 | # Add the extra libraries - seem to need to quote variables to get |
---|
97 | # both linked in. |
---|
98 | list(APPEND G4INTERFACES_BASIC_MODULE_LINK_LIBRARIES |
---|
99 | "${QT_QTGUI_LIBRARY};${QT_QTCORE_LIBRARY}") |
---|
100 | endif() |
---|
101 | |
---|
102 | |
---|
103 | # |
---|
104 | # Xm and Xaw only on UNIX and if selected |
---|
105 | # |
---|
106 | if(UNIX) |
---|
107 | if(GEANT4_USE_XM) |
---|
108 | list(APPEND G4INTERFACES_BASIC_MODULE_HEADERS G4UIXm.hh) |
---|
109 | list(APPEND G4INTERFACES_BASIC_MODULE_SOURCES G4UIXm.cc) |
---|
110 | |
---|
111 | # Any other includes, libraries here |
---|
112 | endif() |
---|
113 | |
---|
114 | if(GEANT4_USE_XAW) |
---|
115 | list(APPEND G4INTERFACES_BASIC_MODULE_HEADERS G4UIXaw.hh) |
---|
116 | list(APPEND G4INTERFACES_BASIC_MODULE_SOURCES G4UIXaw.cc) |
---|
117 | |
---|
118 | # Any other includes, libraries here |
---|
119 | endif() |
---|
120 | endif() |
---|
121 | |
---|
122 | |
---|
123 | |
---|
124 | |
---|
125 | |
---|
126 | # |
---|
127 | # Define the Geant4 Module. |
---|
128 | # |
---|
129 | GEANT4_DEFINE_MODULE(NAME G4UIbasic |
---|
130 | HEADERS |
---|
131 | ${G4INTERFACES_BASIC_MODULE_HEADERS} |
---|
132 | SOURCES |
---|
133 | ${G4INTERFACES_BASIC_MODULE_SOURCES} |
---|
134 | GRANULAR_DEPENDENCIES |
---|
135 | G4UIcommon |
---|
136 | G4globman |
---|
137 | G4intercoms |
---|
138 | GLOBAL_DEPENDENCIES |
---|
139 | G4global |
---|
140 | G4intercoms |
---|
141 | LINK_LIBRARIES |
---|
142 | ${G4INTERFACES_BASIC_MODULE_LINK_LIBRARIES} |
---|
143 | ) |
---|
144 | |
---|
145 | # List any source specific properties here |
---|
146 | |
---|