Compatible with lower cmake version for boost.log

This commit is contained in:
luocai 2023-12-27 19:49:42 +08:00
parent ad2c3e2881
commit c845c037ef

View File

@ -16,6 +16,11 @@ add_library(Universal
if(CMAKE_VERSION VERSION_LESS 3.20)
get_filename_component(KYLIN_CORE_INCLUDE_PATH ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
if(NOT Boost_USE_STATIC_LIBS)
target_compile_definitions(Universal
PUBLIC BOOST_LOG_DYN_LINK
)
endif()
else()
cmake_path(GET CMAKE_CURRENT_SOURCE_DIR PARENT_PATH KYLIN_CORE_INCLUDE_PATH)
endif()