message: cmake: let's put cmake in charge of thread libs
diff: @@ -6,6 +6,8 @@ project(dronecore)
  # Add DEBUG define for Debug target
  set(CMAKE_CXX_FLAGS_DEBUG "-DDEBUG")
  +# This finds thread libs on Linux, Mac, and Windows.
  +find_package(Threads REQUIRED)
  if(NOT MSVC)
  # Clang and GCC
  @@ -33,7 +35,6 @@ if(NOT MSVC)
  set(warnings "${warnings} -Wuseless-cast -Wlogical-op")
  endif()
  - set(platform_libs "pthread")
  set(curl_lib "curl")
  else()
  @@ -47,7 +48,6 @@ else()
  set(warnings "-WX -W2")
  - set(platform_libs "Ws2_32.lib")
  # You need to call cmake with -DWIN_CURL_INCLUDE_DIR:STRING="C:\\curl-7.54.1\\include"
  if(NOT WIN_CURL_INCLUDE_DIR)
  message(FATAL_ERROR "Please provide argument -DWIN_CURL_INCLUDE_DIR:STRING=\"path_to_curl_include\"")
  @@ -132,6 +132,11 @@ add_library(dronecore STATIC
  ${plugin_source_files}
  )
  +target_link_libraries(dronecore
  + ${CMAKE_THREAD_LIBS_INIT}
  + ${curl_lib}
  +)
  +
  # cmake should check for C++11
  set_property(TARGET dronecore PROPERTY CXX_STANDARD 11)
  set_property(TARGET dronecore PROPERTY CXX_STANDARD_REQUIRED ON)
  @@ -206,7 +211,6 @@ if(NOT IOS AND NOT ANDROID)
  gtest
  gtest_main
  ${platform_libs}
  - ${curl_lib}
  gmock
  ${additional_libs}
  tinyxml2
  @@ -233,7 +237,6 @@ if(NOT IOS AND NOT ANDROID)
  gtest
  gtest_main
  ${platform_libs}
  - ${curl_lib}
  ${additional_libs}
  tinyxml2
  )
  