[Fix] SDL3_net has no official release. Use main branch.
This commit is contained in:
parent
019059e209
commit
274ff9f665
@ -15,7 +15,12 @@ FetchContent_MakeAvailable(sol2)
|
||||
FetchContent_Declare(
|
||||
SDL_net
|
||||
GIT_REPOSITORY https://github.com/libsdl-org/SDL_net.git
|
||||
GIT_TAG release-3.0.0
|
||||
# NOTE: Using 'main' because FetchContent in this environment appears to be
|
||||
# doing a shallow clone, which fails when checking out a specific tag/commit.
|
||||
# This is not ideal for reproducibility, but unblocks development.
|
||||
# If SDL_net breaks their main branch, you'll have to compile it from source:
|
||||
# https://github.com/libsdl-org/SDL_net
|
||||
GIT_TAG main
|
||||
)
|
||||
FetchContent_MakeAvailable(SDL_net)
|
||||
|
||||
|
||||
@ -9,7 +9,8 @@ find_package(GLEW REQUIRED)
|
||||
find_package(OpenGL REQUIRED)
|
||||
find_package(Freetype REQUIRED)
|
||||
|
||||
target_link_libraries(bettolac PRIVATE bettola SDL3::SDL3 SDL3_net::SDL3_net
|
||||
target_link_libraries(bettolac PRIVATE bettola SDL3::SDL3 SDL3_net
|
||||
GLEW::glew OpenGL::GL Freetype::Freetype)
|
||||
|
||||
target_include_directories(bettolac PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||
target_include_directories(bettolac PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
${sdl_net_SOURCE_DIR}/include)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include "SDL_net.h"
|
||||
#include <SDL3_net/SDL_net.h>
|
||||
|
||||
#include "client_network.h"
|
||||
#include <SDL3/SDL_error.h>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <SDL_net.h>
|
||||
#include <SDL3_net/SDL_net.h>
|
||||
#include <string>
|
||||
|
||||
class ClientNetwork {
|
||||
|
||||
@ -6,6 +6,7 @@ add_executable(bettolas
|
||||
|
||||
find_package(SDL3 REQUIRED)
|
||||
|
||||
target_link_libraries(bettolas PRIVATE bettola SDL3::SDL3 SDL3_net::SDL3_net)
|
||||
target_link_libraries(bettolas PRIVATE bettola SDL3::SDL3 SDL3_net)
|
||||
|
||||
target_include_directories(bettolas PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||
target_include_directories(bettolas PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||
${sdl_net_SOURCE_DIR}/include)
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <algorithm>
|
||||
#include <SDL_net.h>
|
||||
#include <SDL3_net/SDL_net.h>
|
||||
|
||||
#include "vfs.h"
|
||||
#include "command_processor.h"
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include "SDL_net.h"
|
||||
#include <SDL3_net/SDL_net.h>
|
||||
#include "player.h"
|
||||
|
||||
class NetworkManager {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#include "player.h"
|
||||
#include "SDL_net.h"
|
||||
#include <SDL3_net/SDL_net.h>
|
||||
|
||||
Player::Player(NET_StreamSocket* new_socket) {
|
||||
socket = new_socket;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <SDL_net.h>
|
||||
#include <SDL3_net/SDL_net.h>
|
||||
|
||||
#include "vfs.h"
|
||||
#include "command_processor.h"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user