1FILE(GLOB histogram_files "*.c")
2FILE(GLOB HEADER "*.h")
3
4add_library(hdr_histogram SHARED ${histogram_files} ${HEADER})
5add_library(hdr_histogram_static STATIC ${histogram_files} ${HEADER})
6
7
8if(WIN32)
9    target_link_libraries(hdr_histogram ${ZLIB_LIBRARIES})
10    target_link_libraries(hdr_histogram_static ${ZLIB_LIBRARIES})
11else()
12    target_link_libraries(hdr_histogram m z)
13    target_link_libraries(hdr_histogram_static m z)
14endif()
15
16if (WIN32)
17    set_target_properties(hdr_histogram PROPERTIES VERSION ${HDR_VERSION})
18else (WIN32)
19    set_target_properties(hdr_histogram PROPERTIES VERSION ${HDR_VERSION} SOVERSION ${HDR_SOVERSION})
20endif (WIN32)
21
22
23install(TARGETS hdr_histogram DESTINATION lib${LIB_SUFFIX})
24install(TARGETS hdr_histogram_static DESTINATION lib${LIB_SUFFIX})
25install(FILES hdr_histogram.h hdr_histogram_log.h hdr_time.h hdr_writer_reader_phaser.h hdr_interval_recorder.h hdr_thread.h DESTINATION include/hdr)
26