2019-05-03 13:57:43 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
2019-02-26 05:41:53 +08:00
|
|
|
|
2020-12-16 06:46:58 +08:00
|
|
|
if ("docking-experimental" IN_LIST FEATURES)
|
|
|
|
vcpkg_from_github(
|
2024-05-29 16:40:48 +08:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO ocornut/imgui
|
|
|
|
REF "v${VERSION}-docking"
|
2024-05-31 01:25:32 +08:00
|
|
|
SHA512 a700d6e4daa2f2d2bc0a61f96c813da03f9d0d6508bc077679d1acea08f546c913d2409008437dea5d993657f10a9e7077725d65bc55b7fb14d7ff6b52ff05d4
|
2024-05-29 16:40:48 +08:00
|
|
|
HEAD_REF docking
|
|
|
|
)
|
2020-12-16 06:46:58 +08:00
|
|
|
else()
|
|
|
|
vcpkg_from_github(
|
2024-05-29 16:40:48 +08:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO ocornut/imgui
|
|
|
|
REF "v${VERSION}"
|
2024-05-31 01:25:32 +08:00
|
|
|
SHA512 8cdec45c8b58b3768a2216af2a1cba3d0e772ac48420b57057a4a8eda5766c121b4a8457a81b5896defe00b822c40d6aac6ee2b31f4133f2b9a02b231b1529d2
|
2024-05-29 16:40:48 +08:00
|
|
|
HEAD_REF master
|
2020-12-16 06:46:58 +08:00
|
|
|
)
|
|
|
|
endif()
|
2017-10-09 18:48:44 +08:00
|
|
|
|
2021-12-23 11:49:45 +08:00
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/imgui-config.cmake.in" DESTINATION "${SOURCE_PATH}")
|
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
2017-10-09 18:48:44 +08:00
|
|
|
|
2020-05-01 13:57:38 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2021-03-18 06:13:48 +08:00
|
|
|
FEATURES
|
2020-07-16 07:07:40 +08:00
|
|
|
allegro5-binding IMGUI_BUILD_ALLEGRO5_BINDING
|
2023-12-28 15:57:02 +08:00
|
|
|
android-binding IMGUI_BUILD_ANDROID_BINDING
|
2020-07-16 07:07:40 +08:00
|
|
|
dx9-binding IMGUI_BUILD_DX9_BINDING
|
|
|
|
dx10-binding IMGUI_BUILD_DX10_BINDING
|
|
|
|
dx11-binding IMGUI_BUILD_DX11_BINDING
|
|
|
|
dx12-binding IMGUI_BUILD_DX12_BINDING
|
|
|
|
glfw-binding IMGUI_BUILD_GLFW_BINDING
|
|
|
|
glut-binding IMGUI_BUILD_GLUT_BINDING
|
|
|
|
metal-binding IMGUI_BUILD_METAL_BINDING
|
|
|
|
opengl2-binding IMGUI_BUILD_OPENGL2_BINDING
|
2021-08-25 07:28:54 +08:00
|
|
|
opengl3-binding IMGUI_BUILD_OPENGL3_BINDING
|
2020-07-16 07:07:40 +08:00
|
|
|
osx-binding IMGUI_BUILD_OSX_BINDING
|
|
|
|
sdl2-binding IMGUI_BUILD_SDL2_BINDING
|
2021-10-14 05:47:17 +08:00
|
|
|
sdl2-renderer-binding IMGUI_BUILD_SDL2_RENDERER_BINDING
|
2020-07-16 07:07:40 +08:00
|
|
|
vulkan-binding IMGUI_BUILD_VULKAN_BINDING
|
|
|
|
win32-binding IMGUI_BUILD_WIN32_BINDING
|
|
|
|
freetype IMGUI_FREETYPE
|
2023-09-06 13:34:32 +08:00
|
|
|
freetype-lunasvg IMGUI_FREETYPE_LUNASVG
|
2020-09-05 13:22:28 +08:00
|
|
|
wchar32 IMGUI_USE_WCHAR32
|
2024-05-29 16:40:48 +08:00
|
|
|
test-engine IMGUI_TEST_ENGINE
|
2020-05-01 13:57:38 +08:00
|
|
|
)
|
|
|
|
|
2020-08-25 03:49:35 +08:00
|
|
|
if ("libigl-imgui" IN_LIST FEATURES)
|
|
|
|
vcpkg_download_distfile(
|
|
|
|
IMGUI_FONTS_DROID_SANS_H
|
|
|
|
URLS
|
|
|
|
https://raw.githubusercontent.com/libigl/libigl-imgui/c3efb9b62780f55f9bba34561f79a3087e057fc0/imgui_fonts_droid_sans.h
|
|
|
|
FILENAME "imgui_fonts_droid_sans.h"
|
|
|
|
SHA512
|
|
|
|
abe9250c9a5989e0a3f2285bbcc83696ff8e38c1f5657c358e6fe616ff792d3c6e5ff2fa23c2eeae7d7b307392e0dc798a95d14f6d10f8e9bfbd7768d36d8b31
|
|
|
|
)
|
|
|
|
|
2021-12-23 11:49:45 +08:00
|
|
|
file(INSTALL "${IMGUI_FONTS_DROID_SANS_H}" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
|
2020-08-25 03:49:35 +08:00
|
|
|
endif()
|
|
|
|
|
2024-05-29 16:40:48 +08:00
|
|
|
if ("test-engine" IN_LIST FEATURES)
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH TEST_ENGINE_SOURCE_PATH
|
|
|
|
REPO ocornut/imgui_test_engine
|
|
|
|
REF "v${VERSION}"
|
2024-05-31 01:25:32 +08:00
|
|
|
SHA512 0c3b11f46f7ed259e0bf2b0634848aee1fe0b34609349b30f445dd774c739690df4cf12498895f0734b16084be4d32ae80e9e2ada291dd88f7d4fad8fda49a2b
|
2024-05-29 16:40:48 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${SOURCE_PATH}/test-engine")
|
|
|
|
file(COPY "${TEST_ENGINE_SOURCE_PATH}/imgui_test_engine/" DESTINATION "${SOURCE_PATH}/test-engine")
|
|
|
|
file(REMOVE_RECURSE "${SOURCE_PATH}/test-engine/thirdparty/stb")
|
|
|
|
vcpkg_replace_string("${SOURCE_PATH}/test-engine/imgui_capture_tool.cpp" "//#define IMGUI_STB_IMAGE_WRITE_FILENAME \"my_folder/stb_image_write.h\"" "#define IMGUI_STB_IMAGE_WRITE_FILENAME <stb_image_write.h>\n#define STB_IMAGE_WRITE_STATIC")
|
|
|
|
vcpkg_replace_string("${SOURCE_PATH}/imconfig.h" "#pragma once" "#pragma once\n\n#include \"imgui_te_imconfig.h\"")
|
|
|
|
vcpkg_replace_string("${SOURCE_PATH}/test-engine/imgui_te_imconfig.h" "#define IMGUI_TEST_ENGINE_ENABLE_COROUTINE_STDTHREAD_IMPL 0" "#define IMGUI_TEST_ENGINE_ENABLE_COROUTINE_STDTHREAD_IMPL 1")
|
|
|
|
endif()
|
|
|
|
|
2021-10-14 05:47:17 +08:00
|
|
|
vcpkg_cmake_configure(
|
2021-12-23 11:49:45 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2020-06-24 04:56:15 +08:00
|
|
|
OPTIONS
|
2020-05-01 13:57:38 +08:00
|
|
|
${FEATURE_OPTIONS}
|
2017-10-09 18:48:44 +08:00
|
|
|
OPTIONS_DEBUG
|
|
|
|
-DIMGUI_SKIP_HEADERS=ON
|
|
|
|
)
|
|
|
|
|
2021-10-14 05:47:17 +08:00
|
|
|
vcpkg_cmake_install()
|
2019-10-15 15:43:25 +08:00
|
|
|
|
2021-03-02 00:40:09 +08:00
|
|
|
if ("freetype" IN_LIST FEATURES)
|
2024-07-10 01:20:30 +08:00
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/imconfig.h" "//#define IMGUI_ENABLE_FREETYPE\n" "#define IMGUI_ENABLE_FREETYPE\n")
|
2021-03-02 00:40:09 +08:00
|
|
|
endif()
|
2023-09-06 13:34:32 +08:00
|
|
|
if ("freetype-lunasvg" IN_LIST FEATURES)
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/imconfig.h" "//#define IMGUI_ENABLE_FREETYPE_LUNASVG" "#define IMGUI_ENABLE_FREETYPE_LUNASVG")
|
|
|
|
endif()
|
2021-03-02 00:40:09 +08:00
|
|
|
if ("wchar32" IN_LIST FEATURES)
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/imconfig.h" "//#define IMGUI_USE_WCHAR32" "#define IMGUI_USE_WCHAR32")
|
|
|
|
endif()
|
|
|
|
|
2017-10-09 18:48:44 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2021-10-14 05:47:17 +08:00
|
|
|
vcpkg_cmake_config_fixup()
|
2017-10-09 18:48:44 +08:00
|
|
|
|
2024-05-29 16:40:48 +08:00
|
|
|
if ("test-engine" IN_LIST FEATURES)
|
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt" "${SOURCE_PATH}/test-engine/LICENSE.txt")
|
|
|
|
else()
|
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
|
|
|
|
endif()
|