Skip to content

Commit bc5b7c3

Browse files
committed
refactor(atima):Added atima version for display
1 parent d70ff11 commit bc5b7c3

4 files changed

Lines changed: 28 additions & 15 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,7 @@ else(EPICS_FOUND)
457457
endif(EPICS_FOUND)
458458

459459
find_package(Atima)
460+
460461
if(ATIMA_FOUND)
461462
set(atima_summary "${BGreen}YES${CR} ${BMagenta}$ENV{ATIMAPATH}${CR}")
462463
else(ATIMA_FOUND)

cmake/modules/FindAtima.cmake

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# FindAtima.cmake - Find module for CaTima / Atima using $ENV{ATIMAPATH}
1616
################################################################################
1717

18-
message(STATUS "Looking for Atima...")
18+
message(STATUS "Looking for ATIMA...")
1919

2020
if(NOT DEFINED ENV{ATIMAPATH})
2121
message(" - Environment variable ATIMAPATH is not set.")
@@ -26,22 +26,31 @@ else()
2626
NAMES catima/catima.h
2727
HINTS ${CATIMA_ROOT}/include
2828
PATH_SUFFIXES catima
29-
DOC "Path to CaTima include directory"
29+
DOC "Path to ATIMA include directory"
3030
)
3131

3232
find_library(Atima_LIBRARY_SHARED
3333
NAMES catima libcatima
3434
HINTS ${CATIMA_ROOT}/lib
35-
DOC "Path to CaTima shared library"
35+
DOC "Path to ATIMA shared library"
3636
)
3737

3838
if(Atima_LIBRARY_SHARED)
3939
set(Atima_LIBRARY ${Atima_LIBRARY_SHARED})
4040
endif()
41+
42+
set(Atima_VERSION "")
43+
if(EXISTS "${CATIMA_ROOT}/share/catima/catimaConfigVersion.cmake")
44+
include("${CATIMA_ROOT}/share/catima/catimaConfigVersion.cmake")
45+
if(DEFINED PACKAGE_VERSION)
46+
set(Atima_VERSION "${PACKAGE_VERSION}")
47+
endif()
48+
endif()
4149

4250
include(FindPackageHandleStandardArgs)
43-
find_package_handle_standard_args(Atima
51+
find_package_handle_standard_args(Atima
4452
REQUIRED_VARS Atima_LIBRARY Atima_INCLUDE_DIR
53+
VERSION_VAR Atima_VERSION
4554
)
4655

4756
if(ATIMA_FOUND AND NOT TARGET Atima::Atima)
@@ -55,9 +64,12 @@ else()
5564
endif()
5665

5766
message(" - ${Cyan}ATIMAPATH${CR} = ${BGreen}$ENV{ATIMAPATH}${CR}")
58-
message(" - ${Cyan}Atima_INCLUDE_DIR${CR} = ${BGreen}${Atima_INCLUDE_DIR}${CR}")
59-
message(" - ${Cyan}Atima_LIBRARY${CR} = ${BGreen}${Atima_LIBRARY}${CR}")
67+
message(" - ${Cyan}ATIMA_INCLUDE_DIR${CR} = ${BGreen}${Atima_INCLUDE_DIR}${CR}")
68+
message(" - ${Cyan}ATIMA_LIBRARY${CR} = ${BGreen}${Atima_LIBRARY}${CR}")
6069

6170
if(ATIMA_FOUND)
62-
add_definitions(-DWITH_ATIMA)
71+
message(STATUS "${BGreen}ATIMA was FOUND${CR} (version ${Atima_VERSION})")
72+
add_definitions(-DWITH_ATIMA)
73+
else()
74+
message(STATUS "${BYellow}Could not find package ATIMA${CR}")
6375
endif()

cmake/modules/FindEPICS.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
################################################################################
22
# Copyright (C) 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH #
3-
# Copyright (C) 2019-2025 Members of R3B Collaboration #
3+
# Copyright (C) 2019-2026 Members of R3B Collaboration #
44
# #
55
# This software is distributed under the terms of the #
66
# GNU General Public Licence (GPL) version 3, #

cmake/modules/Finducesb.cmake

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
################################################################################
2-
# Copyright (C) 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH #
3-
# Copyright (C) 2019-2025 Members of R3B Collaboration #
2+
# Copyright (C) 2015 GSI Helmholtzzentrum für Schwerionenforschung GmbH #
3+
# Copyright (C) 2015-2026 Members of R3B Collaboration #
44
# #
55
# This software is distributed under the terms of the #
66
# GNU General Public Licence (GPL) version 3, #
@@ -23,7 +23,7 @@
2323
# More information: http://fy.chalmers.se/~f96hajo/ucesb/ #
2424
################################################################################
2525

26-
message(STATUS "Looking for ucesb...")
26+
message(STATUS "Looking for UCESB...")
2727

2828
set(ucesb_LIBRARY_SHARED ext_data_clnt)
2929

@@ -78,10 +78,10 @@ endif(
7878
AND ucesb_LIBRARY_DIR)
7979

8080
message(" - ${Cyan}UCESB_DIR${CR} = ${BGreen}$ENV{UCESB_DIR}${CR}")
81-
message(" - ${Cyan}ucesb_INCLUDE_DIR${CR} = ${BGreen}${ucesb_INCLUDE_DIR}${CR}")
82-
message(" - ${Cyan}ucesb_LIBRARY_SHARED${CR} = ${BGreen}${ucesb_LIBRARY_SHARED}${CR}")
83-
message(" - ${Cyan}ucesb_LIBRARY_STATIC${CR} = ${BGreen}${ucesb_LIBRARY_STATIC}${CR}")
84-
message(" - ${Cyan}ucesb_LIBRARY_DIR${CR} = ${BGreen}${ucesb_LIBRARY_DIR}${CR}")
81+
message(" - ${Cyan}UCESB_INCLUDE_DIR${CR} = ${BGreen}${ucesb_INCLUDE_DIR}${CR}")
82+
message(" - ${Cyan}UCESB_LIBRARY_SHARED${CR} = ${BGreen}${ucesb_LIBRARY_SHARED}${CR}")
83+
message(" - ${Cyan}UCESB_LIBRARY_STATIC${CR} = ${BGreen}${ucesb_LIBRARY_STATIC}${CR}")
84+
message(" - ${Cyan}UCESB_LIBRARY_DIR${CR} = ${BGreen}${ucesb_LIBRARY_DIR}${CR}")
8585

8686
if(ucesb_FOUND)
8787
add_definitions(-DWITH_UCESB)

0 commit comments

Comments
 (0)