2022-08-05 10:18:37 +08:00
|
|
|
if(NOT "sdl2" IN_LIST FEATURES AND NOT "sfml" IN_LIST FEATURES)
|
|
|
|
message(FATAL_ERROR "At least one of the backend features must be selected: sdl2 sfml")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(VCPKG_TARGET_IS_ANDROID)
|
|
|
|
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
|
|
|
elseif(VCPKG_TARGET_IS_IOS)
|
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
endif()
|
|
|
|
|
2019-04-25 05:13:04 +08:00
|
|
|
vcpkg_from_github(
|
2019-03-06 04:03:17 +08:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2019-04-25 05:13:04 +08:00
|
|
|
REPO texus/TGUI
|
2023-11-10 03:04:52 +08:00
|
|
|
REF "v${VERSION}"
|
|
|
|
SHA512 0896551286a40ea5b6e778018473bd230c7c3052cf19cbecfdc00789f029e9a753e569fdd5aab6f2e1e74c5fb8873bf1f7389e66abeaa3d628d6032941af331e
|
|
|
|
HEAD_REF 1.x
|
2021-05-18 14:24:46 +08:00
|
|
|
PATCHES
|
2022-08-05 10:18:37 +08:00
|
|
|
devendor-stb.patch
|
2019-03-06 04:03:17 +08:00
|
|
|
)
|
|
|
|
|
2022-08-05 10:18:37 +08:00
|
|
|
file(REMOVE_RECURSE "${SOURCE_PATH}/src/Backends/SDL/cmake_modules") # Config available
|
|
|
|
file(REMOVE_RECURSE "${SOURCE_PATH}/include/TGUI/extlibs/stb")
|
2019-03-09 09:51:27 +08:00
|
|
|
|
2022-08-05 10:18:37 +08:00
|
|
|
set(TGUI_SHARE_PATH "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
|
|
set(TGUI_TOOLS_PATH "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
|
|
|
|
|
|
|
|
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" TGUI_USE_STATIC_STD_LIBS)
|
2019-03-09 09:51:27 +08:00
|
|
|
|
2021-05-18 14:24:46 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
2024-01-30 12:06:24 +08:00
|
|
|
sdl2 TGUI_HAS_BACKEND_SDL_RENDERER
|
|
|
|
sfml TGUI_HAS_BACKEND_SFML_GRAPHICS
|
2021-05-18 14:24:46 +08:00
|
|
|
tool TGUI_BUILD_GUI_BUILDER
|
|
|
|
)
|
2019-03-07 02:12:58 +08:00
|
|
|
|
2022-02-23 03:47:23 +08:00
|
|
|
vcpkg_cmake_configure(
|
2019-03-09 09:51:27 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2020-02-04 06:22:52 +08:00
|
|
|
DISABLE_PARALLEL_CONFIGURE
|
2022-08-05 10:18:37 +08:00
|
|
|
OPTIONS
|
|
|
|
${FEATURE_OPTIONS}
|
|
|
|
"-DTGUI_MISC_INSTALL_PREFIX=${TGUI_SHARE_PATH}"
|
|
|
|
"-DCMAKE_INSTALL_DOCDIR=${TGUI_SHARE_PATH}"
|
|
|
|
-DTGUI_USE_STATIC_STD_LIBS=${TGUI_USE_STATIC_STD_LIBS}
|
2021-06-08 06:50:11 +08:00
|
|
|
-DTGUI_BACKEND=Custom
|
2022-08-05 10:18:37 +08:00
|
|
|
-DTGUI_BUILD_DOC=OFF
|
|
|
|
-DTGUI_BUILD_FRAMEWORK=OFF
|
|
|
|
-DTGUI_INSTALL_PKGCONFIG_FILES=OFF
|
|
|
|
OPTIONS_DEBUG
|
|
|
|
-DTGUI_BUILD_GUI_BUILDER=OFF
|
|
|
|
MAYBE_UNUSED_VARIABLES
|
2024-01-30 12:06:24 +08:00
|
|
|
TGUI_USE_STATIC_STD_LIBS
|
2019-03-06 04:03:17 +08:00
|
|
|
)
|
|
|
|
|
2022-02-23 03:47:23 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/TGUI)
|
2019-03-06 04:03:17 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2021-05-18 14:24:46 +08:00
|
|
|
if("tool" IN_LIST FEATURES)
|
|
|
|
message(STATUS "Check for: ${TGUI_SHARE_PATH}/gui-builder/gui-builder${VCPKG_TARGET_EXECUTABLE_SUFFIX}")
|
|
|
|
if(EXISTS "${TGUI_SHARE_PATH}/gui-builder/gui-builder${VCPKG_TARGET_EXECUTABLE_SUFFIX}")
|
2019-03-09 09:51:27 +08:00
|
|
|
file(MAKE_DIRECTORY "${TGUI_TOOLS_PATH}")
|
[openexr,openimageio,suitesparse,theia] updates for non-win32 (#6371)
* [openexr,openimageio,suitesparse,theia] updates for non-win32
* [theia] use only valid cmake symbols
* [suitesparse] Fix build
* [lapack] still not properly integrating with other ports
* [lapack] intercept cmake module calls and substitute them with our defs
* [suitesparse,clapack] fixes for proper integration
* [ceres,clapack] bump CONTROL
* [suitesparse] remove unnecessary defs
* [clapack] improve wrapper logic
* [WIN32] remove wrong symbol
* [clapack] fix wrapper integration
* [Accelerate] use best framework when available
* [clapack] separate config from wrapper
* [clapack] fix paths and filenames
* [mlpack,armadillo,clapack] improve library handling
* [mlpack] remove unnecessary cmake option
* [clp,coinutils,osi,liblemon] dependencies of openmvg, improve compatibility with non-win32
* [openmvg] fix for case-sensitive filesystems
* [clp,coinutils,osi] simplify CMakeLists removing many unnecessary steps
* [sophus] Force rebuild
* [theia] fixes for linux, part1
* [io2d] remove broken sintax
* [fontconfig] bump version to remove CI cached failure
* [theia] fixes for linux, part2
* [theia] remove unnecessary empty folders and comments from portfile
* [theia] use correct build type removing forced vars in cmakelists.txt
* [openmvg] add missing suitesparse target detection
* [sophus] fix Suitesparse dependency
* [sophus,openmvg] use suitesparse lowercase for module compatibility on case-sensitive filesystems
* [suitesparse] fixes for case-sensitive filesystems
* [openmvg] use correct Eigen3 name for case-sensitive filesystems
* [sophus] trigger rebuild
* [shogun] use modern vcpkg style
* [shogun] add missing cmake system processor symbol
2019-06-01 06:48:17 +08:00
|
|
|
file(RENAME
|
2021-05-18 14:24:46 +08:00
|
|
|
"${TGUI_SHARE_PATH}/gui-builder/gui-builder${VCPKG_TARGET_EXECUTABLE_SUFFIX}"
|
|
|
|
"${TGUI_TOOLS_PATH}/gui-builder${VCPKG_TARGET_EXECUTABLE_SUFFIX}")
|
2019-03-09 09:51:27 +08:00
|
|
|
# Need to copy `resources` and `themes` directories
|
|
|
|
file(COPY "${TGUI_SHARE_PATH}/gui-builder/resources" DESTINATION "${TGUI_TOOLS_PATH}")
|
|
|
|
file(COPY "${TGUI_SHARE_PATH}/gui-builder/themes" DESTINATION "${TGUI_TOOLS_PATH}")
|
|
|
|
file(REMOVE_RECURSE "${TGUI_SHARE_PATH}/gui-builder")
|
|
|
|
vcpkg_copy_tool_dependencies("${TGUI_TOOLS_PATH}")
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2022-08-05 10:18:37 +08:00
|
|
|
file(REMOVE_RECURSE
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
|
|
|
# Empty folders
|
|
|
|
"${CURRENT_PACKAGES_DIR}/include/TGUI/extlibs/nanosvg"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/include/TGUI/extlibs/glad"
|
|
|
|
)
|
2022-02-23 03:47:23 +08:00
|
|
|
|
2022-08-05 10:18:37 +08:00
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/share/${PORT}/license.txt" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright")
|