-
Notifications
You must be signed in to change notification settings - Fork 129
Expand file tree
/
Copy pathvmaware_download.cmake
More file actions
executable file
·39 lines (36 loc) · 1.97 KB
/
vmaware_download.cmake
File metadata and controls
executable file
·39 lines (36 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#
# ██╗ ██╗███╗ ███╗ █████╗ ██╗ ██╗ █████╗ ██████╗ ███████╗
# ██║ ██║████╗ ████║██╔══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝
# ██║ ██║██╔████╔██║███████║██║ █╗ ██║███████║██████╔╝█████╗
# ╚██╗ ██╔╝██║╚██╔╝██║██╔══██║██║███╗██║██╔══██║██╔══██╗██╔══╝
# ╚████╔╝ ██║ ╚═╝ ██║██║ ██║╚███╔███╔╝██║ ██║██║ ██║███████╗
# ╚═══╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚══╝╚══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝
#
# C++ VM detection library
#
# ===============================================================
#
# This is the installation module for CMake.
#
# INCLUDE CODE:
# include(/path/to/vmaware_download.cmake)
#
# EXAMPLE USAGE:
# download_vmaware("/path/to/your/destination/directory/")
#
#
# ===============================================================
#
# - Made by: @kernelwernel (https://github.com/kernelwernel)
# - Repository: https://github.com/kernelwernel/VMAware
function(download_vmaware directory)
set(DIRECTORY "${directory}" CACHE STRING "Directory to save VMAware header")
set(DESTINATION "${DIRECTORY}/vmaware.hpp")
if (NOT EXISTS ${DESTINATION})
message(STATUS "Downloading VMAware")
set(URL "https://github.com/kernelwernel/VMAware/releases/latest/download/vmaware.hpp")
file(DOWNLOAD ${URL} ${DESTINATION} SHOW_PROGRESS)
else()
message(STATUS "VMAware already downloaded, skipping")
endif()
endfunction()