summaryrefslogtreecommitdiff
path: root/indra/cmake/LLCommon.cmake
blob: b6f310fe129afdc28b579c59e30ee6784b31f896 (plain)
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
# -*- cmake -*-

include(APR)
include(Boost)
include(EXPAT)
include(Tracy)
include(ZLIB)

set(LLCOMMON_INCLUDE_DIRS
    ${LIBS_OPEN_DIR}/llcommon
    ${APRUTIL_INCLUDE_DIR}
    ${APR_INCLUDE_DIR}
    ${TRACY_INCLUDE_DIR}
    )
set(LLCOMMON_SYSTEM_INCLUDE_DIRS
    ${Boost_INCLUDE_DIRS}
    )

if (LINUX)
    # In order to support using ld.gold on linux, we need to explicitely
    # specify all libraries that llcommon uses.
    # llcommon uses `clock_gettime' which is provided by librt on linux.
    set(LLCOMMON_LIBRARIES llcommon 
        ${BOOST_FIBER_LIBRARY} 
        ${BOOST_CONTEXT_LIBRARY} 
        ${BOOST_THREAD_LIBRARY} 
        ${BOOST_SYSTEM_LIBRARY} 
        rt
        )
else (LINUX)
    set(LLCOMMON_LIBRARIES llcommon
        ${BOOST_FIBER_LIBRARY} 
        ${BOOST_CONTEXT_LIBRARY} 
        ${BOOST_THREAD_LIBRARY} 
        ${BOOST_SYSTEM_LIBRARY}
        ${TRACY_LIBRARY}
        )
endif (LINUX)

set(LLCOMMON_LINK_SHARED OFF CACHE BOOL "Build the llcommon target as a static library.")
if(LLCOMMON_LINK_SHARED)
  add_definitions(-DLL_COMMON_LINK_SHARED=1)
endif(LLCOMMON_LINK_SHARED)