Newer
Older
# - Config file for the FooBar package
# It defines the following variables
# LAGER_INCLUDE_DIRS - include directories for lager
# LAGER_DEFINITIONS - definitions needed to compile against lager
# LAGER_LIBRARIES - Libraries to link against
# Enable languages
enable_language(CXX)
# Compute paths
get_filename_component(LAGER_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
set(LAGER_INCLUDE_DIRS "@CONF_INCLUDE_DIRS@/..")
set(LAGER_DEFINITIONS "@CONF_DEFINITIONS@")
# Our library dependencies (contains definitions for IMPORTED targets)
if(NOT TARGET lager AND NOT lager_BINARY_DIR)
include("${LAGER_CMAKE_DIR}/lager-targets.cmake")
endif()
# These are IMPORTED targets created by lager-targets.cmake
set(LAGER_LIBRARIES @TARGETS@)
# Add the external libraries
find_package(root REQUIRED)
find_package(Boost COMPONENTS program_options filesystem system REQUIRED)
set(LAGER_LIBRARIES ${LAGER_LIBRARIES} ${ROOT_LIBRARIES} ${Boost_LIBRARIES})
set(LAGER_INCLUDE_DIRS ${LAGER_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
## Extra rpath stuff for MacOS
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(CMAKE_INSTALL_RPATH
${CMAKE_INSTALL_RPATH}
"@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@")
message("Podd: set rpath to ${CMAKE_INSTALL_RPATH}")
endif()