forked from raceintospace/raceintospace
-
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.
builds correctly on x64-windows with msvc compiler
- Loading branch information
Showing
14 changed files
with
121 additions
and
102 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,6 @@ build_* | |
*.swp | ||
|
||
/vsbuild/.vs/raceintospace/v16 | ||
CMakeUserPresets.json | ||
.vscode | ||
vcpkg_installed |
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
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 |
---|---|---|
@@ -1,47 +1,8 @@ | ||
include_directories(${PROJECT_SOURCE_DIR}/src) | ||
find_package(Protobuf REQUIRED) | ||
include_directories(${Protobuf_INCLUDE_DIRS}) | ||
add_library(raceintospace_protobuf raceintospace.proto) | ||
protobuf_generate(TARGET raceintospace_protobuf) | ||
target_include_directories(raceintospace_protobuf INTERFACE ${CMAKE_CURRENT_BINARY_DIR}) | ||
|
||
# From http://www.cmake.org/pipermail/cmake/2008-September/023963.html | ||
FUNCTION(WRAP_PROTO VAR) | ||
IF (NOT ARGN) | ||
MESSAGE(SEND_ERROR "Error: WRAP PROTO called without any proto files") | ||
RETURN() | ||
ENDIF(NOT ARGN) | ||
# set(raceintospace_protobuf_include_dir ${CMAKE_CURRENT_BINARY_DIR} PARENT_SCOPE) | ||
|
||
if(TARGET ext_protobuf) | ||
set(protoc ${LocalPrefix}/bin/protoc) | ||
set(deps ext_protobuf) | ||
else() | ||
set(protoc protoc) | ||
set(deps) | ||
endif() | ||
|
||
SET(INCL) | ||
SET(${VAR}) | ||
FOREACH(FIL ${ARGN}) | ||
GET_FILENAME_COMPONENT(ABS_FIL ${FIL} ABSOLUTE) | ||
GET_FILENAME_COMPONENT(FIL_WE ${FIL} NAME_WE) | ||
LIST(APPEND ${VAR} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.cc") | ||
LIST(APPEND INCL "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb.h") | ||
|
||
ADD_CUSTOM_COMMAND( | ||
OUTPUT ${${VAR}} ${INCL} | ||
COMMAND ${protoc} | ||
ARGS --cpp_out ${CMAKE_CURRENT_BINARY_DIR} --proto_path ${CMAKE_CURRENT_SOURCE_DIR} ${ABS_FIL} | ||
DEPENDS ${ABS_FIL} ${deps} | ||
COMMENT "Running protocol buffer compiler on ${FIL}" | ||
VERBATIM ) | ||
ENDFOREACH(FIL) | ||
|
||
SET(${VAR} ${${VAR}} PARENT_SCOPE) | ||
ENDFUNCTION(WRAP_PROTO) | ||
|
||
wrap_proto(raceintospace_proto_impl raceintospace.proto) | ||
|
||
add_library( | ||
raceintospace_protobuf STATIC | ||
${raceintospace_proto_impl} | ||
) | ||
|
||
set(raceintospace_protobuf_include_dir ${CMAKE_CURRENT_BINARY_DIR} PARENT_SCOPE) | ||
|
||
add_dependencies(raceintospace_protobuf libs) |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
syntax = "proto2"; | ||
package raceintospace; | ||
|
||
message Equipment { | ||
|
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,14 @@ | ||
{ | ||
"default-registry": { | ||
"kind": "git", | ||
"baseline": "943c5ef1c8f6b5e6ced092b242c8299caae2ff01", | ||
"repository": "https://github.com/microsoft/vcpkg" | ||
}, | ||
"registries": [ | ||
{ | ||
"kind": "artifact", | ||
"location": "https://github.com/microsoft/vcpkg-ce-catalog/archive/refs/heads/main.zip", | ||
"name": "microsoft" | ||
} | ||
] | ||
} |
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,18 @@ | ||
{ | ||
"dependencies": [ | ||
"boost-algorithm", | ||
"boost-format", | ||
"boost-foreach", | ||
"boost-smart-ptr", | ||
"libpng", | ||
"zlib", | ||
"cereal", | ||
"protobuf", | ||
"libtheora", | ||
"libogg", | ||
"libvorbis", | ||
"sdl1", | ||
"physfs", | ||
"jsoncpp" | ||
] | ||
} |