diff options
| author | Griffin Downs <35574547+grdowns@users.noreply.github.com> | 2019-04-12 02:30:59 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-12 02:30:59 -0700 |
| commit | 0e000644053015b7f7a0985e14f0bd384c847d17 (patch) | |
| tree | 7e456fd12b3bf281b28587338f1650017c8b32ab /ports/qt5-modularscripts | |
| parent | 93ce6b4f27602cd18f4327c2cfd84093d472b8bb (diff) | |
| parent | 39ba5b2b30c9f7b49e777a62093cdd49d05b53a9 (diff) | |
| download | vcpkg-0e000644053015b7f7a0985e14f0bd384c847d17.tar.gz vcpkg-0e000644053015b7f7a0985e14f0bd384c847d17.zip | |
Merge branch 'master' into master
Diffstat (limited to 'ports/qt5-modularscripts')
| -rw-r--r-- | ports/qt5-modularscripts/CONTROL | 2 | ||||
| -rw-r--r-- | ports/qt5-modularscripts/qt_modular_library.cmake | 19 |
2 files changed, 17 insertions, 4 deletions
diff --git a/ports/qt5-modularscripts/CONTROL b/ports/qt5-modularscripts/CONTROL index eedb58432..f8e6f4894 100644 --- a/ports/qt5-modularscripts/CONTROL +++ b/ports/qt5-modularscripts/CONTROL @@ -1,3 +1,3 @@ Source: qt5-modularscripts -Version: 2019-02-02 +Version: 2019-03-21 Description: Vcpkg helpers to package qt5 modules diff --git a/ports/qt5-modularscripts/qt_modular_library.cmake b/ports/qt5-modularscripts/qt_modular_library.cmake index a99d18478..9f6d23fa1 100644 --- a/ports/qt5-modularscripts/qt_modular_library.cmake +++ b/ports/qt5-modularscripts/qt_modular_library.cmake @@ -1,6 +1,6 @@ set(_qt5base_port_dir "${CMAKE_CURRENT_LIST_DIR}") -function(qt_modular_library NAME HASH) +function(qt_modular_fetch_library NAME HASH TARGET_SOURCE_PATH) string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) if(BUILDTREES_PATH_LENGTH GREATER 45) message(WARNING "Qt5's buildsystem uses very long paths and may fail on your system.\n" @@ -23,6 +23,10 @@ function(qt_modular_library NAME HASH) REF ${FULL_VERSION} ) + set(${TARGET_SOURCE_PATH} ${SOURCE_PATH} PARENT_SCOPE) +endfunction() + +function(qt_modular_build_library SOURCE_PATH) # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings set(ENV{_CL_} "/utf-8") @@ -38,8 +42,13 @@ function(qt_modular_library NAME HASH) file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" NATIVE_INSTALLED_DIR) file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" NATIVE_PACKAGES_DIR) - string(SUBSTRING "${NATIVE_INSTALLED_DIR}" 2 -1 INSTALLED_DIR_WITHOUT_DRIVE) - string(SUBSTRING "${NATIVE_PACKAGES_DIR}" 2 -1 PACKAGES_DIR_WITHOUT_DRIVE) + 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() #Configure debug+release vcpkg_configure_qmake(SOURCE_PATH ${SOURCE_PATH}) @@ -134,5 +143,9 @@ function(qt_modular_library NAME HASH) set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3-EXCEPT") endif() file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +endfunction() +function(qt_modular_library NAME HASH) + qt_modular_fetch_library(${NAME} ${HASH} TARGET_SOURCE_PATH) + qt_modular_build_library(${TARGET_SOURCE_PATH}) endfunction() |
