@@ -47,6 +47,10 @@ if(NOT DEFINED ENV{SIMPATH})
47
47
endif (NOT DEFINED ENV{SIMPATH} )
48
48
set (SIMPATH $ENV{SIMPATH} )
49
49
50
+ if (SIMPATH )
51
+ set (CMAKE_PREFIX_PATH ${SIMPATH} ${CMAKE_PREFIX_PATH} )
52
+ endif ()
53
+
50
54
if (NOT DEFINED ENV{FAIRROOTPATH} )
51
55
message (
52
56
FATAL_ERROR
@@ -75,20 +79,15 @@ option(WITH_FRS "Build FRS" OFF)
75
79
option (WITH_ASYEOS "Build ASYEOS" OFF )
76
80
option (BUILD_C3W "Build C3W" OFF )
77
81
78
- find_package (FairCMakeModules 1.0.0 QUIET )
79
- if (FairCMakeModules_FOUND )
80
- include (FairFindPackage2 )
81
- include (FairFormattedOutput )
82
- else ()
83
- message (STATUS "Could not find FairCMakeModules. "
84
- "It is recommended to install https://github.com/FairRootGroup/FairCMakeModules" )
82
+ find_package (FairCMakeModules 1.0.0 CONFIG REQUIRED )
83
+ if (NOT FairCMakeModules_FOUND )
84
+ message (FATAL_ERROR "Could not find FairCMakeModules! " )
85
85
endif ()
86
86
87
- if (COMMAND find_package2 )
88
- find_package2 (PUBLIC FairRoot VERSION 18.6.4 QUIET )
89
- else ()
90
- find_package (FairRoot )
91
- endif ()
87
+ include (FairFindPackage2 )
88
+ include (FairFormattedOutput )
89
+
90
+ find_package2 (PUBLIC FairRoot REQUIRED )
92
91
93
92
# FairRoot_VERSION is eventually set by find_package, for now let's set it explicitly
94
93
execute_process (
@@ -108,10 +107,6 @@ endif()
108
107
# added a variable to point to r3broot path in the system
109
108
set (R3BROOTPATH ${CMAKE_INSTALL_PREFIX} )
110
109
111
- if (SIMPATH )
112
- set (CMAKE_PREFIX_PATH ${SIMPATH} ${CMAKE_PREFIX_PATH} )
113
- endif ()
114
-
115
110
# Load some basic macros which are needed later on
116
111
include (FairMacros )
117
112
0 commit comments