Skip to content

Commit

Permalink
Except empty directory errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Wend4r committed Jan 21, 2025
1 parent a7c9df8 commit 7ee85a0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ set(THIRDPARTY_DIR "${SOURCESDK_DIR}/thirdparty")
set(GAME_PROTOBUFS_DIR "${THIRDPARTY_DIR}/game_protobufs")
set(PROTOBUF_DIR "${THIRDPARTY_DIR}/protobuf")

set(GAME_PROTOBUFS_NAME "Game Protobufs")
set(PROTOBUF_NAME "Protocol Buffer")

if(EXISTS "${GAME_PROTOBUFS_DIR}")
message(FATAL_ERROR "Directory \"${GAME_PROTOBUFS_DIR}\" (${GAME_PROTOBUFS_NAME}) hasn't found. Did you clone recursively?")
endif()

if(EXISTS "${PROTOBUF_DIR}")
message(FATAL_ERROR "Directory \"${PROTOBUF_DIR}\" (${PROTOBUF_NAME}) hasn't found. Did you clone recursively?")
endif()

set(SOURCESDK_GAME_TARGET "cs2" CACHE STRING "Game name. See CMakeGameManifests.json")
option(SOURCESDK_COMPILE_PROTOBUF "Compile Protocol Buffers" ON)
option(SOURCESDK_CONFIGURE_EXPORT_MAP "Configure export symbols/map (Unix only)" ON)
Expand Down
2 changes: 1 addition & 1 deletion cmake/sourcesdk/manifests/proto.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ set(SOURCESDK_MANIFESTS_PROTO_ABSOLUTE_DIR "${GAME_PROTOBUFS_DIR}/${SOURCESDK_MA
if(EXISTS "${SOURCESDK_MANIFESTS_PROTO_ABSOLUTE_DIR}")
list(APPEND SOURCESDK_PROTO_DIRS ${SOURCESDK_MANIFESTS_PROTO_ABSOLUTE_DIR})
else()
message(FATAL_ERROR "Folder \"${SOURCESDK_MANIFESTS_PROTO_DIR}\" hasn't found by \"${SOURCESDK_GAME_TARGET}\" target game")
message(FATAL_ERROR "Folder \"${SOURCESDK_MANIFESTS_PROTO_ABSOLUTE_DIR}\" hasn't found by \"${SOURCESDK_GAME_TARGET}\" target game.")
endif()

0 comments on commit 7ee85a0

Please sign in to comment.