Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 37 additions & 14 deletions server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,24 @@ set (GDIAL_VERSION_MINOR 0)
find_package (PkgConfig REQUIRED)
pkg_search_module (GLIB REQUIRED glib-2.0)
pkg_search_module (GIO REQUIRED gio-2.0)
pkg_search_module (GSSDP12 gssdp-1.2)
pkg_search_module (LIBSOUP3 libsoup-3.0)
if (GSSDP12_FOUND)
pkg_search_module (GSSDP REQUIRED gssdp-1.2)
add_definitions(-DHAVE_GSSDP_VERSION_1_2_OR_NEWER)
message("Using gssdp-1.2")
if (LIBSOUP3_FOUND)
add_definitions(-DHAVE_LIBSOUP_VERSION_3)
pkg_search_module (GSSDP16 gssdp-1.6)
if (GSSDP16_FOUND)
pkg_search_module (GSSDP REQUIRED gssdp-1.6)
add_definitions(-DHAVE_GSSDP_VERSION_1_6_OR_NEWER)
message("Using gssdp-1.6")
endif()
Comment on lines +30 to +37
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When LIBSOUP3_FOUND is true, GSSDP is only set if GSSDP16_FOUND is true; otherwise GSSDP is never marked REQUIRED and ${GSSDP_INCLUDE_DIRS}/${GSSDP_LIBRARIES} may be empty, leading to build/link failures later. If libsoup3 builds require gssdp-1.6, make pkg_search_module(GSSDP REQUIRED gssdp-1.6) unconditional in that branch (or add a clear fallback/error path).

Copilot uses AI. Check for mistakes.
else()
pkg_search_module (GSSDP REQUIRED gssdp-1.0)
pkg_search_module (GSSDP12 gssdp-1.2)
if (GSSDP12_FOUND)
pkg_search_module (GSSDP REQUIRED gssdp-1.2)
add_definitions(-DHAVE_GSSDP_VERSION_1_2_OR_NEWER)
message("Using gssdp-1.2")
else()
pkg_search_module (GSSDP REQUIRED gssdp-1.0)
endif()
endif()
if (LIBSOUP3_FOUND)
pkg_search_module (SOUP REQUIRED libsoup-3.0)
Expand Down Expand Up @@ -73,14 +83,27 @@ include_directories (
${PROJECT_GLIB_INCLUDE_DIRS}
)

set (GDIAL_EXEC_SOURCE_FILES
${CMAKE_CURRENT_SOURCE_DIR}/gdial-util.c
${CMAKE_CURRENT_SOURCE_DIR}/gdial-app.c
${CMAKE_CURRENT_SOURCE_DIR}/gdial-rest.c
${CMAKE_CURRENT_SOURCE_DIR}/gdial-ssdp.c
${CMAKE_CURRENT_SOURCE_DIR}/gdial-shield.c
${CMAKE_CURRENT_SOURCE_DIR}/gdialservice.cpp
)
if (LIBSOUP3_FOUND)
set (GDIAL_EXEC_SOURCE_FILES
${CMAKE_CURRENT_SOURCE_DIR}/gdial-util.c
${CMAKE_CURRENT_SOURCE_DIR}/gdial-app.c
${CMAKE_CURRENT_SOURCE_DIR}/gdial1p6-rest.c
${CMAKE_CURRENT_SOURCE_DIR}/gdial1p6-ssdp.c
Comment on lines +90 to +91
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The libsoup3 source list references gdial1p6-rest.c and gdial1p6-ssdp.c, but the repository files are named with a trailing invisible Unicode mark (e.g., gdial1p6-rest.c‎ / gdial1p6-ssdp.c‎). With the current paths, CMake may fail to locate these sources on disk. Rename the files to plain ASCII .c filenames (preferred) or update the CMake source paths to match the actual filenames.

Suggested change
${CMAKE_CURRENT_SOURCE_DIR}/gdial1p6-rest.c
${CMAKE_CURRENT_SOURCE_DIR}/gdial1p6-ssdp.c
${CMAKE_CURRENT_SOURCE_DIR}/gdial1p6-rest.c
${CMAKE_CURRENT_SOURCE_DIR}/gdial1p6-ssdp.c

Copilot uses AI. Check for mistakes.
${CMAKE_CURRENT_SOURCE_DIR}/gdial1p6-shield.c
${CMAKE_CURRENT_SOURCE_DIR}/gdialservice.cpp
)
message("Using libsoup-3.0 compatible source files (gdial1p6-*.c)")
else()
set (GDIAL_EXEC_SOURCE_FILES
${CMAKE_CURRENT_SOURCE_DIR}/gdial-util.c
${CMAKE_CURRENT_SOURCE_DIR}/gdial-app.c
${CMAKE_CURRENT_SOURCE_DIR}/gdial-rest.c
${CMAKE_CURRENT_SOURCE_DIR}/gdial-ssdp.c
${CMAKE_CURRENT_SOURCE_DIR}/gdial-shield.c
${CMAKE_CURRENT_SOURCE_DIR}/gdialservice.cpp
)
message("Using libsoup-2.4 compatible source files (gdial-*.c)")
endif()

link_directories (
${GLIB_LIBRARY_DIRS}
Expand Down
Loading
Loading