summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Seibert <stan@mtrr.org>2013-02-01 12:38:04 -0500
committertlatorre <tlatorre@uchicago.edu>2021-05-09 08:42:39 -0700
commit0b338ee6e4dbbd1b41f5c3856b3c36d1578c135a (patch)
treeca797db2e56546c1d9986d2f042a7bbdbf0ce5a3
parent390ac46b0514cf617f990e959f78de6653c6d509 (diff)
downloadchroma-0b338ee6e4dbbd1b41f5c3856b3c36d1578c135a.tar.gz
chroma-0b338ee6e4dbbd1b41f5c3856b3c36d1578c135a.tar.bz2
chroma-0b338ee6e4dbbd1b41f5c3856b3c36d1578c135a.zip
Check for and include CLHEP libraries to support users working with
GEANT4 built with separate CLHEP libraries.
-rw-r--r--setup.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index cbe01e1..8d5a9f7 100644
--- a/setup.py
+++ b/setup.py
@@ -19,6 +19,11 @@ def check_output(*popenargs, **kwargs):
geant4_cflags = check_output(['geant4-config','--cflags']).split()
geant4_libs = check_output(['geant4-config','--libs']).split()
+# For GEANT4.9.4 built without cmake
+try:
+ clhep_libs = check_output(['clhep-config','--libs']).split()
+except OSError:
+ clhep_libs = []
include_dirs=['src']
if 'VIRTUAL_ENV' in os.environ:
@@ -43,14 +48,14 @@ setup(
['src/G4chroma.cc'],
include_dirs=include_dirs,
extra_compile_args=geant4_cflags,
- extra_link_args=geant4_libs,
+ extra_link_args=geant4_libs+clhep_libs,
libraries=['boost_python'],
),
Extension('chroma.generator.mute',
['src/mute.cc'],
include_dirs=include_dirs,
extra_compile_args=geant4_cflags,
- extra_link_args=geant4_libs,
+ extra_link_args=geant4_libs+clhep_libs,
libraries=['boost_python']),
],