summaryrefslogtreecommitdiff
path: root/indra/cmake/EXPAT.cmake
blob: 6f6503ca4d7d633966880616204a922a769dd7b6 (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
# -*- cmake -*-
include(Prebuilt)

if( TARGET expat::expat )
    return()
endif()
create_target( expat::expat INTERFACE IMPORTED )

if (USESYSTEMLIBS)
  include(FindEXPAT)
else (USESYSTEMLIBS)
    use_prebuilt_binary(expat)
    if (WINDOWS)
        set_target_libraries( expat::expat libexpatMT )
        set(EXPAT_COPY libexpatMT.dll)
    else (WINDOWS)
        set_target_libraries( expat::expat expat )
        if (DARWIN)
            set(EXPAT_COPY libexpat.1.dylib libexpat.dylib)
        else ()
            set(EXPAT_COPY libexpat.so.1 libexpat.so)
        endif ()
    endif (WINDOWS)
    set_target_include_dirs( expat::expat ${LIBS_PREBUILT_DIR}/include )
endif (USESYSTEMLIBS)