File tree 4 files changed +19
-3
lines changed
4 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,10 @@ endif()
30
30
31
31
# -----------find protobuf lib-----------
32
32
find_package (Protobuf REQUIRED)
33
+ if (${CMAKE_VERSION} VERSION_LESS "3.6.0" )
34
+ set (Protobuf_LIBRARIES ${PROTOBUF_LIBRARIES} )
35
+ set (Protobuf_INCLUDE_DIRS ${PROTOBUF_INCLUDE_DIRS} )
36
+ endif ()
33
37
34
38
# -----------set path-----------
35
39
set (SRC_PATH source )
Original file line number Diff line number Diff line change @@ -6,8 +6,12 @@ set(CMAKE_C_STANDARD 99)
6
6
set (CMAKE_CXX_STANDARD 11)
7
7
8
8
find_package (Protobuf REQUIRED)
9
+ if (${CMAKE_VERSION} VERSION_LESS "3.6.0" )
10
+ set (Protobuf_LIBRARIES ${PROTOBUF_LIBRARIES} )
11
+ set (Protobuf_INCLUDE_DIRS ${PROTOBUF_INCLUDE_DIRS} )
12
+ endif ()
9
13
10
- include_directories (${PROTOBUF_INCLUDE_DIR } )
14
+ include_directories (${Protobuf_INCLUDE_DIRS } )
11
15
12
16
include_directories (${CMAKE_CURRENT_BINARY_DIR} )
13
17
Original file line number Diff line number Diff line change @@ -6,8 +6,12 @@ set(CMAKE_C_STANDARD 99)
6
6
set (CMAKE_CXX_STANDARD 11)
7
7
8
8
find_package (Protobuf REQUIRED)
9
+ if (${CMAKE_VERSION} VERSION_LESS "3.6.0" )
10
+ set (Protobuf_LIBRARIES ${PROTOBUF_LIBRARIES} )
11
+ set (Protobuf_INCLUDE_DIRS ${PROTOBUF_INCLUDE_DIRS} )
12
+ endif ()
9
13
10
- include_directories (${PROTOBUF_INCLUDE_DIR } )
14
+ include_directories (${Protobuf_INCLUDE_DIRS } )
11
15
12
16
include_directories (${CMAKE_CURRENT_BINARY_DIR} )
13
17
Original file line number Diff line number Diff line change @@ -6,8 +6,12 @@ set(CMAKE_C_STANDARD 99)
6
6
set (CMAKE_CXX_STANDARD 11)
7
7
8
8
find_package (Protobuf REQUIRED)
9
+ if (${CMAKE_VERSION} VERSION_LESS "3.6.0" )
10
+ set (Protobuf_LIBRARIES ${PROTOBUF_LIBRARIES} )
11
+ set (Protobuf_INCLUDE_DIRS ${PROTOBUF_INCLUDE_DIRS} )
12
+ endif ()
9
13
10
- include_directories (${PROTOBUF_INCLUDE_DIR } )
14
+ include_directories (${Protobuf_INCLUDE_DIRS } )
11
15
12
16
include_directories (${CMAKE_CURRENT_BINARY_DIR} )
13
17
You can’t perform that action at this time.
0 commit comments