Commit 6687ae9f authored by Praetorius, Simon's avatar Praetorius, Simon

Update target_enable_boost.cmake

parent ebc999c1
......@@ -26,15 +26,12 @@ macro(target_enable_boost _TARGET_ _SCOPE_)
endif (NOT BUILD_SHARED_LIBS)
find_package(Boost ${BOOST_VERSION} REQUIRED ${BOOST_LIBS_REQUIRED})
add_library(boost INTERFACE)
target_include_directories(boost INTERFACE ${Boost_INCLUDE_DIR})
target_include_directories(${_TARGET_} ${_SCOPE_} ${Boost_INCLUDE_DIR})
if (LINK_EXECUTABLE)
target_link_libraries(boost INTERFACE ${Boost_LIBRARIES})
target_link_libraries(${_TARGET_} ${_SCOPE_} ${Boost_LIBRARIES})
endif (LINK_EXECUTABLE)
target_link_libraries(${_TARGET_} ${_SCOPE_} boost)
if (MSVC_SHARED_LIBS AND LINK_EXECUTABLE)
link_directories(${Boost_LIBRARY_DIRS})
target_compile_definitions(${_TARGET_} ${_SCOPE_} ${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment