From b5f0e9b075565c736bc7719200834c8ce4da8b3b Mon Sep 17 00:00:00 2001 From: pumpkinpal Date: Fri, 15 May 2020 11:41:23 +1000 Subject: [PATCH] Replaced conditional compilation of IMGUI_DEMO_SRC with generator expression. --- CMakeLists.txt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index aec5eb993..dc4546691 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,15 +19,11 @@ option (IMGUI_IMPL_DX12 "Build the DirectX 12 implementation (only if supported) set (CMAKE_CXX_STANDARD 11) -if (IMGUI_DEMO) - set (IMGUI_DEMO_SRC imgui_demo.cpp) -endif () - add_library (imgui STATIC imgui.cpp imgui_draw.cpp imgui_widgets.cpp - ${IMGUI_DEMO_SRC} + $<$:imgui_demo.cpp> ) target_include_directories (imgui PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")