|
@@ -3,7 +3,17 @@ cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
|
|
|
project(MpdFlow)
|
|
|
|
|
|
#---Add PicoDst submodule with PicoDst shared library
|
|
|
-add_subdirectory(PicoDst)
|
|
|
+find_library(PicoDst NAMES PicoDst PATHS ${PICO_DST_BIN})
|
|
|
+if (PicoDst)
|
|
|
+ # If PicoDst is already installed, use the installed one
|
|
|
+ message(STATUS "PicoDst is found: ${PicoDst}")
|
|
|
+endif()
|
|
|
+if (NOT PicoDst)
|
|
|
+ # If PicoDst is not found in the system, compile it now
|
|
|
+ message(STATUS "PicoDst is not found: Compiling it from the submodule")
|
|
|
+ add_subdirectory(PicoDst)
|
|
|
+ set (PicoDst PicoDst)
|
|
|
+endif()
|
|
|
|
|
|
# You need to tell CMake where to find the ROOT installation. This can be done
|
|
|
# in a number of ways:
|
|
@@ -54,7 +64,7 @@ set(MPD_FLOW_INCLUDE_DIRECTORIES
|
|
|
include_directories(${MPD_FLOW_INCLUDE_DIRECTORIES})
|
|
|
|
|
|
set(MPD_FLOW_INCLUDE_LIBRARIES
|
|
|
- PicoDst
|
|
|
+ ${PicoDst}
|
|
|
${ROOT_LIBRARIES}
|
|
|
)
|
|
|
|