CMAKE: allow to use system wide installation of flatbuffers
parent
70b4c0c730
commit
14febac20b
|
@ -61,7 +61,7 @@ jobs:
|
|||
- name: Setup
|
||||
run: |
|
||||
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
|
||||
run: |
|
||||
|
@ -107,7 +107,7 @@ jobs:
|
|||
- name: Setup
|
||||
run: |
|
||||
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
|
||||
run: |
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
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
|
||||
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)
|
||||
target_include_directories(flatbuffers PUBLIC .)
|
||||
endif()
|
||||
set(COMPILER_SRCS
|
||||
compiler/src/compiler/cpp_generator.cc
|
||||
compiler/src/compiler/cpp_generator.h
|
||||
compiler/src/compiler/go_generator.cc
|
||||
compiler/src/compiler/go_generator.h
|
||||
compiler/src/compiler/java_generator.cc
|
||||
compiler/src/compiler/java_generator.h
|
||||
compiler/src/compiler/swift_generator.cc
|
||||
compiler/src/compiler/swift_generator.h
|
||||
compiler/src/compiler/python_generator.cc
|
||||
compiler/src/compiler/python_generator.h
|
||||
compiler/src/compiler/ts_generator.cc
|
||||
compiler/src/compiler/ts_generator.h
|
||||
compiler/bfbs_gen_lua.cpp
|
||||
compiler/code_generators.cpp
|
||||
compiler/flatc.cpp
|
||||
compiler/flatc_main.cpp
|
||||
compiler/idl_gen_cpp.cpp
|
||||
compiler/idl_gen_dart.cpp
|
||||
compiler/idl_gen_fbs.cpp
|
||||
compiler/idl_gen_csharp.cpp
|
||||
compiler/idl_gen_java.cpp
|
||||
compiler/idl_gen_go.cpp
|
||||
compiler/idl_gen_grpc.cpp
|
||||
compiler/idl_gen_json_schema.cpp
|
||||
compiler/idl_gen_kotlin.cpp
|
||||
compiler/idl_gen_lobster.cpp
|
||||
compiler/idl_gen_lua.cpp
|
||||
compiler/idl_gen_php.cpp
|
||||
compiler/idl_gen_python.cpp
|
||||
compiler/idl_gen_rust.cpp
|
||||
compiler/idl_gen_swift.cpp
|
||||
compiler/idl_gen_text.cpp
|
||||
compiler/idl_gen_ts.cpp
|
||||
compiler/idl_parser.cpp
|
||||
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/)
|
||||
|
||||
find_program(FLATC_EXECUTABLE NAMES flatc)
|
||||
if (FLATC_EXECUTABLE)
|
||||
add_executable(flatc IMPORTED GLOBAL)
|
||||
set_property(TARGET flatc PROPERTY IMPORTED_LOCATION ${FLATC_EXECUTABLE})
|
||||
else()
|
||||
set(COMPILER_SRCS
|
||||
compiler/src/compiler/cpp_generator.cc
|
||||
compiler/src/compiler/cpp_generator.h
|
||||
compiler/src/compiler/go_generator.cc
|
||||
compiler/src/compiler/go_generator.h
|
||||
compiler/src/compiler/java_generator.cc
|
||||
compiler/src/compiler/java_generator.h
|
||||
compiler/src/compiler/swift_generator.cc
|
||||
compiler/src/compiler/swift_generator.h
|
||||
compiler/src/compiler/python_generator.cc
|
||||
compiler/src/compiler/python_generator.h
|
||||
compiler/src/compiler/ts_generator.cc
|
||||
compiler/src/compiler/ts_generator.h
|
||||
compiler/bfbs_gen_lua.cpp
|
||||
compiler/code_generators.cpp
|
||||
compiler/flatc.cpp
|
||||
compiler/flatc_main.cpp
|
||||
compiler/idl_gen_cpp.cpp
|
||||
compiler/idl_gen_dart.cpp
|
||||
compiler/idl_gen_fbs.cpp
|
||||
compiler/idl_gen_csharp.cpp
|
||||
compiler/idl_gen_java.cpp
|
||||
compiler/idl_gen_go.cpp
|
||||
compiler/idl_gen_grpc.cpp
|
||||
compiler/idl_gen_json_schema.cpp
|
||||
compiler/idl_gen_kotlin.cpp
|
||||
compiler/idl_gen_lobster.cpp
|
||||
compiler/idl_gen_lua.cpp
|
||||
compiler/idl_gen_php.cpp
|
||||
compiler/idl_gen_python.cpp
|
||||
compiler/idl_gen_rust.cpp
|
||||
compiler/idl_gen_swift.cpp
|
||||
compiler/idl_gen_text.cpp
|
||||
compiler/idl_gen_ts.cpp
|
||||
compiler/idl_parser.cpp
|
||||
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,
|
||||
pkg-config,
|
||||
uuid-dev,
|
||||
libflatbuffers-dev,
|
||||
libsdl2-mixer-dev
|
||||
Standards-Version: 4.1.4
|
||||
Homepage: https://github.com/mgerhardy/vengi
|
||||
|
|
Loading…
Reference in New Issue