]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentracing-cpp/mocktracer/CMakeLists.txt
buildsys: switch source download to quincy
[ceph.git] / ceph / src / jaegertracing / opentracing-cpp / mocktracer / CMakeLists.txt
1 include_directories(include)
2
3 set(SRCS src/mock_span_context.cpp
4 src/mock_span.cpp
5 src/in_memory_recorder.cpp
6 src/json_recorder.cpp
7 src/base64.cpp
8 src/propagation.cpp
9 src/utility.cpp
10 src/json.cpp
11 src/tracer.cpp
12 src/tracer_factory.cpp)
13
14 if (BUILD_SHARED_LIBS)
15 add_library(opentracing_mocktracer SHARED ${SRCS} src/dynamic_load.cpp)
16 target_include_directories(opentracing_mocktracer INTERFACE "$<INSTALL_INTERFACE:include/>")
17 set_target_properties(opentracing_mocktracer PROPERTIES VERSION ${OPENTRACING_VERSION_STRING}
18 SOVERSION ${OPENTRACING_VERSION_MAJOR})
19 target_link_libraries(opentracing_mocktracer PUBLIC opentracing)
20 target_compile_definitions(opentracing_mocktracer PRIVATE OPENTRACING_MOCK_TRACER_EXPORTS)
21 install(TARGETS opentracing_mocktracer
22 COMPONENT DIST
23 EXPORT OpenTracingTargets
24 LIBRARY DESTINATION ${LIB_INSTALL_DIR}
25 ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
26
27
28 endif()
29
30 if (BUILD_STATIC_LIBS)
31 add_library(opentracing_mocktracer-static STATIC ${SRCS})
32 # Windows generates a lib and dll files for a shared library. using the same name will override the lib file generated by the shared target
33 if (NOT WIN32)
34 set_target_properties(opentracing_mocktracer-static PROPERTIES OUTPUT_NAME opentracing_mocktracer)
35 endif()
36 target_compile_definitions(opentracing_mocktracer-static PUBLIC OPENTRACING_MOCK_TRACER_STATIC)
37 target_include_directories(opentracing_mocktracer-static INTERFACE "$<INSTALL_INTERFACE:include/>")
38 target_link_libraries(opentracing_mocktracer-static opentracing-static)
39 install(TARGETS opentracing_mocktracer-static EXPORT OpenTracingTargets
40 ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
41 endif()
42
43 install(DIRECTORY include/opentracing DESTINATION include
44 FILES_MATCHING PATTERN "*.h")
45
46 # ==============================================================================
47 # Testing
48
49 include(CTest)
50 if(BUILD_TESTING)
51 add_subdirectory(test)
52 endif()