summaryrefslogtreecommitdiff
path: root/indra/cmake/JsonCpp.cmake
blob: 14bfd32b6b97783cfefc9ca12efba6640e83def8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# -*- cmake -*-

include(Prebuilt)
if( TARGET jsoncpp::jsoncpp )
  return()
endif()
create_target( jsoncpp::jsoncpp)

if (USESYSTEMLIBS)
  include(FindJsonCpp)
else (USESYSTEMLIBS)
  use_prebuilt_binary(jsoncpp)
  if (WINDOWS)
    set_target_libraries( jsoncpp::jsoncpp json_libmd.lib )
  elseif (DARWIN)
    set_target_libraries( jsoncpp::jsoncpp libjson_darwin_libmt.a )
  elseif (LINUX)
    set_target_libraries( jsoncpp::jsoncpp libjson_linux-gcc-4.1.3_libmt.a )
  endif (WINDOWS)
  set_target_include_dirs( jsoncpp::jsoncpp ${LIBS_PREBUILT_DIR}/include/json)
endif (USESYSTEMLIBS)