Skip to content

Commit

Permalink
Fix separate make and install execution error issue. (#8540)
Browse files Browse the repository at this point in the history
* Fix separate make and install execution error issue.

* trigger CI system.

* Fix multiple copy files under debug, fix separator between make and install in linux.
  • Loading branch information
JackBoosY authored and vicroms committed Oct 22, 2019
1 parent 8662046 commit 1bdb6bf
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 20 deletions.
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 @@ -241,7 +241,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

0 comments on commit 1bdb6bf

Please sign in to comment.