mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
Revert "[glib] use win_iconv and add subdir for tools"
This reverts commit ccd3e399f023129a39bb9a402324676a9391a970.
This commit is contained in:
parent
5e1c18cd56
commit
eb7ccc1223
@ -123,7 +123,7 @@ endmacro()
|
||||
|
||||
if(NOT GLIB_SKIP_TOOLS)
|
||||
configure_file(gobject/glib-mkenums.in ${CMAKE_SOURCE_DIR}/gobject/glib-mkenums @ONLY) # uses GLIB_VERSION
|
||||
install(FILES gobject/glib-mkenums DESTINATION tools/glib)
|
||||
install(FILES gobject/glib-mkenums DESTINATION tools)
|
||||
|
||||
add_gio_tool(gdbus gio/gdbus-tool.c)
|
||||
add_gio_tool(gio-querymodules gio/gio-querymodules.c)
|
||||
@ -145,7 +145,7 @@ if(NOT GLIB_SKIP_TOOLS)
|
||||
add_glib_tool(gspawn-${WIN}-helper WIN32 glib/gspawn-win32-helper.c)
|
||||
add_glib_tool(gspawn-${WIN}-helper-console glib/gspawn-win32-helper-console.c)
|
||||
|
||||
install(TARGETS ${GLIB_TOOLS} RUNTIME DESTINATION tools/glib)
|
||||
install(TARGETS ${GLIB_TOOLS} RUNTIME DESTINATION tools)
|
||||
endif()
|
||||
|
||||
install(TARGETS ${GLIB_TARGETS} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib)
|
||||
|
@ -17,10 +17,15 @@ vcpkg_download_distfile(ARCHIVE
|
||||
SHA512 63d7b5ece8d7d15b10e06ef10a8e0a4446f30a8d9c97daa3352ec00dfef622728bd42ed24cbf67e553166a0f9e29a3e3d024d1d085b9804fd67608db438b6771)
|
||||
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES
|
||||
${CMAKE_CURRENT_LIST_DIR}/use-libiconv-on-windows.patch)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/cmake DESTINATION ${SOURCE_PATH})
|
||||
file(REMOVE_RECURSE ${SOURCE_PATH}/glib/pcre)
|
||||
file(REMOVE ${SOURCE_PATH}/glib/win_iconv.c)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
@ -30,7 +35,7 @@ vcpkg_configure_cmake(
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/glib)
|
||||
vcpkg_copy_tool_dependencies()
|
||||
|
||||
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/glib)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/glib/COPYING ${CURRENT_PACKAGES_DIR}/share/glib/copyright)
|
||||
|
14
ports/glib/use-libiconv-on-windows.patch
Normal file
14
ports/glib/use-libiconv-on-windows.patch
Normal file
@ -0,0 +1,14 @@
|
||||
diff --git a/glib/gconvert.c b/glib/gconvert.c
|
||||
index 3deac78..134ded9 100644
|
||||
--- a/glib/gconvert.c
|
||||
+++ b/glib/gconvert.c
|
||||
@@ -30,7 +30,8 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
-#include "win_iconv.c"
|
||||
+#define USE_LIBICONV_GNU
|
||||
+#include <iconv.h>
|
||||
#endif
|
||||
|
||||
#ifdef G_PLATFORM_WIN32
|
@ -1,8 +1,8 @@
|
||||
# Copy dlls for all tools in TOOL_DIR
|
||||
# Copy dlls for all tools in ${CURRENT_PACKAGES_DIR}/tools
|
||||
|
||||
function(vcpkg_copy_tool_dependencies TOOL_DIR)
|
||||
function(vcpkg_copy_tool_dependencies)
|
||||
macro(search_for_dependencies PATH_TO_SEARCH)
|
||||
file(GLOB TOOLS ${TOOL_DIR}/*.exe ${TOOL_DIR}/*.dll)
|
||||
file(GLOB TOOLS ${CURRENT_PACKAGES_DIR}/tools/*.exe ${CURRENT_PACKAGES_DIR}/tools/*.dll)
|
||||
foreach(TOOL ${TOOLS})
|
||||
execute_process(COMMAND powershell -noprofile -executionpolicy UnRestricted -nologo
|
||||
-file ${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/applocal.ps1
|
||||
|
Loading…
x
Reference in New Issue
Block a user