Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix separate make and install execution error issue. #8540

Merged
merged 3 commits into from Oct 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion ports/freexl/CONTROL
@@ -1,5 +1,5 @@
Source: freexl
Version: 1.0.4-7
Version: 1.0.4-8
Homepage: https://www.gaia-gis.it/gaia-sins/freexl-sources
Description: FreeXL is an open source library to extract valid data from within an Excel (.xls) spreadsheet
Build-Depends: libiconv
2 changes: 1 addition & 1 deletion ports/x264/CONTROL
@@ -1,4 +1,4 @@
Source: x264
Version: 157-303c484ec828ed0-4
Version: 157-303c484ec828ed0-6
Homepage: https://github.com/mirror/x264
Description: x264 is a free software library and application for encoding video streams into the H.264/MPEG-4 AVC compression format
46 changes: 29 additions & 17 deletions scripts/cmake/vcpkg_build_make.cmake
Expand Up @@ -54,15 +54,15 @@ function(vcpkg_build_make)
# Set make command and install command
set(MAKE ${BASH} --noprofile --norc -c "${_VCPKG_PROJECT_SUBPATH}make")
# Must use absolute path to call make in windows
set(MAKE_OPTS "-j ${VCPKG_CONCURRENCY}")
set(INSTALL_OPTS "install -j ${VCPKG_CONCURRENCY}")
set(MAKE_OPTS -j ${VCPKG_CONCURRENCY})
set(INSTALL_OPTS install -j ${VCPKG_CONCURRENCY})
else()
# Compiler requriements
find_program(MAKE make REQUIRED)
set(MAKE make)
set(MAKE make;)
# Set make command and install command
set(MAKE_OPTS -j ${VCPKG_CONCURRENCY})
set(INSTALL_OPTS install -j ${VCPKG_CONCURRENCY})
set(MAKE_OPTS -j;${VCPKG_CONCURRENCY})
set(INSTALL_OPTS install;-j;${VCPKG_CONCURRENCY})
endif()
elseif (_VCPKG_MAKE_GENERATOR STREQUAL "nmake")
find_program(NMAKE nmake REQUIRED)
Expand Down Expand Up @@ -120,11 +120,19 @@ function(vcpkg_build_make)
endif()
endif()

vcpkg_execute_build_process(
COMMAND ${MAKE} ${MAKE_OPTS}
WORKING_DIRECTORY ${WORKING_DIRECTORY}
LOGNAME "${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}${SHORT_BUILDTYPE}"
)
if (CMAKE_HOST_WIN32)
vcpkg_execute_build_process(
COMMAND "${MAKE} ${MAKE_OPTS}"
WORKING_DIRECTORY ${WORKING_DIRECTORY}
LOGNAME "${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}${SHORT_BUILDTYPE}"
)
else()
vcpkg_execute_build_process(
COMMAND "${MAKE};${MAKE_OPTS}"
WORKING_DIRECTORY ${WORKING_DIRECTORY}
LOGNAME "${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}${SHORT_BUILDTYPE}"
)
endif()

if(_bc_ADD_BIN_TO_PATH)
set(ENV{PATH} "${_BACKUP_ENV_PATH}")
Expand All @@ -149,19 +157,23 @@ function(vcpkg_build_make)
endif()
endif()

message(STATUS "Installing ${TARGET_TRIPLET}${SHORT_BUILDTYPE}")
if (CMAKE_HOST_WIN32)
# In windows we can remotely call make
set(WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}${SHORT_BUILDTYPE})
vcpkg_execute_build_process(
COMMAND "${MAKE} ${INSTALL_OPTS}"
WORKING_DIRECTORY ${WORKING_DIRECTORY}
LOGNAME "install-${TARGET_TRIPLET}${SHORT_BUILDTYPE}"
)
else()
set(WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}${SHORT_BUILDTYPE}${_VCPKG_PROJECT_SUBPATH})
vcpkg_execute_build_process(
COMMAND "${MAKE};${INSTALL_OPTS}"
WORKING_DIRECTORY ${WORKING_DIRECTORY}
LOGNAME "install-${TARGET_TRIPLET}${SHORT_BUILDTYPE}"
)
endif()

message(STATUS "Installing ${TARGET_TRIPLET}${SHORT_BUILDTYPE}")
vcpkg_execute_required_process(
COMMAND ${MAKE} ${INSTALL_OPTS}
WORKING_DIRECTORY ${WORKING_DIRECTORY}
LOGNAME "install-${TARGET_TRIPLET}${SHORT_BUILDTYPE}"
)
endforeach()
endif()

Expand Down
1 change: 0 additions & 1 deletion scripts/cmake/vcpkg_configure_make.cmake
Expand Up @@ -235,7 +235,6 @@ function(vcpkg_configure_make)
if (NOT CMAKE_HOST_WIN32)
file(GLOB_RECURSE SOURCE_FILES ${_csc_SOURCE_PATH}/*)
foreach(ONE_SOUCRCE_FILE ${SOURCE_FILES})
file(COPY ${ONE_SOUCRCE_FILE} DESTINATION ${OBJ_DIR})
get_filename_component(DST_DIR ${ONE_SOUCRCE_FILE} PATH)
string(REPLACE "${_csc_SOURCE_PATH}" "${OBJ_DIR}" DST_DIR "${DST_DIR}")
file(COPY ${ONE_SOUCRCE_FILE} DESTINATION ${DST_DIR})
Expand Down