diff --git a/src/client/tests/CMakeLists.txt b/src/client/tests/CMakeLists.txt index 6ba6d5f6a800f63989249afbaaf6973708963745..457bc732ee41d1106c2ee7445334af8765cfa028 100644 --- a/src/client/tests/CMakeLists.txt +++ b/src/client/tests/CMakeLists.txt @@ -12,7 +12,9 @@ IF (HEADER_GTEST_INCLUDE_DIR AND (LIB_GTEST_STATIC_DIR OR LIB_GTEST_SHARED_DIR)) SET(CMAKE_CXX_STANDARD 11) INCLUDE_DIRECTORIES(/usr/include /usr/local/include) - LINK_DIRECTORIES(/usr/lib /usr/local/lib) + IF (NOT LIB_GTEST_STATIC_DIR) + LINK_DIRECTORIES(/usr/lib /usr/local/lib) + ENDIF() AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} SOURCE_LIST) diff --git a/src/os/tests/CMakeLists.txt b/src/os/tests/CMakeLists.txt index ef2c387e079b5b592c162b8533308c3dfd7ca07b..728648ba372ddc4ec9aa97296010535f58b47d13 100644 --- a/src/os/tests/CMakeLists.txt +++ b/src/os/tests/CMakeLists.txt @@ -12,7 +12,9 @@ IF (HEADER_GTEST_INCLUDE_DIR AND (LIB_GTEST_STATIC_DIR OR LIB_GTEST_SHARED_DIR)) SET(CMAKE_CXX_STANDARD 11) INCLUDE_DIRECTORIES(/usr/include /usr/local/include) - LINK_DIRECTORIES(/usr/lib /usr/local/lib) + IF (NOT LIB_GTEST_STATIC_DIR) + LINK_DIRECTORIES(/usr/lib /usr/local/lib) + ENDIF() AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} SOURCE_LIST) diff --git a/src/query/tests/CMakeLists.txt b/src/query/tests/CMakeLists.txt index 6f3268377cd816bdc9f8e3bedf5eb0484519840a..6a77cc148f6453c37e40eaabfa32c1a08f45094a 100644 --- a/src/query/tests/CMakeLists.txt +++ b/src/query/tests/CMakeLists.txt @@ -12,7 +12,9 @@ IF (HEADER_GTEST_INCLUDE_DIR AND (LIB_GTEST_STATIC_DIR OR LIB_GTEST_SHARED_DIR)) SET(CMAKE_CXX_STANDARD 11) INCLUDE_DIRECTORIES(/usr/include /usr/local/include) - LINK_DIRECTORIES(/usr/lib /usr/local/lib) + IF (NOT LIB_GTEST_STATIC_DIR) + LINK_DIRECTORIES(/usr/lib /usr/local/lib) + ENDIF() INCLUDE_DIRECTORIES(${HEADER_GTEST_INCLUDE_DIR}) AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} SOURCE_LIST)