Skip to content
Snippets Groups Projects
Commit 0c3e704b authored by Chao Peng's avatar Chao Peng
Browse files

update cmakelist to include et library

parent 9700ae05
Branches
Tags
No related merge requests found
...@@ -5,6 +5,7 @@ project(hcana VERSION 0.95 LANGUAGES CXX) ...@@ -5,6 +5,7 @@ project(hcana VERSION 0.95 LANGUAGES CXX)
option(HCANA_BUILTIN_PODD "Use built-in Podd submodule (default: YES)" OFF) option(HCANA_BUILTIN_PODD "Use built-in Podd submodule (default: YES)" OFF)
include(cmake/os.cmake) include(cmake/os.cmake)
include(FindThreads)
find_package(ROOT 6.0 REQUIRED CONFIG) find_package(ROOT 6.0 REQUIRED CONFIG)
include(${ROOT_USE_FILE}) include(${ROOT_USE_FILE})
...@@ -23,6 +24,9 @@ else() ...@@ -23,6 +24,9 @@ else()
get_target_property(SPDLOG_INCLUDE_DIR spdlog::spdlog INTERFACE_INCLUDE_DIRECTORIES) get_target_property(SPDLOG_INCLUDE_DIR spdlog::spdlog INTERFACE_INCLUDE_DIRECTORIES)
endif() endif()
find_package(coda_et REQUIRED)
get_target_property(CODA_ET_INCLUDE_DIR coda_et::coda_et INTERFACE_INCLUDE_DIRECTORIES)
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
# Set up Podd and ROOT dependencies # Set up Podd and ROOT dependencies
if(HCANA_BUILTIN_PODD) if(HCANA_BUILTIN_PODD)
......
...@@ -4,6 +4,7 @@ cmake_minimum_required(VERSION 3.5) ...@@ -4,6 +4,7 @@ cmake_minimum_required(VERSION 3.5)
# Names of the main items we build here # Names of the main items we build here
set(LIBNAME HallC) set(LIBNAME HallC)
set(EXENAME hcana) set(EXENAME hcana)
include(FindThreads)
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
# Sources and headers # Sources and headers
...@@ -65,7 +66,7 @@ target_include_directories(${LIBNAME} ...@@ -65,7 +66,7 @@ target_include_directories(${LIBNAME}
$<BUILD_INTERFACE:${SPDLOG_INCLUDE_DIR}> $<BUILD_INTERFACE:${SPDLOG_INCLUDE_DIR}>
$<INSTALL_INTERFACE:${SPDLOG_INCLUDE_DIR}> $<INSTALL_INTERFACE:${SPDLOG_INCLUDE_DIR}>
$<BUILD_INTERFACE:${FMT_INCLUDE_DIR}> $<BUILD_INTERFACE:${FMT_INCLUDE_DIR}>
/site/coda/3.10/Linux-x86_64/include $<BUILD_INTERFACE:${CODA_ET_INCLUDE_DIR}>
) )
target_compile_options(${LIBNAME} target_compile_options(${LIBNAME}
...@@ -87,7 +88,7 @@ target_link_libraries(${LIBNAME} ...@@ -87,7 +88,7 @@ target_link_libraries(${LIBNAME}
PUBLIC PUBLIC
Podd::Podd Podd::Podd
Podd::Decode Podd::Decode
et coda_et::coda_et
) )
set_target_properties(${LIBNAME} PROPERTIES set_target_properties(${LIBNAME} PROPERTIES
SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
...@@ -113,12 +114,12 @@ build_root_dictionary(${LIBNAME} ${headers} ...@@ -113,12 +114,12 @@ build_root_dictionary(${LIBNAME} ${headers}
INCLUDEDIRS INCLUDEDIRS
$<BUILD_INTERFACE:-I${SPDLOG_INCLUDE_DIR}> $<BUILD_INTERFACE:-I${SPDLOG_INCLUDE_DIR}>
$<BUILD_INTERFACE:-I${FMT_INCLUDE_DIR}> $<BUILD_INTERFACE:-I${FMT_INCLUDE_DIR}>
$<BUILD_INTERFACE:-I${CODA_ET_INCLUDE_DIR}>
-I${CMAKE_CURRENT_SOURCE_DIR} -I${CMAKE_CURRENT_SOURCE_DIR}
-I${CMAKE_CURRENT_SOURCE_DIR}/include -I${CMAKE_CURRENT_SOURCE_DIR}/include
-I${CMAKE_CURRENT_SOURCE_DIR}/include/hcana -I${CMAKE_CURRENT_SOURCE_DIR}/include/hcana
-I${Podd_DIR}/../../include -I${Podd_DIR}/../../include
-I${Podd_DIR}/../../include/podd2 -I${Podd_DIR}/../../include/podd2
-I/site/coda/3.10/Linux-x86_64/include
TARGETS ${LIBNAME} TARGETS ${LIBNAME}
LINKDEF include/HallC_LinkDef.h LINKDEF include/HallC_LinkDef.h
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment