CMakeLists.txt 935 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11
option(WITH_GARFIELD "Build with Garfield for electron drift in non-uniform field" OFF)

#IMPORTANT::IF CHANGING ABOVE OPTION DELETE CMakeCache IN nps FOR IT TO TAKE AFFECT. IF UPLOADING TO GIT SET THIS OPTION TO OFF, OTHERWISE A FULL COMPILATION OFF ALL DETECTORS IN NPTOOLS WILL REQUIRE GARFIELD!!! 

if(WITH_GARFIELD)
find_package(Garfield REQUIRED)
include_directories($ENV{GARFIELD_HOME}/Include)
link_directories($ENV{GARFIELD_HOME}/Library)
file(GLOB headers $ENV{GARFIELD_HOME}/Include/*.hh)
endif()

Warren's avatar
Warren committed
12
add_library(NPSTACTIC SHARED  TACTIC.cc TACTICScorer.cc)
13 14

if(WITH_GARFIELD)
15
target_link_libraries(NPSTACTIC NPSCore ${ROOT_LIBRARIES} ${Geant4_LIBRARIES} ${NPLib_LIBRARIES} -lNPTACTIC /Users/warren/garfieldpp/install/lib/libGarfield.0.3.0.dylib /Users/warren/garfieldpp/install/lib/libGarfield.dylib) 
16
else()
Warren's avatar
Warren committed
17
target_link_libraries(NPSTACTIC NPSCore ${ROOT_LIBRARIES} ${Geant4_LIBRARIES} ${NPLib_LIBRARIES} -lNPTACTIC)
18
endif()