Skip to content

Commit

Permalink
[glib] use win_iconv and add subdir for tools
Browse files Browse the repository at this point in the history
  • Loading branch information
codicodi committed Jan 14, 2017
1 parent 912278d commit ccd3e39
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 25 deletions.
4 changes: 2 additions & 2 deletions ports/glib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
install(FILES gobject/glib-mkenums DESTINATION tools/glib)

add_gio_tool(gdbus gio/gdbus-tool.c)
add_gio_tool(gio-querymodules gio/gio-querymodules.c)
Expand All @@ -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)
install(TARGETS ${GLIB_TOOLS} RUNTIME DESTINATION tools/glib)
endif()

install(TARGETS ${GLIB_TARGETS} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib)
Expand Down
7 changes: 1 addition & 6 deletions ports/glib/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,10 @@ 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}
Expand All @@ -35,7 +30,7 @@ vcpkg_configure_cmake(

vcpkg_install_cmake()
vcpkg_copy_pdbs()
vcpkg_copy_tool_dependencies()
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/glib)

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)
Expand Down
14 changes: 0 additions & 14 deletions ports/glib/use-libiconv-on-windows.patch

This file was deleted.

6 changes: 3 additions & 3 deletions scripts/cmake/vcpkg_copy_tool_dependencies.cmake
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Copy dlls for all tools in ${CURRENT_PACKAGES_DIR}/tools
# Copy dlls for all tools in TOOL_DIR

function(vcpkg_copy_tool_dependencies)
function(vcpkg_copy_tool_dependencies TOOL_DIR)
macro(search_for_dependencies PATH_TO_SEARCH)
file(GLOB TOOLS ${CURRENT_PACKAGES_DIR}/tools/*.exe ${CURRENT_PACKAGES_DIR}/tools/*.dll)
file(GLOB TOOLS ${TOOL_DIR}/*.exe ${TOOL_DIR}/*.dll)
foreach(TOOL ${TOOLS})
execute_process(COMMAND powershell -noprofile -executionpolicy UnRestricted -nologo
-file ${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/applocal.ps1
Expand Down

0 comments on commit ccd3e39

Please sign in to comment.