Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
flatbuffers
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
flatbuffers
Commits
a15659e9
Commit
a15659e9
authored
Sep 06, 2016
by
changnet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
option to build shared library,defeault off
parent
d05d1145
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
.gitignore
.gitignore
+1
-0
CMakeLists.txt
CMakeLists.txt
+11
-0
No files found.
.gitignore
View file @
a15659e9
...
...
@@ -64,3 +64,4 @@ target
build/VS2010/FlatBuffers.sdf
build/VS2010/FlatBuffers.opensdf
build/VS2010/ipch/**/*.ipch
*.so
CMakeLists.txt
View file @
a15659e9
...
...
@@ -12,6 +12,9 @@ option(FLATBUFFERS_BUILD_FLATC "Enable the build of the flatbuffers compiler"
ON
)
option
(
FLATBUFFERS_BUILD_FLATHASH
"Enable the build of flathash"
ON
)
option
(
FLATBUFFERS_BUILD_GRPCTEST
"Enable the build of grpctest"
OFF
)
option
(
FLATBUFFERS_BUILD_SHAREDLIB
"Enable the build of the flatbuffers shared library"
OFF
)
if
(
NOT FLATBUFFERS_BUILD_FLATC AND FLATBUFFERS_BUILD_TESTS
)
message
(
WARNING
...
...
@@ -164,6 +167,11 @@ if(FLATBUFFERS_BUILD_FLATHASH)
add_executable
(
flathash
${
FlatHash_SRCS
}
)
endif
()
if
(
FLATBUFFERS_BUILD_SHAREDLIB
)
add_library
(
flatbuffers_shared SHARED
${
FlatBuffers_Library_SRCS
}
)
set_target_properties
(
flatbuffers_shared PROPERTIES OUTPUT_NAME flatbuffers
)
endif
()
function
(
compile_flatbuffers_schema_to_cpp SRC_FBS
)
get_filename_component
(
SRC_FBS_DIR
${
SRC_FBS
}
PATH
)
string
(
REGEX REPLACE
"
\\
.fbs$"
"_generated.h"
GEN_HEADER
${
SRC_FBS
}
)
...
...
@@ -212,6 +220,9 @@ if(FLATBUFFERS_INSTALL)
if
(
FLATBUFFERS_BUILD_FLATC
)
install
(
TARGETS flatc DESTINATION bin
)
endif
()
if
(
FLATBUFFERS_BUILD_SHAREDLIB
)
install
(
TARGETS flatbuffers_shared DESTINATION lib
)
endif
()
endif
()
if
(
FLATBUFFERS_BUILD_TESTS
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment