@@ -29,7 +29,6 @@ include(${ROOT_USE_FILE})
29
29
# Locate sources and headers for this project
30
30
# ## NOT NEEDED FOR DICT
31
31
include_directories (${PROJECT_SOURCE_DIR} /include
32
- ${PROJECT_SOURCE_DIR} /../shared/include
33
32
${Geant4_INCLUDE_DIR}
34
33
${ROOT_INCLUDE_DIRS} )
35
34
@@ -38,11 +37,6 @@ include_directories(${PROJECT_SOURCE_DIR}/include
38
37
# in standard makefile, need to make rootcint anyway before standard make
39
38
#
40
39
41
- ADD_CUSTOM_TARGET (LinkDirectories ALL
42
- COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR} /include ${CMAKE_CURRENT_BINARY_DIR} /include
43
- COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR} /src ${CMAKE_CURRENT_BINARY_DIR} /src)
44
-
45
-
46
40
## WCSimRootDict.cxx regeneration by rootcint
47
41
## Use ROOT 5.34.32 as some issues with PARSE_ARGUMENTS were found in older ROOT versions (ROOT 5.34.11)
48
42
if ( ${ROOT_VERSION} GREATER_EQUAL 6 )
@@ -94,7 +88,7 @@ target_link_libraries(WCSimRoot ${ROOT_LIBRARIES})
94
88
# Create libWCSimRootDict.so (needed for ROOT6)
95
89
add_custom_command (TARGET WCSimRoot
96
90
POST_BUILD
97
- COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_BINARY_DIR} / libWCSimRoot.so ${CMAKE_CURRENT_BINARY_DIR} / libWCSimRootDict.so)
91
+ COMMAND ${CMAKE_COMMAND} -E create_symlink libWCSimRoot.so libWCSimRootDict.so)
98
92
99
93
if ( ${ROOT_VERSION} LESS 6 )
100
94
# Create Rootmap (not automatically done for ROOT5)
@@ -155,46 +149,35 @@ target_link_libraries(WCSim ${Geant4_LIBRARIES} ${ROOT_LIBRARIES} WCSimRoot Tree
155
149
# relies on these files being in the current working directory and then so
156
150
# that we can directly analyze the produced ROOT files, too.
157
151
#
158
- set (WCSIM_SCRIPTS
159
- macros /jobOptions.mac
160
- WCSim.mac
161
- macros /daq.mac
162
- macros /visOGLSX.mac
163
- macros /visOGLQT.mac
164
- macros /visRayTracer.mac
165
- macros /mPMT_nuPrism1.mac
166
- macros /mPMT_nuPrism2.mac
167
- macros /tuning_parameters.mac
168
- macros /NuPRISM.mac
169
- macros /mPMT_interesting1.mac
170
- macros /mPMT_interesting2_SKwCover.mac
171
- macros /mPMT_37pmtHK.mac
172
- macros /mPMT_radon_with_bias.mac
173
- macros /mPMT_radon_without_bias.mac
174
- biasprofile.dat
175
- tuningNominal.mac
176
- WCSim_hybrid.mac
177
- WCSim_hybrid.sh
178
- mPMT-configfiles/mPMTconfig_19_nuPrism.txt
179
- mPMT-configfiles/mPMTconfig_30_13_3.txt
180
- mPMT-configfiles/mPMTconfig_33_50.txt
181
- mPMT-configfiles/mPMTconfig_34_22.5_1.txt
182
- mPMT-configfiles/mPMTconfig_34_22_1.txt
183
- mPMT-configfiles/mPMTconfig_37_HK.txt
184
- mPMT-configfiles/mPMTconfig_19_nuPrism_3ring.txt
185
- mPMT-configfiles/mPMTconfig_33_13_1.txt
186
- mPMT-configfiles/mPMTconfig_33_50_1.txt
187
- mPMT-configfiles/mPMTconfig_34_22.5_2.txt
188
- mPMT-configfiles/mPMTconfig_34_22_2.txt
189
- )
190
-
191
- foreach (_file ${WCSIM_SCRIPTS} )
152
+ if (NOT (PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR ))
153
+ file (COPY ${PROJECT_SOURCE_DIR} /mPMT-configfiles DESTINATION ${PROJECT_BINARY_DIR} USE_SOURCE_PERMISSIONS)
154
+ file (COPY ${PROJECT_SOURCE_DIR} /macros DESTINATION ${PROJECT_BINARY_DIR} USE_SOURCE_PERMISSIONS)
155
+ # file(COPY ${PROJECT_SOURCE_DIR}/include DESTINATION ${PROJECT_BINARY_DIR} USE_SOURCE_PERMISSIONS)
156
+ set (WCSIM_FILES
157
+ WCSim.mac
158
+ biasprofile.dat
159
+ tuningNominal.mac
160
+ WCSim_hybrid.mac
161
+ WCSim_hybrid.sh
162
+ include /TJNuBeamFlux.hh
163
+ include /TNRooTrackerVtx.hh
164
+ include /WCSimEnumerations.hh
165
+ include /WCSimPmtInfo.hh
166
+ include /WCSimRootEvent.hh
167
+ include /WCSimRootGeom.hh
168
+ include /WCSimRootOptions.hh
169
+ include /WCSimRootTools.hh
170
+ )
171
+ foreach (_file ${WCSIM_FILES} )
192
172
configure_file (
193
173
${PROJECT_SOURCE_DIR} /${_file}
194
174
${PROJECT_BINARY_DIR} /${_file}
195
175
COPYONLY
196
176
)
197
177
endforeach ()
178
+ else ()
179
+ message (STATUS "Note: building in-place, no need to copy anything." )
180
+ endif ()
198
181
199
182
#----------------------------------------------------------------------------
200
183
# For internal Geant4 use - but has no effect if you build this
0 commit comments