2019-12-23 22:10:12 +08:00
|
|
|
function(vcpkg_install_qmake)
|
2021-11-06 07:55:23 +08:00
|
|
|
z_vcpkg_function_arguments(args)
|
|
|
|
|
|
|
|
vcpkg_build_qmake(${args})
|
|
|
|
|
|
|
|
file(GLOB_RECURSE release_libs
|
|
|
|
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib"
|
|
|
|
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.a"
|
|
|
|
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.so"
|
|
|
|
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.so.*"
|
|
|
|
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.dylib"
|
2019-12-23 22:10:12 +08:00
|
|
|
)
|
2021-11-06 07:55:23 +08:00
|
|
|
file(GLOB_RECURSE release_bins
|
|
|
|
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.dll"
|
2019-12-23 22:10:12 +08:00
|
|
|
)
|
2021-11-06 07:55:23 +08:00
|
|
|
file(GLOB_RECURSE debug_libs
|
|
|
|
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib"
|
|
|
|
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.a"
|
|
|
|
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.so"
|
|
|
|
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.so.*"
|
|
|
|
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.dylib"
|
2019-12-23 22:10:12 +08:00
|
|
|
)
|
2021-11-06 07:55:23 +08:00
|
|
|
file(GLOB_RECURSE debug_bins
|
|
|
|
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.dll"
|
2019-12-23 22:10:12 +08:00
|
|
|
)
|
2021-11-06 07:55:23 +08:00
|
|
|
if("${release_libs}" STREQUAL "" AND "${debug_libs}" STREQUAL "")
|
2019-12-23 22:10:12 +08:00
|
|
|
message(FATAL_ERROR "Build did not appear to produce any libraries. If this is intended, use `vcpkg_build_qmake()` directly.")
|
|
|
|
endif()
|
2021-11-06 07:55:23 +08:00
|
|
|
if(NOT "${release_libs}" STREQUAL "")
|
|
|
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/lib")
|
|
|
|
file(COPY ${release_libs} DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
|
2019-12-23 22:10:12 +08:00
|
|
|
endif()
|
2021-11-06 07:55:23 +08:00
|
|
|
if(NOT "${debug_libs}" STREQUAL "")
|
|
|
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/lib")
|
|
|
|
file(COPY ${debug_libs} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
|
2019-12-23 22:10:12 +08:00
|
|
|
endif()
|
2021-11-06 07:55:23 +08:00
|
|
|
if(NOT "${release_bins}" STREQUAL "")
|
|
|
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/bin")
|
|
|
|
file(COPY ${release_bins} DESTINATION "${CURRENT_PACKAGES_DIR}/bin")
|
2019-12-23 22:10:12 +08:00
|
|
|
endif()
|
2021-11-06 07:55:23 +08:00
|
|
|
if(NOT "${debug_bins}" STREQUAL "")
|
|
|
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/bin")
|
|
|
|
file(COPY ${debug_bins} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin")
|
2019-12-23 22:10:12 +08:00
|
|
|
endif()
|
|
|
|
endfunction()
|