Compare commits
No commits in common. "440fd87cccf96f47d8e2938883491e07d6f9df4b" and "69be7aa5292f698734ead645eeadb509db400c04" have entirely different histories.
440fd87ccc
...
69be7aa529
3
.gitignore
vendored
3
.gitignore
vendored
@ -19,6 +19,3 @@ typer.py
|
||||
|
||||
# Cache Files
|
||||
.cache/
|
||||
|
||||
# Script output files
|
||||
output.txt
|
@ -4,13 +4,6 @@ project(FarmFighter)
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD 23)
|
||||
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
if(POLICY CMP0077)
|
||||
cmake_policy(SET CMP0077 NEW)
|
||||
endif()
|
||||
set(FETCHCONTENT_QUIET OFF)
|
||||
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
raylib
|
||||
@ -22,15 +15,6 @@ FetchContent_MakeAvailable(raylib)
|
||||
set(BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
|
||||
set(BUILD_GAMES OFF CACHE BOOL "" FORCE)
|
||||
|
||||
FetchContent_Declare(
|
||||
enet
|
||||
URL https://github.com/zpl-c/enet/archive/refs/tags/v2.3.10.zip
|
||||
)
|
||||
FetchContent_MakeAvailable(enet)
|
||||
|
||||
add_library(enet INTERFACE)
|
||||
target_include_directories(enet INTERFACE ${enet_SOURCE_DIR}/include)
|
||||
|
||||
add_subdirectory(networking)
|
||||
add_subdirectory(engine)
|
||||
add_subdirectory(client)
|
||||
|
@ -22,6 +22,7 @@ add_library(ImGui STATIC
|
||||
)
|
||||
target_include_directories(ImGui PUBLIC ${imgui_SOURCE_DIR})
|
||||
|
||||
# rlImGui
|
||||
FetchContent_Declare(
|
||||
rlImGui
|
||||
GIT_REPOSITORY https://github.com/raylib-extras/rlImGui.git
|
||||
@ -45,10 +46,8 @@ target_include_directories(client PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../networking/include
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../engine/include
|
||||
${enet_SOURCE_DIR}/include
|
||||
)
|
||||
|
||||
target_link_libraries(client raylib networking engine rlImGui ImGui enet)
|
||||
target_link_libraries(client raylib networking engine rlImGui ImGui)
|
||||
|
||||
if (WIN32)
|
||||
target_link_libraries(client ws2_32)
|
||||
|
@ -1,13 +1,6 @@
|
||||
#include <stdio.h>
|
||||
#define ENET_IMPLEMENTATION
|
||||
#include <enet.h>
|
||||
|
||||
int main() {
|
||||
printf("This is the farm fighter client!\n");
|
||||
if (enet_initialize() != 0) {
|
||||
printf("Error init enet\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
return 0;
|
||||
}
|
@ -7,7 +7,6 @@ add_library(engine STATIC
|
||||
target_include_directories(engine PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
${raylib_SOURCE_DIR}/src
|
||||
${enet_SOURCE_DIR}/include
|
||||
)
|
||||
|
||||
target_include_directories(engine PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
@ -7,9 +7,6 @@ add_library(networking STATIC
|
||||
target_include_directories(networking PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
${raylib_SOURCE_DIR}/src
|
||||
${enet_SOURCE_DIR}/include
|
||||
)
|
||||
|
||||
target_include_directories(networking PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
|
||||
target_link_libraries(networking enet)
|
6088
networking/include/enet.h
Normal file
6088
networking/include/enet.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -8,10 +8,9 @@ target_include_directories(server PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../networking/include
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../engine/include
|
||||
${enet_SOURCE_DIR}/include
|
||||
)
|
||||
|
||||
target_link_libraries(server networking engine raylib enet)
|
||||
target_link_libraries(server networking engine raylib)
|
||||
|
||||
if (WIN32)
|
||||
target_link_libraries(server ws2_32)
|
||||
|
@ -1,16 +1,8 @@
|
||||
#include <stdio.h>
|
||||
#define ENET_IMPLEMENTATION
|
||||
#include <enet.h>
|
||||
|
||||
int main() {
|
||||
printf("Server starting...\n");
|
||||
if (enet_initialize() != 0) {
|
||||
printf("Error init enet\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
printf("Press any key to exit...\n");
|
||||
scanf_s("0");
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
return 0;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user