forked from hiero-ledger/hiero-sdk-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSystemLibraries.cmake
More file actions
41 lines (31 loc) · 1015 Bytes
/
SystemLibraries.cmake
File metadata and controls
41 lines (31 loc) · 1015 Bytes
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
40
41
if(NOT WIN32)
if(NOT DEFINED RESOLV_LIBRARY)
find_library(RESOLV_LIBRARY resolv)
endif()
add_library(sys::resolv STATIC IMPORTED)
set_target_properties(sys::resolv PROPERTIES IMPORTED_LOCATION ${RESOLV_LIBRARY})
endif()
# Linux dependency checks
if(UNIX AND NOT APPLE)
# Check for zip utility
find_program(ZIP_EXECUTABLE zip)
if(NOT ZIP_EXECUTABLE)
message(FATAL_ERROR "zip utility is required but not installed. Run: sudo apt install zip")
endif()
# Check for linux headers (linux-libc-dev)
find_path(LINUX_VERSION_HEADER
NAMES linux/version.h
PATHS /usr/include
)
if(NOT LINUX_VERSION_HEADER)
message(FATAL_ERROR "linux-libc-dev is required but not installed. Run: sudo apt install linux-libc-dev")
endif()
endif()
if(APPLE)
if(NOT DEFINED OSX_CORE_FOUNDATION)
find_library(OSX_CORE_FOUNDATION CoreFoundation)
endif()
if(NOT DEFINED OSX_CF_NETWORK)
find_library(OSX_CF_NETWORK CFNetwork)
endif()
endif()