mirror of
https://github.com/cemu-project/vcpkg.git
synced 2024-11-24 11:49:41 +00:00
[freetype] Adjust include paths. Fix cmake config deployment.
This commit is contained in:
parent
a0f621c0fc
commit
c494892eb2
29
ports/freetype/0002-Add-CONFIG_INSTALL_PATH-option.patch
Normal file
29
ports/freetype/0002-Add-CONFIG_INSTALL_PATH-option.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From 59ebd2985f081229edc3c487367a1e5d5ac8db9a Mon Sep 17 00:00:00 2001
|
||||
From: Robert Schumacher <roschuma@microsoft.com>
|
||||
Date: Mon, 10 Oct 2016 23:00:38 -0700
|
||||
Subject: [PATCH] Add CONFIG_INSTALL_PATH option
|
||||
|
||||
---
|
||||
CMakeLists.txt | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 774737d..5de689c 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -401,8 +401,11 @@ install(TARGETS freetype
|
||||
ARCHIVE DESTINATION lib
|
||||
FRAMEWORK DESTINATION Library/Frameworks
|
||||
)
|
||||
+
|
||||
+set(CONFIG_INSTALL_PATH "lib/cmake/freetype" CACHE STRING "location to install cmake config files")
|
||||
+
|
||||
install(EXPORT freetype-targets
|
||||
- DESTINATION lib/cmake/freetype
|
||||
+ DESTINATION ${CONFIG_INSTALL_PATH}
|
||||
FILE freetype-config.cmake
|
||||
)
|
||||
|
||||
--
|
||||
2.9.2.windows.1
|
||||
|
@ -1,3 +1,3 @@
|
||||
Source: freetype
|
||||
Version: 2.6.3
|
||||
Version: 2.6.3-1
|
||||
Description: A library to render fonts.
|
@ -10,26 +10,29 @@ vcpkg_extract_source_archive(${ARCHIVE})
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-Support-Windows-DLLs-via-CMAKE_WINDOWS_EXPORT_ALL_SY.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/0002-Add-CONFIG_INSTALL_PATH-option.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS
|
||||
-DBUILD_SHARED_LIBS=ON
|
||||
-DCONFIG_INSTALL_PATH=share/freetype
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include ${CURRENT_PACKAGES_DIR}/share)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/include/freetype2/freetype ${CURRENT_PACKAGES_DIR}/include/freetype2)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/include/freetype2/ft2build.h ${CURRENT_PACKAGES_DIR}/include/freetype2/ft2build.h)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake/freetype ${CURRENT_PACKAGES_DIR}/share/freetype)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/cmake/freetype/freetype-config-debug.cmake ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-config-debug.cmake)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/include/freetype2/freetype ${CURRENT_PACKAGES_DIR}/include/freetype)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/include/freetype2/ft2build.h ${CURRENT_PACKAGES_DIR}/include/ft2build.h)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/freetype2)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
file(READ ${CURRENT_PACKAGES_DIR}/debug/share/freetype/freetype-config-debug.cmake DEBUG_MODULE)
|
||||
string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" DEBUG_MODULE "${DEBUG_MODULE}")
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-config-debug.cmake "${DEBUG_MODULE}")
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
|
||||
file(COPY
|
||||
${SOURCE_PATH}/docs/LICENSE.TXT
|
||||
${SOURCE_PATH}/docs/FTL.TXT
|
||||
|
Loading…
Reference in New Issue
Block a user