message: Only look for libuv when building for Node
diff: @@ -100,19 +100,22 @@ elseif(REALM_PLATFORM STREQUAL "Android")
  set(PLATFORM_DEFINES "__STDC_CONSTANT_MACROS=1")
  endif()
  -if(REALM_PLATFORM STREQUAL "Node")
  - set(PLATFORM_DEFINES "REALM_PLATFORM_NODE=1")
  -endif()
  -
  +if(NOT REALM_PLATFORM OR REALM_PLATFORM STREQUAL "Node")
  find_library(UV_LIBRARY NAMES uv libuv)
  if(UV_LIBRARY)
  find_path(UV_INCLUDE_DIR uv.h)
  list(APPEND PLATFORM_LIBRARIES ${UV_LIBRARY})
  add_definitions(-DREALM_HAVE_UV)
  -elseif(REALM_PLATFORM STREQUAL "Node")
  + endif()
  +endif()
  +
  +if(REALM_PLATFORM STREQUAL "Node")
  + set(PLATFORM_DEFINES "REALM_PLATFORM_NODE=1")
  + if(NOT UV_LIBRARY)
  message(FATAL_ERROR "Platform set to Node but libuv was not found!")
  endif()
  +endif()
  check_symbol_exists(epoll_create sys/epoll.h REALM_HAVE_EPOLL)
  if(REALM_HAVE_EPOLL)
  