Skip to content

Commit

Permalink
Maybe works to use libnice
Browse files Browse the repository at this point in the history
  • Loading branch information
Black-Speedy committed Jan 7, 2024
1 parent caee4e4 commit 44b9f0f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
25 changes: 24 additions & 1 deletion WebShare-Connect/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,28 @@ find_package(czmq CONFIG REQUIRED)
find_package(ZeroMQ CONFIG REQUIRED)
find_package(OpenSSL REQUIRED)

# Set the path to GLib include directory
set(GLIB_INCLUDE_DIR "C:/PackageManagers/vcpkg/installed/x64-windows/include/glib-2.0")
# Include GLib directories
include_directories(${GLIB_INCLUDE_DIR})
include_directories("C:/PackageManagers/vcpkg/installed/x64-windows/lib/glib-2.0/include") # Path to glibconfig.h

add_definitions(-DG_OS_WIN32)

# Set the path to libnice include directory
set(LIBNICE_INCLUDE_DIR "C:/PackageManagers/vcpkg/installed/x64-windows/include")

# Include libnice directories
include_directories(${LIBNICE_INCLUDE_DIR})
include_directories("${LIBNICE_INCLUDE_DIR}/nice") # Path to the 'nice' subdirectory containing address.h


# Link against libnice library
target_link_libraries(WebShare-Connect PRIVATE "C:/PackageManagers/vcpkg/installed/x64-windows/lib/glib-2.0.lib")
target_link_libraries(WebShare-Connect PRIVATE "C:/PackageManagers/vcpkg/installed/x64-windows/lib/nice.lib")



# Link libraries to your server executable.
target_link_libraries(WebShare-Connect PRIVATE czmq)
target_link_libraries(WebShare-Connect PRIVATE libzmq)
Expand All @@ -26,9 +48,10 @@ target_link_libraries(server PRIVATE libzmq)
target_link_libraries(sha512 PRIVATE OpenSSL::SSL OpenSSL::Crypto)
target_link_libraries(client PRIVATE czmq)


# Link libraries to your client executable.
if (CMAKE_VERSION VERSION_GREATER 3.12)
set_property(TARGET WebShare-Connect PROPERTY C_STANDARD 11)
endif()

# TODO: Add tests and install targets if needed.
# TODO: Add tests and install targets if needed.
1 change: 1 addition & 0 deletions WebShare-Connect/WebShare-Connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "server.h"
#include "client.h"
#include "removeQuotes.h"
#include <nice.h>

int userInput(int error) {
if (error == EOF) {
Expand Down

0 comments on commit 44b9f0f

Please sign in to comment.