mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-15 12:31:48 +08:00
473d63c4ed
* fix da qt5 * fix qt config duplication * [qt5-base] Use vcpkg_extract_source_archive_ex [sqlite3] Enable SQLITE_ENABLE_COLUMN_METADATA * [qt5-*] Update sub-portfiles * qt5-base WIP * [qt5] Fix Could not find qmlcachegen.exe * [qt5-activeqt] Fix SHA512 * [qt5-base] Fix static builds * [qt5-base] Bump control version * [qt5-base] Restore removal of qmake dependencies * [qt5-base] Partially revert #3280 * [qt5-base][vcpkg_build_qmake] Fix Qt5Bootstrap.lib issues
70 lines
2.8 KiB
CMake
70 lines
2.8 KiB
CMake
function(configure_qt)
|
|
cmake_parse_arguments(_csc "" "SOURCE_PATH;PLATFORM" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" ${ARGN})
|
|
|
|
if(NOT _csc_PLATFORM)
|
|
message(FATAL_ERROR "configure_qt requires a PLATFORM argument.")
|
|
endif()
|
|
|
|
vcpkg_find_acquire_program(PERL)
|
|
get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
|
|
set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH}")
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
list(APPEND _csc_OPTIONS "-static")
|
|
endif()
|
|
|
|
if(VCPKG_CRT_LINKAGE STREQUAL "static")
|
|
list(APPEND _csc_OPTIONS "-static-runtime")
|
|
endif()
|
|
|
|
if(CMAKE_HOST_WIN32)
|
|
set(CONFIGURE_BAT "configure.bat")
|
|
else()
|
|
set(CONFIGURE_BAT "configure")
|
|
endif()
|
|
|
|
message(STATUS "Configuring ${TARGET_TRIPLET}-dbg")
|
|
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
|
|
vcpkg_execute_required_process(
|
|
COMMAND "${_csc_SOURCE_PATH}/${CONFIGURE_BAT}" ${_csc_OPTIONS} ${_csc_OPTIONS_DEBUG}
|
|
-debug
|
|
-prefix ${CURRENT_INSTALLED_DIR}/debug
|
|
-extprefix ${CURRENT_PACKAGES_DIR}/debug
|
|
-hostbindir ${CURRENT_PACKAGES_DIR}/debug/tools/qt5
|
|
-archdatadir ${CURRENT_PACKAGES_DIR}/share/qt5/debug
|
|
-datadir ${CURRENT_PACKAGES_DIR}/share/qt5/debug
|
|
-plugindir ${CURRENT_PACKAGES_DIR}/debug/plugins
|
|
-qmldir ${CURRENT_PACKAGES_DIR}/debug/qml
|
|
-headerdir ${CURRENT_PACKAGES_DIR}/include
|
|
-I ${CURRENT_INSTALLED_DIR}/include
|
|
-L ${CURRENT_INSTALLED_DIR}/debug/lib
|
|
-platform ${_csc_PLATFORM}
|
|
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg
|
|
LOGNAME config-${TARGET_TRIPLET}-dbg
|
|
)
|
|
message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done")
|
|
|
|
message(STATUS "Configuring ${TARGET_TRIPLET}-rel")
|
|
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
|
|
vcpkg_execute_required_process(
|
|
COMMAND "${_csc_SOURCE_PATH}/${CONFIGURE_BAT}" ${_csc_OPTIONS} ${_csc_OPTIONS_RELEASE}
|
|
-release
|
|
-prefix ${CURRENT_INSTALLED_DIR}
|
|
-extprefix ${CURRENT_PACKAGES_DIR}
|
|
-hostbindir ${CURRENT_PACKAGES_DIR}/tools/qt5
|
|
-archdatadir ${CURRENT_PACKAGES_DIR}/share/qt5
|
|
-datadir ${CURRENT_PACKAGES_DIR}/share/qt5
|
|
-plugindir ${CURRENT_PACKAGES_DIR}/plugins
|
|
-qmldir ${CURRENT_PACKAGES_DIR}/qml
|
|
-I ${CURRENT_INSTALLED_DIR}/include
|
|
-L ${CURRENT_INSTALLED_DIR}/lib
|
|
-platform ${_csc_PLATFORM}
|
|
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
|
|
LOGNAME config-${TARGET_TRIPLET}-rel
|
|
)
|
|
message(STATUS "Configuring ${TARGET_TRIPLET}-rel done")
|
|
|
|
endfunction()
|