Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
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
protobuf
Commits
82e02316
Unverified
Commit
82e02316
authored
Feb 02, 2018
by
Feng Xiao
Committed by
GitHub
Feb 02, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4259 from Mizux/master
Various CMake Update
parents
5dad7cce
1ec9beb4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
5 deletions
+12
-5
CMakeLists.txt
cmake/CMakeLists.txt
+5
-5
libprotobuf-lite.cmake
cmake/libprotobuf-lite.cmake
+2
-0
libprotobuf.cmake
cmake/libprotobuf.cmake
+2
-0
libprotoc.cmake
cmake/libprotoc.cmake
+2
-0
protoc.cmake
cmake/protoc.cmake
+1
-0
No files found.
cmake/CMakeLists.txt
View file @
82e02316
...
...
@@ -8,6 +8,10 @@ endif()
# CMake policies
cmake_policy
(
SET CMP0022 NEW
)
if
(
POLICY CMP0048
)
cmake_policy
(
SET CMP0048 NEW
)
endif
()
# Project
project
(
protobuf C CXX
)
...
...
@@ -24,11 +28,7 @@ option(protobuf_BUILD_SHARED_LIBS "Build Shared Libraries" ${protobuf_BUILD_SHAR
include
(
CMakeDependentOption
)
cmake_dependent_option
(
protobuf_MSVC_STATIC_RUNTIME
"Link static runtime libraries"
ON
"NOT protobuf_BUILD_SHARED_LIBS"
OFF
)
if
(
MSVC
)
set
(
protobuf_WITH_ZLIB_DEFAULT OFF
)
else
(
MSVC
)
set
(
protobuf_WITH_ZLIB_DEFAULT ON
)
endif
(
MSVC
)
set
(
protobuf_WITH_ZLIB_DEFAULT ON
)
option
(
protobuf_WITH_ZLIB
"Build with zlib support"
${
protobuf_WITH_ZLIB_DEFAULT
}
)
set
(
protobuf_DEBUG_POSTFIX
"d"
CACHE STRING
"Default debug postfix"
)
...
...
cmake/libprotobuf-lite.cmake
View file @
82e02316
...
...
@@ -62,5 +62,7 @@ if(MSVC AND protobuf_BUILD_SHARED_LIBS)
PRIVATE LIBPROTOBUF_EXPORTS
)
endif
()
set_target_properties
(
libprotobuf-lite PROPERTIES
VERSION
${
protobuf_VERSION
}
OUTPUT_NAME
${
LIB_PREFIX
}
protobuf-lite
DEBUG_POSTFIX
"
${
protobuf_DEBUG_POSTFIX
}
"
)
add_library
(
protobuf::libprotobuf-lite ALIAS libprotobuf-lite
)
cmake/libprotobuf.cmake
View file @
82e02316
...
...
@@ -125,5 +125,7 @@ if(MSVC AND protobuf_BUILD_SHARED_LIBS)
PRIVATE LIBPROTOBUF_EXPORTS
)
endif
()
set_target_properties
(
libprotobuf PROPERTIES
VERSION
${
protobuf_VERSION
}
OUTPUT_NAME
${
LIB_PREFIX
}
protobuf
DEBUG_POSTFIX
"
${
protobuf_DEBUG_POSTFIX
}
"
)
add_library
(
protobuf::libprotobuf ALIAS libprotobuf
)
cmake/libprotoc.cmake
View file @
82e02316
...
...
@@ -225,5 +225,7 @@ if(MSVC AND protobuf_BUILD_SHARED_LIBS)
endif
()
set_target_properties
(
libprotoc PROPERTIES
COMPILE_DEFINITIONS LIBPROTOC_EXPORTS
VERSION
${
protobuf_VERSION
}
OUTPUT_NAME
${
LIB_PREFIX
}
protoc
DEBUG_POSTFIX
"
${
protobuf_DEBUG_POSTFIX
}
"
)
add_library
(
protobuf::libprotoc ALIAS libprotoc
)
cmake/protoc.cmake
View file @
82e02316
...
...
@@ -4,3 +4,4 @@ set(protoc_files
add_executable
(
protoc
${
protoc_files
}
)
target_link_libraries
(
protoc libprotobuf libprotoc
)
add_executable
(
protobuf::protoc ALIAS protoc
)
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