Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.10)
project(pmm VERSION 1.5.1)
project(pmm VERSION 1.6.0)

set(PMM_ALWAYS_DOWNLOAD TRUE)
set(PMM_URL "file://${PROJECT_SOURCE_DIR}/pmm")
Expand Down
3 changes: 3 additions & 0 deletions changelog.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ _pmm_changes(1.5.1
"Fix: Unable to run in script mode due to define_property() calls"
"Fix: Generated Conan profiles without respecting the CMAKE_BUILD_TYPE"
)
_pmm_changes(1.6.0
"New: add OVERLAY_PORTS and OVERLAY_TRIPLETS to pmm(VCPKG)"
)
message(STATUS "[pmm] To update, simply change the value of PMM_VERSION_INIT in pmm.cmake")
message(STATUS "[pmm] You can disable these messages by setting PMM_IGNORE_NEW_VERSION to TRUE before including pmm.cmake")

Expand Down
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

class PMM(conans.ConanFile):
name = 'pmm'
version = '1.5.1'
version = '1.6.0'
settings = None
exports_sources = '*'
generators = 'cmake'
Expand Down
2 changes: 1 addition & 1 deletion latest-version.cmake
Original file line number Diff line number Diff line change
@@ -1 +1 @@
set(PMM_LATEST_VERSION 1.5.1)
set(PMM_LATEST_VERSION 1.6.0)
4 changes: 2 additions & 2 deletions pmm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
## SOFTWARE.

# Bump this version to change what PMM version is downloaded
set(PMM_VERSION_INIT 1.5.1)
set(PMM_VERSION_INIT 1.6.0)

# Helpful macro to set a variable if it isn't already set
macro(_pmm_set_if_undef varname)
if(NOT DEFINED "${varname}")
if(NOT DEFINED ${varname})
set("${varname}" "${ARGN}")
endif()
endmacro()
Expand Down
20 changes: 17 additions & 3 deletions pmm/vcpkg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ endfunction()
function(_pmm_vcpkg)
_pmm_parse_args(
- REVISION TRIPLET
+ REQUIRES PORTS
+ REQUIRES PORTS OVERLAY_PORTS OVERLAY_TRIPLETS
)

if(NOT DEFINED ARG_REVISION)
Expand All @@ -202,6 +202,13 @@ function(_pmm_vcpkg)
_pmm_vcpkg_copy_custom_ports("${ARG_PORTS}")
endif()
if(ARG_REQUIRES)
list(APPEND _PMM_OVERLAYS)
if(ARG_OVERLAY_PORTS)
list(APPEND _PMM_OVERLAYS "--overlay-ports=${ARG_OVERLAY_PORTS}")
endif()
if(ARG_OVERLAY_TRIPLETS)
list(APPEND _PMM_OVERLAYS "--overlay-triplets=${ARG_OVERLAY_TRIPLETS}")
endif()
_pmm_log("Installing requirements with vcpkg")
set(cmd ${CMAKE_COMMAND} -E env
VCPKG_ROOT=${vcpkg_inst_dir}
Expand All @@ -210,6 +217,7 @@ function(_pmm_vcpkg)
"${PMM_VCPKG_EXECUTABLE}" install
--triplet "${ARG_TRIPLET}"
${ARG_REQUIRES}
${_PMM_OVERLAYS}
)
_pmm_exec(${cmd} NO_EAT_OUTPUT)
if(_PMM_RC)
Expand All @@ -218,6 +226,12 @@ function(_pmm_vcpkg)
_pmm_log(DEBUG "vcpkg output:\n${_PMM_OUTPUT}")
endif()
endif()
set(_PMM_INCLUDE "${vcpkg_inst_dir}/scripts/buildsystems/vcpkg.cmake" PARENT_SCOPE)
_pmm_generate_shim(vcpkg "${PMM_VCPKG_EXECUTABLE}")
get_property(__pmm_vcpkg_included GLOBAL PROPERTY pmm_VCPKG_INCLUDED)
if(NOT __pmm_vcpkg_included)
set_property(GLOBAL PROPERTY pmm_VCPKG_INCLUDED TRUE)
set(_PMM_INCLUDE "${vcpkg_inst_dir}/scripts/buildsystems/vcpkg.cmake" PARENT_SCOPE)
_pmm_generate_shim(vcpkg "${PMM_VCPKG_EXECUTABLE}")
else()
set(_PMM_INCLUDE "" PARENT_SCOPE)
endif()
endfunction()