Skip to content

Commit

Permalink
[vcpkg] Small fixes to vcpkg_build_make (#21296)
Browse files Browse the repository at this point in the history
* vcpkg_build_make: doc sync

Change-Id: I44c39663c397cbdeadf1b875ee7e6e1c781add05

* vcpkg_build_make: fix typo

Change-Id: I1f401256b2f4e600a1216de499f044ea3c5a2130
  • Loading branch information
plq authored Nov 26, 2021
1 parent d0ce2aa commit e020134
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
15 changes: 9 additions & 6 deletions docs/maintainers/vcpkg_build_make.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,22 @@ Build a linux makefile project.
## Usage:
```cmake
vcpkg_build_make([BUILD_TARGET <target>]
[INSTALL_TARGET <target>]
[ADD_BIN_TO_PATH]
[ENABLE_INSTALL]
[MAKEFILE <makefileName>]
[LOGFILE_ROOT <logfileroot>])
[LOGFILE_ROOT <logfileroot>]
[DISABLE_PARALLEL]
[SUBPATH <path>])
```

### BUILD_TARGET
The target passed to the make build command (`./make <target>`). If not specified, the 'all' target will
be passed.

### INSTALL_TARGET
The target passed to the make build command (`./make <target>`) if `ENABLE_INSTALL` is used. Defaults to 'install'.

### ADD_BIN_TO_PATH
Adds the appropriate Release and Debug `bin\` directories to the path during the build such that executables can run against the in-tree DLLs.

Expand All @@ -26,11 +32,8 @@ IF the port supports the install target use vcpkg_install_make() instead of vcpk
### MAKEFILE
Specifies the Makefile as a relative path from the root of the sources passed to `vcpkg_configure_make()`

### BUILD_TARGET
The target passed to the make build command (`./make <target>`). Defaults to 'all'.

### INSTALL_TARGET
The target passed to the make build command (`./make <target>`) if `ENABLE_INSTALL` is used. Defaults to 'install'.
### LOGFILE_ROOT
Specifies a log file prefix.

### DISABLE_PARALLEL
The underlying buildsystem will be instructed to not parallelize
Expand Down
18 changes: 11 additions & 7 deletions scripts/cmake/vcpkg_build_make.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,22 @@ Build a linux makefile project.
## Usage:
```cmake
vcpkg_build_make([BUILD_TARGET <target>]
[INSTALL_TARGET <target>]
[ADD_BIN_TO_PATH]
[ENABLE_INSTALL]
[MAKEFILE <makefileName>]
[LOGFILE_ROOT <logfileroot>])
[LOGFILE_ROOT <logfileroot>]
[DISABLE_PARALLEL]
[SUBPATH <path>])
```
### BUILD_TARGET
The target passed to the make build command (`./make <target>`). If not specified, the 'all' target will
be passed.
### INSTALL_TARGET
The target passed to the make build command (`./make <target>`) if `ENABLE_INSTALL` is used. Defaults to 'install'.
### ADD_BIN_TO_PATH
Adds the appropriate Release and Debug `bin\` directories to the path during the build such that executables can run against the in-tree DLLs.
Expand All @@ -25,11 +31,8 @@ IF the port supports the install target use vcpkg_install_make() instead of vcpk
### MAKEFILE
Specifies the Makefile as a relative path from the root of the sources passed to `vcpkg_configure_make()`
### BUILD_TARGET
The target passed to the make build command (`./make <target>`). Defaults to 'all'.
### INSTALL_TARGET
The target passed to the make build command (`./make <target>`) if `ENABLE_INSTALL` is used. Defaults to 'install'.
### LOGFILE_ROOT
Specifies a log file prefix.
### DISABLE_PARALLEL
The underlying buildsystem will be instructed to not parallelize
Expand Down Expand Up @@ -104,6 +107,7 @@ function(vcpkg_build_make)
string(REGEX REPLACE [[([a-zA-Z]):/]] [[/\1/]] vcpkg_package_prefix "${vcpkg_package_prefix}")
vcpkg_list(SET install_opts -j ${VCPKG_CONCURRENCY} --trace -f ${arg_MAKEFILE} ${arg_INSTALL_TARGET} DESTDIR=${vcpkg_package_prefix})
#TODO: optimize for install-data (release) and install-exec (release/debug)

else()
if(VCPKG_HOST_IS_OPENBSD)
find_program(Z_VCPKG_MAKE gmake REQUIRED)
Expand Down Expand Up @@ -132,7 +136,7 @@ function(vcpkg_build_make)
set(path_suffix "")
endif()

set(working_directory "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}${short_buildtype}${arg_SUBPATH}")
set(working_directory "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}${short_buildtype}/${arg_SUBPATH}")
message(STATUS "Building ${TARGET_TRIPLET}${short_buildtype}")

z_vcpkg_extract_cpp_flags_and_set_cflags_and_cxxflags("${cmake_buildtype}")
Expand Down

0 comments on commit e020134

Please sign in to comment.