From 4a24507cff82f79277aca009c9d4407bb80dada9 Mon Sep 17 00:00:00 2001 From: Andrew Bell Date: Tue, 1 May 2018 16:34:01 -0400 Subject: [PATCH] Add winsock. --- plugins/greyhound/CMakeLists.txt | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/plugins/greyhound/CMakeLists.txt b/plugins/greyhound/CMakeLists.txt index 3e72c5da4c..8e3e8583e3 100644 --- a/plugins/greyhound/CMakeLists.txt +++ b/plugins/greyhound/CMakeLists.txt @@ -7,13 +7,20 @@ if (WIN32) add_definitions("-DARBITER_DLL_IMPORT") endif() +# +# Need Winsock for htonl +# + PDAL_ADD_PLUGIN(reader_libname reader greyhound FILES io/CompressionStream.cpp io/GreyhoundReader.cpp io/GreyhoundCommon.cpp io/bounds.cpp - LINK_WITH ${PDAL_JSONCPP_LIB_NAME}) + LINK_WITH + ${PDAL_JSONCPP_LIB_NAME} + ${WINSOCK_LIBRARY} +) PDAL_ADD_PLUGIN(writer_libname writer greyhound FILES @@ -21,7 +28,10 @@ PDAL_ADD_PLUGIN(writer_libname writer greyhound io/GreyhoundWriter.cpp io/GreyhoundCommon.cpp io/bounds.cpp - LINK_WITH ${PDAL_JSONCPP_LIB_NAME}) + LINK_WITH + ${PDAL_JSONCPP_LIB_NAME} + ${WINSOCK_LIBRARY} +) target_include_directories(${reader_libname} PRIVATE ${PDAL_JSONCPP_INCLUDE_DIR} @@ -35,8 +45,11 @@ if (WITH_TESTS) PDAL_ADD_TEST(pdal_io_greyhound_reader_test FILES test/GreyhoundReaderTest.cpp - LINK_WITH ${reader_libname} ${writer_libname} - ${PDAL_JSONCPP_LIB_NAME}) + LINK_WITH + ${reader_libname} + ${writer_libname} + ${PDAL_JSONCPP_LIB_NAME} + ) target_include_directories(pdal_io_greyhound_reader_test PRIVATE ${PDAL_JSONCPP_INCLUDE_DIR} ${PDAL_VENDOR_DIR})