-
Notifications
You must be signed in to change notification settings - Fork 1
/
Config.cmake.in
49 lines (39 loc) · 1.84 KB
/
Config.cmake.in
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
42
43
44
45
46
47
48
49
@PACKAGE_INIT@
set(EXPORT_PACKAGE_NAME vectorcxx-vector)
include("${CMAKE_CURRENT_LIST_DIR}/${EXPORT_PACKAGE_NAME}-targets.cmake")
# add third party dependencies
# only the top level project will search all dependencies for itself and all its sub projects so that cmake configuration faster
find_package(ZLIB REQUIRED)
find_package(RdKafka REQUIRED)
find_package(OpenSSL REQUIRED)
# we need below part to set interface lib for `vectorcxx-static`, since the `-static` postfix is brought
# by corrosion, and will not be found
if(NOT TARGET vectorcxx-static)
add_library(vectorcxx-static INTERFACE IMPORTED)
find_library(VECTORCXX_LIB NAMES vectorcxx REQUIRED)
if (VECTORCXX_LIB)
message(STATUS "[library found] library=VECTORCXX_LIB path=${VECTORCXX_LIB}")
else ()
message(FATAL_ERROR "[library not found] library='VECTORCXX_LIB'")
endif ()
message(STATUS "VECTORCXX_LIB: ${VECTORCXX_LIB}, VCPKG_TARGET_TRIPLET: ${VCPKG_TARGET_TRIPLET}, _HOST_TRIPLET: ${_HOST_TRIPLET}")
set_target_properties(vectorcxx-static PROPERTIES
INTERFACE_LINK_LIBRARIES ${VECTORCXX_LIB}
)
endif()
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
find_library(RESOLV_LIBRARY NAMES resolv REQUIRED)
endif()
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
find_library(IOKIT_LIBRARY NAMES IOKit REQUIRED)
endif()
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
find_library(SECURITY_LIBRARY NAMES Security REQUIRED)
endif()
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
find_library(CORESERVICES_LIBRARY NAMES CoreServices REQUIRED)
endif()
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
find_library(COREFOUNDATION_LIBRARY NAMES CoreFoundation REQUIRED)
endif()
check_required_components(${EXPORT_PACKAGE_NAME})