mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-30 20:29:02 +08:00
96f4487c77
* update to 5.12.4 * removed port qt5-modularscripts and split it functionality into more functions into qt5-base * added qt_port_hashes.cmake for simpler upgrade. * added optional VCPKG_QT_HOST_MKSPEC and VCPKG_QT_TARGET_MKSPEC to select QTs build mkspecs from a triplet * qt_<config>.conf are now copied from the build dir instead from the port dir * fixed freetype dependencies. * cleanup of vcpkg_qmake scripts. No strange/unclear replacements anymore. * introduced vcpkg_buildpath_length_warning * changed directory layout of the qt5 installation executables and mkspecs a bit.
26 lines
1.2 KiB
CMake
26 lines
1.2 KiB
CMake
#Could probably be a vcpkg_fix_makefile_install for other ports?
|
|
function(qt_fix_makefile_install BUILD_DIR)
|
|
#Fix the installation location
|
|
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" NATIVE_INSTALLED_DIR)
|
|
file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" NATIVE_PACKAGES_DIR)
|
|
|
|
if(WIN32)
|
|
string(SUBSTRING "${NATIVE_INSTALLED_DIR}" 2 -1 INSTALLED_DIR_WITHOUT_DRIVE)
|
|
string(SUBSTRING "${NATIVE_PACKAGES_DIR}" 2 -1 PACKAGES_DIR_WITHOUT_DRIVE)
|
|
else()
|
|
set(INSTALLED_DIR_WITHOUT_DRIVE ${NATIVE_INSTALLED_DIR})
|
|
set(PACKAGES_DIR_WITHOUT_DRIVE ${NATIVE_PACKAGES_DIR})
|
|
endif()
|
|
|
|
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" NATIVE_INSTALLED_DIR)
|
|
file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" NATIVE_PACKAGES_DIR)
|
|
|
|
file(GLOB_RECURSE MAKEFILES "${BUILD_DIR}/*Makefile*")
|
|
|
|
foreach(MAKEFILE ${MAKEFILES})
|
|
file(READ "${MAKEFILE}" _contents)
|
|
#Set the correct install directory to packages
|
|
string(REPLACE "(INSTALL_ROOT)${INSTALLED_DIR_WITHOUT_DRIVE}" "(INSTALL_ROOT)${PACKAGES_DIR_WITHOUT_DRIVE}" _contents "${_contents}")
|
|
file(WRITE "${MAKEFILE}" "${_contents}")
|
|
endforeach()
|
|
endfunction() |