Completely reengineered version of CMake build system (Johny)
[u/mrichter/AliRoot.git] / cmake / FindGEANT3.cmake
CommitLineData
6db31708 1# AliRoot Build System Module to find and configure GEANT3
2#
3# Author: Johny Jose (johny.jose@cern.ch)
4# Port of previous Makefile build to cmake
5
6cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
7
8ALICE_RootConfig(GEANT3_PLATFORM --arch)
9
10find_path(GEANT3_SYSTEM_DIR NAMES TGeant3 PATHS ${ALICE}/geant3)
11message(STATUS "GEANT3 system directory: ${GEANT3_SYSTEM_DIR}")
12
13find_path(GEANT3_INCLUDE_DIR NAMES TGeant3.h PATHS ${ALICE}/geant3/TGeant3)
14message(STATUS "GEANT3 include directory: ${GEANT3_INCLUDE_DIR}")
15set(GEANT3_ROOT ${GEANT3_INCLUDE_DIR})
16
17find_path(GEANT3_LIBRARY_DIR NAMES libgeant321.so PATHS ${ALICE}/geant3/lib/tgt_${GEANT3_PLATFORM})
18message(STATUS "GEANT3 library directory: ${GEANT3_LIBRARY_DIR}")
19
20find_library(GEANT3_LIB NAMES geant321 PATHS ${ALICE}/geant3/lib/tgt_${GEANT3_PLATFORM})
21
22if (GEANT3_INCLUDE_DIR AND GEANT3_LIB AND GEANT3_SYSTEM_DIR)
23 set(GEANT3_FOUND TRUE)
24endif (GEANT3_INCLUDE_DIR AND GEANT3_LIB AND GEANT3_SYSTEM_DIR)
25
26if (GEANT3_FOUND)
27 message(STATUS "GEANT3 found")
28else()
29 message(STATUS "GEANT3 not found")
30endif (GEANT3_FOUND)