-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a092eb8
commit 7bd3016
Showing
16 changed files
with
203 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
add_subdirectory(common) | ||
|
||
# Server build | ||
set(SERVER_SOURCE_FILES server/server.cpp ${SRC_COMMON_SERVER}) | ||
add_executable(server ${SERVER_SOURCE_FILES}) | ||
target_link_libraries(server sfml-graphics sfml-window sfml-network sfml-system) | ||
target_compile_features(server PRIVATE cxx_std_17) | ||
|
||
add_custom_command(TARGET server POST_BUILD | ||
COMMAND ${CMAKE_COMMAND} -E copy_directory | ||
${CMAKE_SOURCE_DIR}/textures $<TARGET_FILE_DIR:server>/textures) | ||
|
||
# Client build | ||
file(GLOB SOURCE_FILES CONFIGURE_DEPENDS client/main.cpp ${SRC_COMMON_CLIENT}) | ||
add_executable(SFML_project ${SOURCE_FILES}) | ||
target_compile_definitions(SFML_project PRIVATE CLIENT) | ||
target_link_libraries(SFML_project sfml-graphics sfml-window sfml-audio sfml-network sfml-system) | ||
target_compile_features(SFML_project PRIVATE cxx_std_17) | ||
|
||
if(WIN32) | ||
add_custom_command( | ||
TARGET SFML_project | ||
COMMENT "Copy OpenAL DLL" | ||
PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${SFML_SOURCE_DIR}/extlibs/bin/$<IF:$<BOOL:${ARCH_64BITS}>,x64,x86>/openal32.dll $<TARGET_FILE_DIR:SFML_project> | ||
VERBATIM) | ||
endif() | ||
|
||
add_custom_command(TARGET SFML_project POST_BUILD | ||
COMMAND ${CMAKE_COMMAND} -E copy_directory | ||
${CMAKE_SOURCE_DIR}/textures $<TARGET_FILE_DIR:SFML_project>/textures) | ||
|
||
# Installing instructions | ||
install(TARGETS SFML_project server DESTINATION ${CMAKE_SOURCE_DIR}/bin) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
add_subdirectory(Multiplayer) | ||
|
||
# Client dependencies | ||
file(GLOB SRC_COMMON_CLIENT CONFIGURE_DEPENDS ${SRC_COMMON_MULTIPLAYER} *.cpp) | ||
message(STATUS "SRC_COMMON_CLIENT: ${SRC_COMMON_CLIENT}") | ||
set(SRC_COMMON_CLIENT ${SRC_COMMON_CLIENT} PARENT_SCOPE) | ||
|
||
# Server dependencies | ||
file(GLOB SRC_COMMON_SERVER CONFIGURE_DEPENDS ${SRC_COMMON_MULTIPLAYER} Object.cpp) | ||
message(STATUS "SRC_COMMON_SERVER: ${SRC_COMMON_SERVER}") | ||
set(SRC_COMMON_SERVER ${SRC_COMMON_SERVER} PARENT_SCOPE) |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
file(GLOB SRC_COMMON_MULTIPLAYER CONFIGURE_DEPENDS *.cpp) | ||
set(SRC_COMMON_MULTIPLAYER ${SRC_COMMON_MULTIPLAYER} PARENT_SCOPE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.