forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MyGUI] Add new port (microsoft#11991)
* [MyGUI] Add new port * fix
- Loading branch information
Showing
3 changed files
with
108 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Source: mygui | ||
Version: 2020-06-17 | ||
Build-Depends: freetype, sdl2-image | ||
Homepage: http://mygui.info | ||
Description: Fast, flexible and simple GUI | ||
|
||
Feature: opengl | ||
Description: Use OpenGL render system. | ||
Build-Depends: opengl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
diff --git a/CMake/CMakeLists.txt b/CMake/CMakeLists.txt | ||
index b0fc12a82..6e545edea 100644 | ||
--- a/CMake/CMakeLists.txt | ||
+++ b/CMake/CMakeLists.txt | ||
@@ -5,7 +5,7 @@ | ||
############################################################# | ||
|
||
if(WIN32) | ||
- set(MYGUI_CMAKE_DIR "CMake") | ||
+ set(MYGUI_CMAKE_DIR "share") | ||
else(WIN32) | ||
set(MYGUI_CMAKE_DIR "lib/MYGUI/cmake") | ||
endif(WIN32) | ||
diff --git a/CMake/Utils/MyGUIConfigTargets.cmake b/CMake/Utils/MyGUIConfigTargets.cmake | ||
index d1dbd016d..25c8bbac6 100644 | ||
--- a/CMake/Utils/MyGUIConfigTargets.cmake | ||
+++ b/CMake/Utils/MyGUIConfigTargets.cmake | ||
@@ -6,10 +6,10 @@ if (WIN32) | ||
set(MYGUI_RELWDBG_PATH "/RelWithDebInfo") | ||
set(MYGUI_MINSIZE_PATH "/MinSizeRel") | ||
set(MYGUI_DEBUG_PATH "/Debug") | ||
- set(MYGUI_LIB_RELEASE_PATH "/Release") | ||
+ set(MYGUI_LIB_RELEASE_PATH "") | ||
set(MYGUI_LIB_RELWDBG_PATH "/RelWithDebInfo") | ||
set(MYGUI_LIB_MINSIZE_PATH "/MinSizeRel") | ||
- set(MYGUI_LIB_DEBUG_PATH "/Debug") | ||
+ set(MYGUI_LIB_DEBUG_PATH "") | ||
set(MYGUI_PLUGIN_PATH "/opt") | ||
elseif (UNIX) | ||
set(MYGUI_RELEASE_PATH "") | ||
diff --git a/CMake/Utils/PrecompiledHeader.cmake b/CMake/Utils/PrecompiledHeader.cmake | ||
index a8bf3ce49..104703282 100644 | ||
--- a/CMake/Utils/PrecompiledHeader.cmake | ||
+++ b/CMake/Utils/PrecompiledHeader.cmake | ||
@@ -16,7 +16,7 @@ | ||
macro(use_precompiled_header TARGET HEADER_FILE SRC_FILE) | ||
get_filename_component(HEADER ${HEADER_FILE} NAME) | ||
|
||
- if (MSVC AND NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") | ||
+ if (FALSE) | ||
add_definitions(/Yu"${HEADER}") | ||
set_source_files_properties(${SRC_FILE} | ||
PROPERTIES COMPILE_FLAGS /Yc"${HEADER}" | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index fea0bff8b..5831dfa8a 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -9,6 +9,7 @@ cmake_minimum_required(VERSION 2.6) | ||
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE) | ||
cmake_policy(SET CMP0003 NEW) | ||
cmake_policy(SET CMP0011 NEW) | ||
+cmake_policy(SET CMP0021 OLD) | ||
|
||
project(MYGUI) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# 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 26109822f36a4f7d72d5d8ecd41659897f085a40 | ||
SHA512 4d1f001e8c04d08ad911bc0345a2287b5e17e21284728cf23d7a930e8befb2f85902053e3c90283444bf9e32c7dada2f37c498e735d6314732b297d97ed339e4 | ||
HEAD_REF master | ||
PATCHES | ||
fix-generation.patch | ||
) | ||
|
||
if("opengl" IN_LIST FEATURES) | ||
set(MYGUI_RENDERSYSTEM 4) | ||
else() | ||
set(MYGUI_RENDERSYSTEM 1) | ||
endif() | ||
|
||
vcpkg_configure_cmake( | ||
SOURCE_PATH ${SOURCE_PATH} | ||
PREFER_NINJA | ||
OPTIONS | ||
-DMYGUI_STATIC=TRUE | ||
-DMYGUI_BUILD_DEMOS=FALSE | ||
-DMYGUI_BUILD_PLUGINS=TRUE | ||
-DMYGUI_BUILD_TOOLS=FALSE | ||
-DMYGUI_BUILD_UNITTESTS=FALSE | ||
-DMYGUI_BUILD_TEST_APP=FALSE | ||
-DMYGUI_BUILD_WRAPPER=FALSE | ||
-DMYGUI_BUILD_DOCS=FALSE | ||
-DMYGUI_RENDERSYSTEM=${MYGUI_RENDERSYSTEM} | ||
) | ||
|
||
vcpkg_install_cmake() | ||
|
||
file(REMOVE_RECURSE | ||
${CURRENT_PACKAGES_DIR}/debug/include | ||
${CURRENT_PACKAGES_DIR}/debug/share | ||
) | ||
|
||
# Handle copyright | ||
file(INSTALL ${SOURCE_PATH}/COPYING.MIT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) |