vcpkg/ports/imgui/portfile.cmake
Rémy Tassoux 0b78ddc14b
[imgui] Split bindings to multiple features (#12329)
* [imgui] Split bindings to multiple features

See #12250.

I tested all the features on x86-windows, x64-windows, x64-windows-static and x64-linux triplets. Everything build fine except:
- dx12-binding on x86-windows. There's an issue opened about it here : https://github.com/ocornut/imgui/pull/2406
- allegro5-binding on x64-linux, because the current allegro5 port fails to build on this platform.

Contrary to the previous port which simply copied the sources to a specific folder, bindings are now compiled with their dependencies. The only exception is Marmelade, because there's no port available for it yet.

Unfortunately, I can't test the OSX and metal bindings. If someone using this platform could test it, it would be very much appreciated. :)

* [imgui] Move port files to the correct folder

* Update ports/imgui/CONTROL

Co-authored-by: Rémy Tassoux <rt2@rasterizedworld.com>
Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
2020-07-15 16:07:40 -07:00

49 lines
1.9 KiB
CMake

vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO ocornut/imgui
REF v1.77
SHA512 d5ebf4bb5e1ce83b226f2e68b3afe0f0abaeb55245fedf754e5453afd8d1df4dac8b5c47fc284c2588b40d05a55fc191b5e55c7be279c5e5e23f7c5b70150546
HEAD_REF master
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
allegro5-binding IMGUI_BUILD_ALLEGRO5_BINDING
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
marmalade-binding IMGUI_COPY_MARMALADE_BINDING
metal-binding IMGUI_BUILD_METAL_BINDING
opengl2-binding IMGUI_BUILD_OPENGL2_BINDING
opengl3-glew-binding IMGUI_BUILD_OPENGL3_GLEW_BINDING
opengl3-glad-binding IMGUI_BUILD_OPENGL3_GLAD_BINDING
opengl3-gl3w-binding IMGUI_BUILD_OPENGL3_GL3W_BINDING
opengl3-glbinding-binding IMGUI_BUILD_OPENGL3_GLBINDING_BINDING
osx-binding IMGUI_BUILD_OSX_BINDING
sdl2-binding IMGUI_BUILD_SDL2_BINDING
vulkan-binding IMGUI_BUILD_VULKAN_BINDING
win32-binding IMGUI_BUILD_WIN32_BINDING
freetype IMGUI_FREETYPE
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
${FEATURE_OPTIONS}
OPTIONS_DEBUG
-DIMGUI_SKIP_HEADERS=ON
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets()
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)