From f1afe93d6f4b1545797797b07b71a71bf0412233 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Fri, 11 Aug 2023 02:20:10 +0200 Subject: [PATCH] Fix compiling imgui with boost libraries (#1755) Addind only the include dirs is wrong. The cmake boost_headeronly library contains more settings. Without adding the cmake boost_headeronly library, the compilation of imgui is missing the defines for the boost library (f.e. BOOST_LOG_DYN_LINK) and it will result in linker errors. Co-authored-by: SoftFever --- src/imgui/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/imgui/CMakeLists.txt b/src/imgui/CMakeLists.txt index 213b3b830..2db32b306 100644 --- a/src/imgui/CMakeLists.txt +++ b/src/imgui/CMakeLists.txt @@ -16,5 +16,5 @@ add_library(imgui STATIC ) if(Boost_FOUND) - include_directories(${Boost_INCLUDE_DIRS}) -endif() \ No newline at end of file + target_link_libraries(imgui PRIVATE boost_headeronly) +endif()