mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-09 21:42:56 +00:00
Per @SoftFever review on #13752, third-party vendored libraries belong in deps_src/ alongside expat, imgui, hidapi, etc. - All 5 files (mdns.{h,c}, cxmdns.{h,cpp}, NOTICE.md) move from src/slic3r/Utils/mdns/ to deps_src/mdns/. - deps_src/mdns/CMakeLists.txt builds mdns as a STATIC library and scopes the MSVC Iphlpapi/Ws2_32 link requirement to that target instead of libslic3r_gui's global MSVC block. - deps_src/CMakeLists.txt gains add_subdirectory(mdns). - src/slic3r/CMakeLists.txt drops the inline source listings and links libslic3r_gui against the new mdns target; MSVC block keeps only Setupapi.lib. - src/slic3r/Utils/CrealityHostDiscovery.cpp #include updated to use the include dir exposed by the new mdns target. Verified by a clean Linux build (orca-slicer links successfully).
20 lines
514 B
CMake
20 lines
514 B
CMake
cmake_minimum_required(VERSION 3.13)
|
|
|
|
project(mdns)
|
|
|
|
# Static library wrapping mjansson/mdns (public domain) plus the cxmdns C++
|
|
# wrapper from CrealityPrint v7.1.1 (AGPL-3.0). See NOTICE.md for attribution.
|
|
add_library(mdns STATIC
|
|
mdns.h
|
|
mdns.c
|
|
cxmdns.h
|
|
cxmdns.cpp
|
|
)
|
|
|
|
target_include_directories(mdns SYSTEM PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
if (MSVC)
|
|
# mjansson/mdns uses GetAdaptersAddresses (Iphlpapi) and Winsock2 (Ws2_32).
|
|
target_link_libraries(mdns PUBLIC Iphlpapi Ws2_32)
|
|
endif()
|