Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
fuchsia.googlesource.com-third_party-flatbuffers
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fuchsia-mirror
fuchsia.googlesource.com-third_party-flatbuffers
Commits
4b79ff53
Commit
4b79ff53
authored
8 years ago
by
Wouter van Oortmerssen
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #4017 from changnet/master
option to build shared library,defeault off
parents
edd77ae2
a15659e9
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
CMakeLists.txt
+11
-0
11 additions, 0 deletions
CMakeLists.txt
with
12 additions
and
0 deletions
.gitignore
+
1
−
0
View file @
4b79ff53
...
...
@@ -64,3 +64,4 @@ target
build/VS2010/FlatBuffers.sdf
build/VS2010/FlatBuffers.opensdf
build/VS2010/ipch/**/*.ipch
*.so
This diff is collapsed.
Click to expand it.
CMakeLists.txt
+
11
−
0
View file @
4b79ff53
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment