mirror of
https://github.com/boostorg/beast.git
synced 2025-07-31 21:34:46 +02:00
Add Beast INTERFACE CMake target
This commit is contained in:
@@ -7,6 +7,7 @@ Version 56:
|
||||
* Try harder to find Boost (cmake)
|
||||
* Reset error codes
|
||||
* More basic_parser tests
|
||||
* Add an INTERFACE cmake target
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
cmake_minimum_required (VERSION 3.5.2)
|
||||
|
||||
project (Beast)
|
||||
project (Beast VERSION 56)
|
||||
|
||||
set_property (GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
@@ -129,6 +129,24 @@ elseif ("${VARIANT}" STREQUAL "release")
|
||||
|
||||
endif()
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#
|
||||
# Library interface
|
||||
#
|
||||
|
||||
add_library(${PROJECT_NAME} INTERFACE)
|
||||
target_link_libraries(${PROJECT_NAME} INTERFACE ${Boost_SYSTEM_LIBRARY})
|
||||
if (NOT MSVC)
|
||||
target_link_libraries(${PROJECT_NAME} INTERFACE Threads::Threads)
|
||||
endif()
|
||||
target_include_directories(${PROJECT_NAME} INTERFACE ${Boost_INCLUDE_DIRS})
|
||||
target_compile_definitions(${PROJECT_NAME} INTERFACE BOOST_COROUTINES_NO_DEPRECATION_WARNING=1)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#
|
||||
# Tests and examples
|
||||
#
|
||||
|
||||
include_directories (.)
|
||||
include_directories (extras)
|
||||
include_directories (include)
|
||||
|
Reference in New Issue
Block a user