diff options
author | Stan Seibert <stan@mtrr.org> | 2013-02-01 12:38:04 -0500 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2021-05-09 08:42:39 -0700 |
commit | 0b338ee6e4dbbd1b41f5c3856b3c36d1578c135a (patch) | |
tree | ca797db2e56546c1d9986d2f042a7bbdbf0ce5a3 /setup.py | |
parent | 390ac46b0514cf617f990e959f78de6653c6d509 (diff) | |
download | chroma-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.
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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']), ], |