OrcaSlicer/src/imgui/CMakeLists.txt
Alexander Sulfrian f1afe93d6f
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 <softfeverever@gmail.com>
2023-08-11 08:20:10 +08:00

20 lines
371 B
CMake

cmake_minimum_required(VERSION 2.8.12)
project(imgui)
add_library(imgui STATIC
imconfig.h
imgui.h
imgui_internal.h
imstb_rectpack.h
imstb_textedit.h
imstb_truetype.h
imgui_tables.cpp
imgui.cpp
imgui_demo.cpp
imgui_draw.cpp
imgui_widgets.cpp
)
if(Boost_FOUND)
target_link_libraries(imgui PRIVATE boost_headeronly)
endif()