forked from alliedmodders/hl2sdk
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
4 changed files
with
37 additions
and
37 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
if(NOT PROTOBUF_DIR) | ||
message(FATAL_ERROR "PROTOBUF_DIR is empty") | ||
endif() | ||
|
||
if(NOT SOURCESDK_PROTO_FILENAME_FILES) | ||
message(WARNING "SOURCESDK_PROTO_FILENAME_FILES is empty") | ||
endif() | ||
|
||
set(SOURCESDK_PROTOC_EXECUTABLE "${DEVTOOLS_BIN_DIR}/${PROTOBUF_PROTOC_NAME}${CMAKE_EXECUTABLE_SUFFIX}") | ||
|
||
set(SOURCESDK_PROTO_ARGS | ||
${SOURCESDK_PROTO_ARGS} | ||
|
||
--proto_path=${SOURCESDK_PROTOBUF_SOURCE_DIR} | ||
) | ||
|
||
foreach(PROTO_DIR IN LISTS SOURCESDK_PROTO_DIRS) | ||
list(APPEND SOURCESDK_PROTO_ARGS | ||
--proto_path=${PROTO_DIR} | ||
) | ||
endforeach() | ||
|
||
message(STATUS "To compile protos will be used ${SOURCESDK_PROTOC_EXECUTABLE}") | ||
|
||
## Generate protobuf source & headers | ||
foreach(PROTO_FILENAME IN LISTS SOURCESDK_PROTO_FILENAME_FILES) | ||
get_filename_component(PROTO_DIR "${PROTO_FILENAME}" DIRECTORY) | ||
|
||
message(STATUS "Compiling ${PROTO_FILENAME} ...") | ||
execute_process( | ||
COMMAND ${SOURCESDK_PROTOC_EXECUTABLE} ${SOURCESDK_PROTO_ARGS} --cpp_out=${PROTO_DIR} ${PROTO_FILENAME} | ||
WORKING_DIRECTORY ${SOURCESDK_DIR} | ||
) | ||
endforeach() |
0
devtools/bin/linux/protoc → devtools/bin/protoc
100755 → 100644
File renamed without changes.