mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-06 06:49:05 +08:00
38 lines
1.2 KiB
CMake
38 lines
1.2 KiB
CMake
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-vc141-mt-x32-1_67)
|
|
set_property(TARGET boost_iostreams PROPERTY RUNTIME_OUTPUT_NAME_DEBUG boost_iostreams-vc141-mt-gd-x32-1_67)
|
|
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})
|
|
|
|
install(TARGETS boost_iostreams
|
|
RUNTIME DESTINATION bin
|
|
ARCHIVE DESTINATION lib
|
|
LIBRARY DESTINATION lib
|
|
)
|