/
CMakeLists.txt
37 lines (29 loc) · 947 Bytes
/
CMakeLists.txt
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
# Copyright (c) 2014-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed in accordance with the terms specified in
# the LICENSE file found in the root directory of this source tree.
function(glibcMain)
generateGlibcDl()
generateGlibcResolv()
generateGlibcPthread()
endfunction()
function(generateGlibcDl)
add_library(thirdparty_glibc_dl INTERFACE)
if(DEFINED PLATFORM_POSIX)
target_link_options(thirdparty_glibc_dl INTERFACE -ldl)
endif()
endfunction()
function(generateGlibcResolv)
add_library(thirdparty_glibc_resolv INTERFACE)
if(DEFINED PLATFORM_LINUX OR DEFINED PLATFORM_MACOS)
target_link_options(thirdparty_glibc_resolv INTERFACE -lresolv)
endif()
endfunction()
function(generateGlibcPthread)
add_library(thirdparty_glibc_pthread INTERFACE)
if(DEFINED PLATFORM_LINUX)
target_link_options(thirdparty_glibc_pthread INTERFACE -pthread)
endif()
endfunction()
glibcMain()