Skip to content

Commit e5d06ed

Browse files
committed
Add basic THijing as found in AliRoot
1 parent b12bf25 commit e5d06ed

File tree

6 files changed

+2290
-0
lines changed

6 files changed

+2290
-0
lines changed

THijing/CMakeLists.txt

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
2+
project(THijing C CXX Fortran)
3+
4+
# You need to tell CMake where to find the ROOT installation. This can be done in a number of ways:
5+
# - ROOT built with classic configure/make use the provided $ROOTSYS/etc/cmake/FindROOT.cmake
6+
# - ROOT built with CMake. Add in CMAKE_PREFIX_PATH the installation prefix for ROOT
7+
list(APPEND CMAKE_PREFIX_PATH $ENV{ROOTSYS})
8+
9+
#---Locate the ROOT package and defines a number of variables (e.g. ROOT_INCLUDE_DIRS)
10+
find_package(ROOT REQUIRED COMPONENTS EG)
11+
12+
#---Define useful ROOT functions and macros (e.g. ROOT_GENERATE_DICTIONARY)
13+
include(${ROOT_USE_FILE})
14+
15+
link_directories($ENV{HIJING_ROOT}/lib)
16+
17+
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/.)
18+
ROOT_GENERATE_DICTIONARY(G__THijing THijing.h LINKDEF THijingLinkDef.h)
19+
20+
#---Create a shared library with geneated dictionary
21+
add_library(THijing SHARED THijing.cxx openDecayTableHijing.F G__THijing.cxx)
22+
target_link_libraries(THijing ${ROOT_LIBRARIES} HIJING MICROCERN)
23+
24+
install(TARGETS THijing
25+
LIBRARY DESTINATION lib)
26+
27+
if (${ROOT_VERSION} VERSION_GREATER "6.0")
28+
install(
29+
FILES
30+
${CMAKE_CURRENT_BINARY_DIR}/libTHijing_rdict.pcm
31+
${CMAKE_CURRENT_BINARY_DIR}/libTHijing.rootmap
32+
DESTINATION lib)
33+
endif (${ROOT_VERSION} VERSION_GREATER "6.0")
34+
35+
if(${CMAKE_SYSTEM} MATCHES Darwin)
36+
set_target_properties(THijing PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
37+
endif(${CMAKE_SYSTEM} MATCHES Darwin)

0 commit comments

Comments
 (0)