2016-09-18 20:50:08 -07:00
|
|
|
include(vcpkg_execute_required_process)
|
|
|
|
|
|
|
|
function(vcpkg_extract_source_archive ARCHIVE)
|
2016-09-20 21:09:00 -07:00
|
|
|
get_filename_component(ARCHIVE_FILENAME ${ARCHIVE} NAME)
|
|
|
|
if(NOT EXISTS ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_FILENAME}.extracted)
|
2016-09-18 20:50:08 -07:00
|
|
|
message(STATUS "Extracting source ${ARCHIVE}")
|
|
|
|
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src)
|
|
|
|
vcpkg_execute_required_process(
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E tar xjf ${ARCHIVE}
|
|
|
|
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src
|
|
|
|
LOGNAME extract
|
|
|
|
)
|
2016-09-20 21:09:00 -07:00
|
|
|
file(WRITE ${CURRENT_BUILDTREES_DIR}/src/${ARCHIVE_FILENAME}.extracted)
|
2016-09-18 20:50:08 -07:00
|
|
|
endif()
|
|
|
|
message(STATUS "Extracting done")
|
|
|
|
endfunction()
|