vcpkg/ports/mygui/portfile.cmake
Leonid Pospelov c323ae9a97
[mygui] Update to 3.4.2 (#34006)
* .

* .

* fixwasm32

* v

* fix gl

* version

* fix-static

* versions
2023-09-28 23:25:29 -07:00

61 lines
1.7 KiB
CMake

# MyGUI supports compiling itself as a DLL,
# but it seems platform-related stuff doesn't support dynamic linkage
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO MyGUI/mygui
REF MyGUI${VERSION}
SHA512 202f3df35f0767778b5a91b71dbd1ad3409d0a1977d5fbe3f0d48db430276c71b84edc5a28dd1fdb8e60245b56f2bda99872a4d860b83585f08406b28fb850fe
HEAD_REF master
PATCHES
fix-generation.patch
Install-tools.patch
opengl.patch
sdl2-static.patch
)
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "wasm32")
message(STATUS "Setting MYGUI_RENDERSYSTEM to 8 (GLES) - officially supported MyGUI render system for wasm32")
set(MYGUI_RENDERSYSTEM 8)
elseif("opengl" IN_LIST FEATURES)
set(MYGUI_RENDERSYSTEM 4)
else()
set(MYGUI_RENDERSYSTEM 1)
endif()
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
tools MYGUI_BUILD_TOOLS
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DMYGUI_STATIC=TRUE
-DMYGUI_BUILD_DEMOS=FALSE
-DMYGUI_BUILD_PLUGINS=TRUE
-DMYGUI_BUILD_UNITTESTS=FALSE
-DMYGUI_BUILD_TEST_APP=FALSE
-DMYGUI_BUILD_WRAPPER=FALSE
-DMYGUI_BUILD_DOCS=FALSE
-DMYGUI_RENDERSYSTEM=${MYGUI_RENDERSYSTEM}
${FEATURE_OPTIONS}
)
vcpkg_cmake_install()
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share"
)
vcpkg_fixup_pkgconfig()
if("tools" IN_LIST FEATURES)
vcpkg_copy_tools(TOOL_NAMES FontEditor ImageEditor LayoutEditor SkinEditor AUTO_CLEAN)
endif()
# Handle copyright
file(INSTALL "${SOURCE_PATH}/COPYING.MIT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)