Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[imguizmo] new port #18991

Merged
merged 10 commits into from
Jul 22, 2021
59 changes: 59 additions & 0 deletions ports/imguizmo/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
cmake_minimum_required(VERSION 3.8)
project(imguizmo)

find_package(imgui CONFIG REQUIRED)
get_target_property(IMGUI_INCLUDE_DIRS imgui::imgui
INTERFACE_INCLUDE_DIRECTORIES
)

add_library(${PROJECT_NAME} "")
add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})

target_compile_options(${PROJECT_NAME} PRIVATE "-std=c++11")
PhoebeHui marked this conversation as resolved.
Show resolved Hide resolved

target_include_directories(
${PROJECT_NAME}
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include>
PRIVATE
${IMGUI_INCLUDE_DIRS}
)

target_sources(
${PROJECT_NAME}
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/GraphEditor.cpp
${CMAKE_CURRENT_SOURCE_DIR}/ImCurveEdit.cpp
${CMAKE_CURRENT_SOURCE_DIR}/ImGradient.cpp
${CMAKE_CURRENT_SOURCE_DIR}/ImGuizmo.cpp
${CMAKE_CURRENT_SOURCE_DIR}/ImSequencer.cpp
)

install(
TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}_target
ARCHIVE DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
)

if (NOT IMGUIZMO_SKIP_HEADERS)
install(
FILES
${CMAKE_CURRENT_SOURCE_DIR}/GraphEditor.h
${CMAKE_CURRENT_SOURCE_DIR}/ImCurveEdit.h
${CMAKE_CURRENT_SOURCE_DIR}/ImGradient.h
${CMAKE_CURRENT_SOURCE_DIR}/ImGuizmo.h
${CMAKE_CURRENT_SOURCE_DIR}/ImSequencer.h
${CMAKE_CURRENT_SOURCE_DIR}/ImZoomSlider.h
DESTINATION include
)
endif()

install(
EXPORT ${PROJECT_NAME}_target
NAMESPACE ${PROJECT_NAME}::
FILE ${PROJECT_NAME}-config.cmake
DESTINATION share/${PROJECT_NAME}
)
24 changes: 24 additions & 0 deletions ports/imguizmo/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO CedricGuillemet/ImGuizmo
REF 1.83
SHA512 23285398688b4cdf3128ecb918b70c9a52f06c8e911da57430442b838cecf653e233d8cdfefc6acd3e4da381869ffc6fb74bcaaafc8e33657d6060a645517363
HEAD_REF master
)

file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS_DEBUG
-DIMGUIZMO_SKIP_HEADERS=ON
)

vcpkg_cmake_install()

JonathanHiggs marked this conversation as resolved.
Show resolved Hide resolved
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup()

file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
17 changes: 17 additions & 0 deletions ports/imguizmo/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "imguizmo",
"version": "1.83",
"description": "Immediate mode 3D gizmo for scene editing and other controls based on Dear ImGui",
"homepage": "https://github.com/CedricGuillemet/ImGuizmo",
"dependencies": [
"imgui",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2664,6 +2664,10 @@
"baseline": "2.1-2",
"port-version": 0
},
"imguizmo": {
"baseline": "1.83",
"port-version": 0
},
"immer": {
"baseline": "2019-06-07",
"port-version": 0
Expand Down
9 changes: 9 additions & 0 deletions versions/i-/imguizmo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "9611b5ef89fd20182ee8d6c84c505e986f3ea880",
"version": "1.83",
"port-version": 0
}
]
}