mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-29 18:09:22 +08:00
Adding Freetype-GL port
This commit is contained in:
parent
7edfa3c802
commit
5172654b3c
24
ports/freetype-gl/0001-Use-external-Glew-and-Freetype.patch
Normal file
24
ports/freetype-gl/0001-Use-external-Glew-and-Freetype.patch
Normal file
@ -0,0 +1,24 @@
|
||||
From 653dae652bac66e4e96a94ba8ebfabb2227738b7 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Olivier <dan_olivier@hotmail.com>
|
||||
Date: Thu, 19 Oct 2017 21:26:09 -0400
|
||||
Subject: [PATCH] Use external Glew and Freetype
|
||||
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 4eb55e9..2546de6 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -74,13 +74,6 @@ if(NOT HAVE_M_PI)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
-if(NOT MINGW AND (WIN32 OR WIN64))
|
||||
- set(GLEW_ROOT_DIR
|
||||
- ${CMAKE_CURRENT_SOURCE_DIR}/windows/glew)
|
||||
- set(ENV{FREETYPE_DIR}
|
||||
- ${CMAKE_CURRENT_SOURCE_DIR}/windows/freetype)
|
||||
-endif()
|
||||
-
|
||||
find_package(OpenGL REQUIRED)
|
||||
find_package(Freetype REQUIRED)
|
||||
|
4
ports/freetype-gl/CONTROL
Normal file
4
ports/freetype-gl/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: freetype-gl
|
||||
Version:
|
||||
Description:
|
||||
Build-Depends: glew, freetype
|
63
ports/freetype-gl/portfile.cmake
Normal file
63
ports/freetype-gl/portfile.cmake
Normal file
@ -0,0 +1,63 @@
|
||||
# Common Ambient Variables:
|
||||
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
|
||||
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
|
||||
# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
|
||||
# PORT = current port name (zlib, etc)
|
||||
# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
|
||||
# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
|
||||
# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
|
||||
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
|
||||
# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
|
||||
#
|
||||
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/freetype-gl)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO rougier/freetype-gl
|
||||
REF 82fb152a74f01b1483ac80d15935fbdfaf3ed836
|
||||
SHA512 4842d9e66fd25dbb3a4e3f4bf597a0c1fc3c3c30e0cb1baae1c3306ddcb663ff9108d8fc01bde539fea7cb03a6329054f66166d9e448086358ab7b05953f5884
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-Use-external-Glew-and-Freetype.patch"
|
||||
)
|
||||
|
||||
# make sure that no "internal" libraries are used by removing them
|
||||
file(REMOVE_RECURSE ${SOURCE_PATH}/windows/freetype)
|
||||
file(REMOVE_RECURSE ${SOURCE_PATH}/windows/AntTweakBar)
|
||||
file(REMOVE_RECURSE ${SOURCE_PATH}/windows/glew)
|
||||
file(REMOVE ${SOURCE_PATH}/cmake/Modules/FindGLEW.cmake)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
#PREFER_NINJA
|
||||
# OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
|
||||
# OPTIONS_RELEASE -DOPTIMIZE=1
|
||||
# OPTIONS_DEBUG -DDEBUGGABLE=1
|
||||
OPTIONS
|
||||
-Dfreetype-gl_BUILD_APIDOC=OFF
|
||||
-Dfreetype-gl_BUILD_DEMOS=OFF
|
||||
-Dfreetype-gl_BUILD_TESTS=OFF
|
||||
)
|
||||
|
||||
# We may soon install using a modified cmake process with install target
|
||||
#vcpkg_install_cmake()
|
||||
vcpkg_build_cmake(LOGFILE_ROOT install)
|
||||
|
||||
file(GLOB HEADER_FILES "${SOURCE_PATH}/*.h")
|
||||
file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/freetype-gl)
|
||||
|
||||
# DLL & LIB
|
||||
file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/freetype-gl.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
||||
file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/freetype-gl.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
#file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/makefont.exe DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
||||
#file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/makefont.exe DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/freetype-gl RENAME copyright)
|
Loading…
Reference in New Issue
Block a user