Skip to content

Commit 419a130

Browse files
authored
Merge pull request #1206 from F0REacH/set_protobuf_libdir
Set protobuf CMAKE_INSTALL_LIBDIR to fixed value lib
2 parents df676a1 + ed56240 commit 419a130

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

cmake/external/protobuf.cmake

+4-8
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,12 @@ IF(WIN32)
2929
"${PROTOBUF_INSTALL_DIR}/lib/libprotoc.lib" CACHE FILEPATH "protoc library." FORCE)
3030
SET(PROTOBUF_PROTOC_EXECUTABLE "${PROTOBUF_INSTALL_DIR}/bin/protoc.exe" CACHE FILEPATH "protobuf executable." FORCE)
3131
ELSE(WIN32)
32-
IF(${HOST_SYSTEM} STREQUAL "centos")
33-
SET(LIB "lib64")
34-
ELSE()
35-
SET(LIB "lib")
36-
ENDIF()
3732
SET(PROTOBUF_LITE_LIBRARY
38-
"${PROTOBUF_INSTALL_DIR}/${LIB}/libprotobuf-lite.a" CACHE FILEPATH "protobuf lite library." FORCE)
33+
"${PROTOBUF_INSTALL_DIR}/lib/libprotobuf-lite.a" CACHE FILEPATH "protobuf lite library." FORCE)
3934
SET(PROTOBUF_LIBRARY
40-
"${PROTOBUF_INSTALL_DIR}/${LIB}/libprotobuf.a" CACHE FILEPATH "protobuf library." FORCE)
35+
"${PROTOBUF_INSTALL_DIR}/lib/libprotobuf.a" CACHE FILEPATH "protobuf library." FORCE)
4136
SET(PROTOBUF_PROTOC_LIBRARY
42-
"${PROTOBUF_INSTALL_DIR}/${LIB}/libprotoc.a" CACHE FILEPATH "protoc library." FORCE)
37+
"${PROTOBUF_INSTALL_DIR}/lib/libprotoc.a" CACHE FILEPATH "protoc library." FORCE)
4338
SET(PROTOBUF_PROTOC_EXECUTABLE "${PROTOBUF_INSTALL_DIR}/bin/protoc" CACHE FILEPATH "protobuf executable." FORCE)
4439
ENDIF(WIN32)
4540

@@ -58,6 +53,7 @@ ExternalProject_Add(
5853
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
5954
-DCMAKE_BUILD_TYPE=Release
6055
-DCMAKE_INSTALL_PREFIX=${PROTOBUF_INSTALL_DIR}
56+
-DCMAKE_INSTALL_LIBDIR=lib
6157
)
6258

6359
LIST(APPEND external_project_dependencies protobuf)

0 commit comments

Comments
 (0)