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})