From f8eb9904079fbeb916188e0a9e05e311319d6d8e Mon Sep 17 00:00:00 2001 From: Addison Schuhardt Date: Sat, 21 Mar 2020 14:33:06 -0700 Subject: [PATCH] Altering the exported 'include' directory path so that it is not mistakenly set to a user's project root path. This will allow users who are linking to cimgui from a nested directory to be provided with the correct 'include' paths automatically. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e23991e..f5a9c75 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,8 +27,8 @@ else (WIN32) target_compile_definitions(cimgui PUBLIC IMGUI_IMPL_API="extern \"C\" ") endif (WIN32) -target_include_directories(cimgui PUBLIC ${CMAKE_SOURCE_DIR}) -target_include_directories(cimgui PUBLIC ${CMAKE_SOURCE_DIR}/imgui) +target_include_directories(cimgui PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories(cimgui PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/imgui) set_target_properties(cimgui PROPERTIES PREFIX "") #install