CMAKE: allow to use system wide installation of flatbuffers
parent
70b4c0c730
commit
14febac20b
|
@ -61,7 +61,7 @@ jobs:
|
||||||
- name: Setup
|
- name: Setup
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install cmake debhelper devscripts build-essential lintian libsdl2-dev libuv1-dev libsdl2-mixer-dev postgresql-server-dev-all libpq-dev libenet-dev opencl-c-headers wayland-protocols pkg-config uuid-dev python3
|
sudo apt-get install cmake debhelper devscripts build-essential lintian libsdl2-dev libuv1-dev libsdl2-mixer-dev postgresql-server-dev-all libpq-dev libenet-dev opencl-c-headers wayland-protocols pkg-config uuid-dev python3 flatbuffers-compiler
|
||||||
|
|
||||||
- name: Ubuntu
|
- name: Ubuntu
|
||||||
run: |
|
run: |
|
||||||
|
@ -107,7 +107,7 @@ jobs:
|
||||||
- name: Setup
|
- name: Setup
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install libsdl2-dev postgresql-server-dev-all libpq-dev libenet-dev opencl-c-headers wayland-protocols pkg-config uuid-dev ninja-build python3
|
sudo apt-get install libsdl2-dev postgresql-server-dev-all libpq-dev libenet-dev opencl-c-headers wayland-protocols pkg-config uuid-dev ninja-build python3 flatbuffers-compiler
|
||||||
|
|
||||||
- name: Linux
|
- name: Linux
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
include("${ROOT_DIR}/cmake/macros.cmake")
|
include("${ROOT_DIR}/cmake/macros.cmake")
|
||||||
engine_find_header_only(flatbuffers flatbuffers.h "" "" "")
|
engine_find_header_only(flatbuffers flatbuffers.h flatbuffers "")
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#We need 0.9.8
|
#We need 0.9.8
|
||||||
include("${ROOT_DIR}/cmake/macros.cmake")
|
include("${ROOT_DIR}/cmake/macros.cmake")
|
||||||
engine_find_header_only(glm detail/type_mat.hpp glm "" "")
|
engine_find_header_only(glm detail/type_mat.hpp glm "")
|
||||||
|
|
|
@ -14,45 +14,52 @@ engine_add_library(
|
||||||
if (NOT FLATBUFFERS_FOUND)
|
if (NOT FLATBUFFERS_FOUND)
|
||||||
target_include_directories(flatbuffers PUBLIC .)
|
target_include_directories(flatbuffers PUBLIC .)
|
||||||
endif()
|
endif()
|
||||||
set(COMPILER_SRCS
|
|
||||||
compiler/src/compiler/cpp_generator.cc
|
find_program(FLATC_EXECUTABLE NAMES flatc)
|
||||||
compiler/src/compiler/cpp_generator.h
|
if (FLATC_EXECUTABLE)
|
||||||
compiler/src/compiler/go_generator.cc
|
add_executable(flatc IMPORTED GLOBAL)
|
||||||
compiler/src/compiler/go_generator.h
|
set_property(TARGET flatc PROPERTY IMPORTED_LOCATION ${FLATC_EXECUTABLE})
|
||||||
compiler/src/compiler/java_generator.cc
|
else()
|
||||||
compiler/src/compiler/java_generator.h
|
set(COMPILER_SRCS
|
||||||
compiler/src/compiler/swift_generator.cc
|
compiler/src/compiler/cpp_generator.cc
|
||||||
compiler/src/compiler/swift_generator.h
|
compiler/src/compiler/cpp_generator.h
|
||||||
compiler/src/compiler/python_generator.cc
|
compiler/src/compiler/go_generator.cc
|
||||||
compiler/src/compiler/python_generator.h
|
compiler/src/compiler/go_generator.h
|
||||||
compiler/src/compiler/ts_generator.cc
|
compiler/src/compiler/java_generator.cc
|
||||||
compiler/src/compiler/ts_generator.h
|
compiler/src/compiler/java_generator.h
|
||||||
compiler/bfbs_gen_lua.cpp
|
compiler/src/compiler/swift_generator.cc
|
||||||
compiler/code_generators.cpp
|
compiler/src/compiler/swift_generator.h
|
||||||
compiler/flatc.cpp
|
compiler/src/compiler/python_generator.cc
|
||||||
compiler/flatc_main.cpp
|
compiler/src/compiler/python_generator.h
|
||||||
compiler/idl_gen_cpp.cpp
|
compiler/src/compiler/ts_generator.cc
|
||||||
compiler/idl_gen_dart.cpp
|
compiler/src/compiler/ts_generator.h
|
||||||
compiler/idl_gen_fbs.cpp
|
compiler/bfbs_gen_lua.cpp
|
||||||
compiler/idl_gen_csharp.cpp
|
compiler/code_generators.cpp
|
||||||
compiler/idl_gen_java.cpp
|
compiler/flatc.cpp
|
||||||
compiler/idl_gen_go.cpp
|
compiler/flatc_main.cpp
|
||||||
compiler/idl_gen_grpc.cpp
|
compiler/idl_gen_cpp.cpp
|
||||||
compiler/idl_gen_json_schema.cpp
|
compiler/idl_gen_dart.cpp
|
||||||
compiler/idl_gen_kotlin.cpp
|
compiler/idl_gen_fbs.cpp
|
||||||
compiler/idl_gen_lobster.cpp
|
compiler/idl_gen_csharp.cpp
|
||||||
compiler/idl_gen_lua.cpp
|
compiler/idl_gen_java.cpp
|
||||||
compiler/idl_gen_php.cpp
|
compiler/idl_gen_go.cpp
|
||||||
compiler/idl_gen_python.cpp
|
compiler/idl_gen_grpc.cpp
|
||||||
compiler/idl_gen_rust.cpp
|
compiler/idl_gen_json_schema.cpp
|
||||||
compiler/idl_gen_swift.cpp
|
compiler/idl_gen_kotlin.cpp
|
||||||
compiler/idl_gen_text.cpp
|
compiler/idl_gen_lobster.cpp
|
||||||
compiler/idl_gen_ts.cpp
|
compiler/idl_gen_lua.cpp
|
||||||
compiler/idl_parser.cpp
|
compiler/idl_gen_php.cpp
|
||||||
compiler/reflection.cpp
|
compiler/idl_gen_python.cpp
|
||||||
compiler/util.cpp
|
compiler/idl_gen_rust.cpp
|
||||||
)
|
compiler/idl_gen_swift.cpp
|
||||||
engine_add_build_executable(TARGET flatc SRCS ${COMPILER_SRCS} NOINSTALL)
|
compiler/idl_gen_text.cpp
|
||||||
set_target_properties(flatc PROPERTIES UNITY_BUILD FALSE)
|
compiler/idl_gen_ts.cpp
|
||||||
target_link_libraries(flatc flatbuffers)
|
compiler/idl_parser.cpp
|
||||||
target_include_directories(flatc PRIVATE compiler/)
|
compiler/reflection.cpp
|
||||||
|
compiler/util.cpp
|
||||||
|
)
|
||||||
|
engine_add_build_executable(TARGET flatc SRCS ${COMPILER_SRCS} NOINSTALL)
|
||||||
|
set_target_properties(flatc PROPERTIES UNITY_BUILD FALSE)
|
||||||
|
target_link_libraries(flatc flatbuffers)
|
||||||
|
target_include_directories(flatc PRIVATE compiler/)
|
||||||
|
endif()
|
||||||
|
|
|
@ -14,6 +14,7 @@ Build-Depends:
|
||||||
wayland-protocols,
|
wayland-protocols,
|
||||||
pkg-config,
|
pkg-config,
|
||||||
uuid-dev,
|
uuid-dev,
|
||||||
|
libflatbuffers-dev,
|
||||||
libsdl2-mixer-dev
|
libsdl2-mixer-dev
|
||||||
Standards-Version: 4.1.4
|
Standards-Version: 4.1.4
|
||||||
Homepage: https://github.com/mgerhardy/vengi
|
Homepage: https://github.com/mgerhardy/vengi
|
||||||
|
|
Loading…
Reference in New Issue