File: CMakeLists.txt

package info (click to toggle)
vecgeom 1.2.8%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 24,016 kB
  • sloc: cpp: 88,803; ansic: 6,888; python: 1,035; sh: 582; sql: 538; makefile: 23
file content (44 lines) | stat: -rw-r--r-- 1,190 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#    \file CMakeLists.txt
#    \brief builds a library for interoperation of VecGeom with GDML
#
#    \authors Author:  Dmitry Savin
#
#    \license Distributed under the Apache license 2.0

add_library(vgdml
  include/Auxiliary.h
  include/Backend.h
  include/Frontend.h
  include/Helper.h
  include/MaterialInfo.h
  include/RegionInfo.h
  include/Middleware.h
  include/ReflFactory.h
  src/Backend.cpp
  src/Frontend.cpp
  src/Helper.cpp
  src/Middleware.cpp
)

if(BUILD_SHARED_LIBS)
  set_target_properties(vgdml
    PROPERTIES
      VERSION ${PROJECT_VERSION}
      SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR})
endif()

target_include_directories(vgdml PUBLIC
  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
  $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
target_link_libraries(vgdml PUBLIC XercesC::XercesC vecgeom)

if(VECGEOM_GDMLDEBUG)
  # Only used in Middleware.cpp, and to set a constant
  target_compile_definitions(vgdml PRIVATE GDMLDEBUG)
endif()

install(TARGETS vgdml EXPORT VecGeomTargets DESTINATION "${CMAKE_INSTALL_LIBDIR}")
install(DIRECTORY include/ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/VecGeom/gdml"
  FILES_MATCHING PATTERN "*.h"
)