summaryrefslogtreecommitdiffstats
path: root/src/jaegertracing/opentelemetry-cpp/tools/vcpkg/ports/boost-iostreams/CMakeLists.txt
blob: 582377d4cc105292ff589b748a093008e254f276 (plain)
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
cmake_minimum_required(VERSION 3.5)
project(boost-iostreams)

if(BUILD_SHARED_LIBS)
    add_definitions(-DBOOST_IOSTREAMS_DYN_LINK=1)
endif()
add_definitions(
    -DBOOST_ALL_NO_LIB=1 
    -DBOOST_IOSTREAMS_USE_DEPRECATED
)
include_directories(include)
file(GLOB SOURCES src/*.cpp)
add_library(boost_iostreams ${SOURCES})

if(MSVC)
    set_property(TARGET boost_iostreams PROPERTY OUTPUT_NAME_RELEASE boost_iostreams-vc140-mt)
    set_property(TARGET boost_iostreams PROPERTY OUTPUT_NAME_DEBUG boost_iostreams-vc140-mt-gd)

    set_property(TARGET boost_iostreams PROPERTY RUNTIME_OUTPUT_NAME_RELEASE boost_iostreams)
    set_property(TARGET boost_iostreams PROPERTY RUNTIME_OUTPUT_NAME_DEBUG boost_iostreamsd)
endif()

find_package(ZLIB REQUIRED)
target_link_libraries(boost_iostreams PRIVATE ZLIB::ZLIB)

find_package(BZip2 REQUIRED)
target_link_libraries(boost_iostreams PRIVATE BZip2::BZip2)

find_package(LibLZMA REQUIRED)
target_include_directories(boost_iostreams PRIVATE ${LIBLZMA_INCLUDE_DIRS})
target_link_libraries(boost_iostreams PRIVATE ${LIBLZMA_LIBRARIES})

find_library(ZSTD_LIBRARY NAMES zstdd zstd_staticd zstd zstd_static NAMES_PER_DIR)
target_link_libraries(boost_iostreams PRIVATE ${ZSTD_LIBRARY})

install(TARGETS boost_iostreams
    RUNTIME DESTINATION bin
    ARCHIVE DESTINATION lib
    LIBRARY DESTINATION lib
)