[cmake] fix vcpkg and zy* install (#247)
vcpkg wouldn't clone before, but now it actually does and seems to work in my testing also doesn't install zycore and zydis (thanks aur testers) Reviewed-on: #247 Reviewed-by: Lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
1465757ded
commit
bd944b71d5
4 changed files with 15 additions and 14 deletions
|
@ -30,7 +30,7 @@ function(AddPackage)
|
|||
cmake_parse_arguments(PKG_ARGS "" "${oneValueArgs}" "${multiValueArgs}" "${ARGN}")
|
||||
|
||||
if (NOT DEFINED PKG_ARGS_NAME)
|
||||
message(FATAL_ERROR "CPMUtil: No package name defined")
|
||||
message(FATAL_ERROR "[CPMUtil] ${PKG_ARGS_NAME}: No package name defined")
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED PKG_ARGS_URL)
|
||||
|
@ -38,21 +38,21 @@ function(AddPackage)
|
|||
set(PKG_GIT_URL https://github.com/${PKG_ARGS_REPO})
|
||||
set(PKG_URL "${PKG_GIT_URL}/archive/${PKG_ARGS_SHA}.zip")
|
||||
else()
|
||||
message(FATAL_ERROR "CPMUtil: No custom URL and no repository + sha defined")
|
||||
message(FATAL_ERROR "[CPMUtil] ${PKG_ARGS_NAME}: No custom URL and no repository + sha defined")
|
||||
endif()
|
||||
else()
|
||||
set(PKG_URL ${PKG_ARGS_URL})
|
||||
set(PKG_GIT_URL ${PKG_URL})
|
||||
endif()
|
||||
|
||||
message(STATUS "CPMUtil: Downloading package ${PKG_ARGS_NAME} from ${PKG_URL}")
|
||||
message(STATUS "[CPMUtil] ${PKG_ARGS_NAME}: Downloading package from ${PKG_URL}")
|
||||
|
||||
if (NOT DEFINED PKG_ARGS_KEY)
|
||||
if (DEFINED PKG_ARGS_SHA)
|
||||
string(SUBSTRING ${PKG_ARGS_SHA} 0 4 PKG_KEY)
|
||||
message(STATUS "CPMUtil: No custom key defined, using ${PKG_KEY} from sha")
|
||||
message(STATUS "[CPMUtil] ${PKG_ARGS_NAME}: No custom key defined, using ${PKG_KEY} from sha")
|
||||
else()
|
||||
message(FATAL_ERROR "CPMUtil: No custom key and no commit sha defined")
|
||||
message(FATAL_ERROR "[CPMUtil] ${PKG_ARGS_NAME}: No custom key and no commit sha defined")
|
||||
endif()
|
||||
else()
|
||||
set(PKG_KEY ${PKG_ARGS_KEY})
|
||||
|
@ -99,7 +99,7 @@ function(AddPackage)
|
|||
elseif(DEFINED PKG_ARGS_VERSION)
|
||||
set_property(GLOBAL APPEND PROPERTY CPM_PACKAGE_SHAS ${PKG_ARGS_VERSION})
|
||||
else()
|
||||
message(WARNING "CPMUtil: Package ${PKG_ARGS_NAME} has no specified sha or version")
|
||||
message(WARNING "[CPMUtil] Package ${PKG_ARGS_NAME} has no specified sha or version")
|
||||
set_property(GLOBAL APPEND PROPERTY CPM_PACKAGE_SHAS "unknown")
|
||||
endif()
|
||||
else()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue