From b4cd163dc68b5a68a3522a3153f906009bb15a99 Mon Sep 17 00:00:00 2001 From: AlvinZhangH <260137639@qq.com> Date: Thu, 28 Nov 2019 14:56:33 +0800 Subject: [PATCH 1/2] [imgui] Add feature internal to add imgui_internal.h --- ports/imgui/CMakeLists.txt | 13 ++++++++++++- ports/imgui/CONTROL | 5 ++++- ports/imgui/portfile.cmake | 7 +++++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/ports/imgui/CMakeLists.txt b/ports/imgui/CMakeLists.txt index 4a2ce76280e8a5..51e97350054e2f 100644 --- a/ports/imgui/CMakeLists.txt +++ b/ports/imgui/CMakeLists.txt @@ -12,6 +12,17 @@ set(IMGUI_INCLUDES_PRIVATE imgui_internal.h ) +set(IMGUI_INCLUDES_ALL + ${IMGUI_INCLUDES_PUBLIC} +) + +IF (ENABLE_INTERNAL) + set(IMGUI_INCLUDES_ALL + ${IMGUI_INCLUDES_PUBLIC} + ${IMGUI_INCLUDES_PRIVATE} +) +ENDIF (ENABLE_INTERNAL) + set(IMGUI_SOURCES imgui.cpp imgui_demo.cpp @@ -38,7 +49,7 @@ install(EXPORT IMGUIExport FILE ${PROJECT_NAME}Config.cmake NAMESPACE ${PROJECT_ if(NOT IMGUI_SKIP_HEADERS) install( - FILES ${IMGUI_INCLUDES_PUBLIC} + FILES ${IMGUI_INCLUDES_ALL} DESTINATION include ) endif() diff --git a/ports/imgui/CONTROL b/ports/imgui/CONTROL index 6484a925ac79d1..36f4eea76d052f 100644 --- a/ports/imgui/CONTROL +++ b/ports/imgui/CONTROL @@ -1,8 +1,11 @@ Source: imgui -Version: 1.73-1 +Version: 1.73-2 Homepage: https://github.com/ocornut/imgui Description: Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies. Feature: example Description: build with examples Build-Depends: glfw3, freeglut, opengl, sdl1 + +Feature: internal +Description: using the imgui_internal.h header diff --git a/ports/imgui/portfile.cmake b/ports/imgui/portfile.cmake index 62d674353859ac..6a710a711039ca 100644 --- a/ports/imgui/portfile.cmake +++ b/ports/imgui/portfile.cmake @@ -12,11 +12,18 @@ vcpkg_from_github( file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + internal ENABLE_INTERNAL +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS_DEBUG -DIMGUI_SKIP_HEADERS=ON + ${FEATURE_OPTIONS} + OPTIONS_RELEASE + ${FEATURE_OPTIONS} ) vcpkg_install_cmake() From 7a82442dea31847913af54df268ff095f3d88aba Mon Sep 17 00:00:00 2001 From: AlvinZhangH <260137639@qq.com> Date: Fri, 29 Nov 2019 10:53:32 +0800 Subject: [PATCH 2/2] [imgui] Fix OPTIONS of vcpkg_configure_cmake --- ports/imgui/portfile.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ports/imgui/portfile.cmake b/ports/imgui/portfile.cmake index 6a710a711039ca..eb09158340df0e 100644 --- a/ports/imgui/portfile.cmake +++ b/ports/imgui/portfile.cmake @@ -21,8 +21,7 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS_DEBUG -DIMGUI_SKIP_HEADERS=ON - ${FEATURE_OPTIONS} - OPTIONS_RELEASE + OPTIONS ${FEATURE_OPTIONS} )