[kinetic/lunar] Dynamically check gtest library type
Same as but for kinetic/lunar
@@ -163,9 +163,9 @@ if(NOT GTEST_FOUND)
endif()
else()
message(STATUS "Found gtest: gtests will be built")
- add_library(gtest SHARED IMPORTED)
+ add_library(gtest UNKNOWN IMPORTED)
set_target_properties(gtest PROPERTIES IMPORTED_LOCATION "${GTEST_LIBRARIES}")
- add_library(gtest_main SHARED IMPORTED)
+ add_library(gtest_main UNKNOWN IMPORTED)
set_target_properties(gtest_main PROPERTIES IMPORTED_LOCATION "${GTEST_MAIN_LIBRARIES}")
set(GTEST_FOUND ${GTEST_FOUND} CACHE INTERNAL "")
set(GTEST_INCLUDE_DIRS ${GTEST_INCLUDE_DIRS} CACHE INTERNAL "")
