Commit 4193e78e authored by Jens Kroeger's avatar Jens Kroeger
Browse files

reverted deletion of FindEUDAQ2.cmake and CMakeLists.txt

parent b55194b5
# - Try to find the EUDAQ2 framework
# Once done this will define
# EUDAQ2_FOUND - System has EUDAQ2
# EUDAQ2_INCLUDE_DIR - The EUDAQ2 main include directories
# EUDAQ2_LIBRARY - The libraries needed to use EUDAQ2
MESSAGE(STATUS "Looking for EUDAQ2...")
FIND_PATH(EUDAQ2_INCLUDE_DIR NAMES "eudaq/FileReader.hh" PATHS "$ENV{EUDAQ2PATH}/include")
MESSAGE(STATUS "FileReader.hh => ${EUDAQ2_INCLUDE_DIR}")
IF(EUDAQ2_INCLUDE_DIR)
SET(EUDAQ2_INC_FOUND TRUE)
MESSAGE(STATUS "Found EUDAQ2 headers: ${EUDAQ2_INCLUDE_DIR}")
ENDIF()
FIND_LIBRARY(EUDAQ2_LIBRARY NAMES "libeudaq_core.so" HINTS "$ENV{EUDAQ2PATH}/lib")
MESSAGE(STATUS "libeudaq_core.so => ${EUDAQ2_LIBRARY}")
IF(EUDAQ2_LIBRARY)
SET(EUDAQ2_LIB_FOUND TRUE)
MESSAGE(STATUS "Found EUDAQ2 library: ${EUDAQ2_LIBRARY} ")
GET_FILENAME_COMPONENT(EUDAQ2_LIB_PATH ${EUDAQ2_LIBRARY} DIRECTORY)
MESSAGE(STATUS "EUDAQ2_LIB_PATH = ${EUDAQ2_LIB_PATH}")
FILE(GLOB EUDAQ2_LIBRARY "${EUDAQ2_LIB_PATH}/*.so")
MESSAGE(STATUS "EUDAQ2_LIBRARY list = ${EUDAQ2_LIBRARY}")
ENDIF()
IF(EUDAQ2_LIB_FOUND AND EUDAQ2_INC_FOUND)
SET(EUDAQ2_FOUND TRUE)
ENDIF()
#mark_as_advanced(EUDAQ2_LIBRARY EUDAQ2_INCLUDE_DIR)
mark_as_advanced(EUDAQ2_LIBRARY EUDAQ2_INCLUDE_DIR)
......@@ -3,9 +3,13 @@ CORRYVRECKAN_ENABLE_DEFAULT(OFF)
# Define module and return the generated name as MODULE_NAME
CORRYVRECKAN_DETECTOR_MODULE(MODULE_NAME)
FIND_PACKAGE(eudaq REQUIRED NO_DEFAULT_PATH)
FIND_PACKAGE(EUDAQ2 QUIET)
IF(NOT EUDAQ2_FOUND)
MESSAGE(FATAL_ERROR "Could not find EUDAQ 2, make sure to set the path to your installation using\n"
"$ export EUDAQ2PATH=/your/path/to/EUDAQ")
ENDIF()
INCLUDE_DIRECTORIES(SYSTEM ${EUDAQ_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(SYSTEM ${EUDAQ2_INCLUDE_DIR})
# Add source files to library
CORRYVRECKAN_MODULE_SOURCES(${MODULE_NAME}
......@@ -14,8 +18,7 @@ CORRYVRECKAN_MODULE_SOURCES(${MODULE_NAME}
)
# Add EUDAQ2 libraries
TARGET_LINK_LIBRARIES(${MODULE_NAME} ${EUDAQ_LIBRARIES})
SET_PROPERTY(TARGET ${MODULE_NAME} APPEND PROPERTY INSTALL_RPATH ${EUDAQ_LIBRARIES_DIRS})
TARGET_LINK_LIBRARIES(${MODULE_NAME} ${EUDAQ2_LIBRARY})
# Provide standard install target
CORRYVRECKAN_MODULE_INSTALL(${MODULE_NAME})
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment