mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-30 20:59:12 +08:00
Add AUTOCONF support with vcpkg_configure_make. (#8610)
This commit is contained in:
parent
6e30ee1ae8
commit
b99d073412
@ -103,10 +103,6 @@ function(vcpkg_configure_make)
|
|||||||
message(FATAL_ERROR "${_csc_GENERATOR} not supported.")
|
message(FATAL_ERROR "${_csc_GENERATOR} not supported.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (_csc_AUTOCONFIG AND NOT CMAKE_HOST_WIN32)
|
|
||||||
find_program(autoreconf autoreconf REQUIRED)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(WIN_TARGET_ARCH )
|
set(WIN_TARGET_ARCH )
|
||||||
set(WIN_TARGET_COMPILER )
|
set(WIN_TARGET_COMPILER )
|
||||||
# Detect compiler
|
# Detect compiler
|
||||||
@ -123,7 +119,11 @@ function(vcpkg_configure_make)
|
|||||||
if (CMAKE_HOST_WIN32)
|
if (CMAKE_HOST_WIN32)
|
||||||
vcpkg_find_acquire_program(YASM)
|
vcpkg_find_acquire_program(YASM)
|
||||||
vcpkg_find_acquire_program(PERL)
|
vcpkg_find_acquire_program(PERL)
|
||||||
vcpkg_acquire_msys(MSYS_ROOT PACKAGES diffutils)
|
set(MSYS_REQUIRE_PACKAGES diffutils)
|
||||||
|
if (_csc_AUTOCONFIG)
|
||||||
|
set(MSYS_REQUIRE_PACKAGES ${MSYS_REQUIRE_PACKAGES} autoconf automake m4 libtool perl)
|
||||||
|
endif()
|
||||||
|
vcpkg_acquire_msys(MSYS_ROOT PACKAGES ${MSYS_REQUIRE_PACKAGES})
|
||||||
get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY)
|
get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY)
|
||||||
get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY)
|
get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY)
|
||||||
|
|
||||||
@ -139,6 +139,8 @@ function(vcpkg_configure_make)
|
|||||||
set(WIN_TARGET_COMPILER CC=cl)
|
set(WIN_TARGET_COMPILER CC=cl)
|
||||||
set(ENV{PATH} "$ENV{PATH};${YASM_EXE_PATH};${MSYS_ROOT}/usr/bin;${PERL_EXE_PATH}")
|
set(ENV{PATH} "$ENV{PATH};${YASM_EXE_PATH};${MSYS_ROOT}/usr/bin;${PERL_EXE_PATH}")
|
||||||
set(BASH ${MSYS_ROOT}/usr/bin/bash.exe)
|
set(BASH ${MSYS_ROOT}/usr/bin/bash.exe)
|
||||||
|
elseif (_csc_AUTOCONFIG)
|
||||||
|
find_program(autoreconf autoreconf REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT _csc_NO_DEBUG)
|
if (NOT _csc_NO_DEBUG)
|
||||||
@ -253,12 +255,20 @@ function(vcpkg_configure_make)
|
|||||||
|
|
||||||
if (_csc_AUTOCONFIG)
|
if (_csc_AUTOCONFIG)
|
||||||
message(STATUS "Generating configure with ${TARGET_TRIPLET}-dbg")
|
message(STATUS "Generating configure with ${TARGET_TRIPLET}-dbg")
|
||||||
|
if (CMAKE_HOST_WIN32)
|
||||||
|
vcpkg_execute_required_process(
|
||||||
|
COMMAND ${base_cmd} autoreconf -vfi
|
||||||
|
WORKING_DIRECTORY ${_csc_SOURCE_PATH}/${_csc_PROJECT_SUBPATH}
|
||||||
|
LOGNAME prerun-${TAR_TRIPLET_DIR}
|
||||||
|
)
|
||||||
|
else()
|
||||||
vcpkg_execute_required_process(
|
vcpkg_execute_required_process(
|
||||||
COMMAND autoreconf -vfi
|
COMMAND autoreconf -vfi
|
||||||
WORKING_DIRECTORY ${PRJ_DIR}
|
WORKING_DIRECTORY ${PRJ_DIR}
|
||||||
LOGNAME prerun-${TARGET_TRIPLET}-dbg
|
LOGNAME prerun-${TAR_TRIPLET_DIR}
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
message(STATUS "Configuring ${TARGET_TRIPLET}-dbg")
|
message(STATUS "Configuring ${TARGET_TRIPLET}-dbg")
|
||||||
vcpkg_execute_required_process(
|
vcpkg_execute_required_process(
|
||||||
@ -318,12 +328,20 @@ function(vcpkg_configure_make)
|
|||||||
|
|
||||||
if (_csc_AUTOCONFIG)
|
if (_csc_AUTOCONFIG)
|
||||||
message(STATUS "Generating configure with ${TAR_TRIPLET_DIR}")
|
message(STATUS "Generating configure with ${TAR_TRIPLET_DIR}")
|
||||||
|
if (CMAKE_HOST_WIN32)
|
||||||
|
vcpkg_execute_required_process(
|
||||||
|
COMMAND ${base_cmd} autoreconf -vfi
|
||||||
|
WORKING_DIRECTORY ${_csc_SOURCE_PATH}/${_csc_PROJECT_SUBPATH}
|
||||||
|
LOGNAME prerun-${TAR_TRIPLET_DIR}
|
||||||
|
)
|
||||||
|
else()
|
||||||
vcpkg_execute_required_process(
|
vcpkg_execute_required_process(
|
||||||
COMMAND autoreconf -vfi
|
COMMAND autoreconf -vfi
|
||||||
WORKING_DIRECTORY ${PRJ_DIR}
|
WORKING_DIRECTORY ${PRJ_DIR}
|
||||||
LOGNAME prerun-${TAR_TRIPLET_DIR}
|
LOGNAME prerun-${TAR_TRIPLET_DIR}
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
message(STATUS "Configuring ${TAR_TRIPLET_DIR}")
|
message(STATUS "Configuring ${TAR_TRIPLET_DIR}")
|
||||||
vcpkg_execute_required_process(
|
vcpkg_execute_required_process(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user