File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
+ include (GNUInstallDirs )
16
+
15
17
set (GTEST_TARGET external.googletest )
16
18
set (GTEST_INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR} /${GTEST_TARGET} )
17
19
@@ -25,12 +27,12 @@ set(GTEST_BOTH_LIBRARIES ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES})
25
27
foreach (lib IN LISTS GTEST_BOTH_LIBRARIES )
26
28
if (MSVC )
27
29
if (CMAKE_BUILD_TYPE MATCHES Debug )
28
- set (LIB_PATH ${GTEST_INSTALL_DIR} /lib /${lib}d.lib )
30
+ set (LIB_PATH ${GTEST_INSTALL_DIR} /${CMAKE_INSTALL_LIBDIR} /${lib}d.lib )
29
31
else ()
30
- set (LIB_PATH ${GTEST_INSTALL_DIR} /lib /${lib}.lib )
32
+ set (LIB_PATH ${GTEST_INSTALL_DIR} /${CMAKE_INSTALL_LIBDIR} /${lib}.lib )
31
33
endif ()
32
34
else ()
33
- set (LIB_PATH ${GTEST_INSTALL_DIR} /lib /lib${lib}.a )
35
+ set (LIB_PATH ${GTEST_INSTALL_DIR} /${CMAKE_INSTALL_LIBDIR} /lib${lib}.a )
34
36
endif ()
35
37
list (APPEND GTEST_BUILD_BYPRODUCTS ${LIB_PATH} )
36
38
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
+ include (GNUInstallDirs )
16
+
15
17
# We only need protobuf_generate_cpp from FindProtobuf, and we are going to
16
18
# override the rest with ExternalProject version.
17
19
include (FindProtobuf )
@@ -31,9 +33,9 @@ ENDIF()
31
33
32
34
foreach (lib ${PROTOBUF_LIBRARIES} )
33
35
if (MSVC )
34
- set (LIB_PATH ${PROTOBUF_INSTALL_DIR} /lib /lib${lib}.lib )
36
+ set (LIB_PATH ${PROTOBUF_INSTALL_DIR} /${CMAKE_INSTALL_LIBDIR} /lib${lib}.lib )
35
37
else ()
36
- set (LIB_PATH ${PROTOBUF_INSTALL_DIR} /lib /lib${lib}.a )
38
+ set (LIB_PATH ${PROTOBUF_INSTALL_DIR} /${CMAKE_INSTALL_LIBDIR} /lib${lib}.a )
37
39
endif ()
38
40
list (APPEND PROTOBUF_BUILD_BYPRODUCTS ${LIB_PATH} )
39
41
You can’t perform that action at this time.
0 commit comments