File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,24 @@ function(cpprest_find_boost)
2727 # FindBoost continually breaks imported targets whenever boost updates.
2828 if (1)
2929 target_include_directories (cpprestsdk_boost_internal INTERFACE "$<BUILD_INTERFACE:${Boost_INCLUDE_DIR} >" )
30- target_link_libraries (cpprestsdk_boost_internal INTERFACE "$<BUILD_INTERFACE:${Boost_LIBRARIES} >" )
30+ set (_prev)
31+ set (_libs)
32+ foreach (_lib ${Boost_LIBRARIES} )
33+ if (_lib STREQUAL "optimized" OR _lib STREQUAL "debug" )
34+ else ()
35+ if (_prev STREQUAL "optimized" )
36+ list (APPEND _libs "$<$<NOT:$<CONFIG:Debug>>:${_lib} >" )
37+ elseif (_prev STREQUAL "debug" )
38+ list (APPEND _libs "$<$<CONFIG:Debug>:${_lib} >" )
39+ else ()
40+ list (APPEND _libs "${_lib} " )
41+ endif ()
42+ endif ()
43+ set (_prev "${_lib} " )
44+ endforeach ()
45+ message (STATUS "_libs: ${_libs} " )
46+ target_link_libraries (cpprestsdk_boost_internal INTERFACE "$<BUILD_INTERFACE:${_libs} >" )
47+
3148 else ()
3249 if (ANDROID)
3350 target_link_libraries (cpprestsdk_boost_internal INTERFACE
You can’t perform that action at this time.
0 commit comments