Browse Source

add llt interception and solve circle depend

pull/649/head
taoxudonghaha 5 years ago
parent
commit
08b6c6ac13
2 changed files with 5 additions and 13 deletions
  1. +3
    -12
      cmake/FindModule.cmake
  2. +2
    -1
      cmake/external_libs/gtest.cmake

+ 3
- 12
cmake/FindModule.cmake View File

@@ -3,16 +3,11 @@
name - find the library name
path - find the library path
#]]
function(find_module module name)
function(find_module module name path)
if (TARGET ${module})
return()
endif()

set(options)
set(oneValueArgs)
set(multiValueArgs)
cmake_parse_arguments(MODULE "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
set(path ${MODULE_UNPARSED_ARGUMENTS})
add_library(${module} INTERFACE)
find_library(${module}_LIBRARY_DIR NAMES ${name} NAMES_PER_DIR PATHS ${path}
PATH_SUFFIXES lib
)
@@ -21,9 +16,5 @@ function(find_module module name)
if ("${${module}_LIBRARY_DIR}" STREQUAL "${module}_LIBRARY_DIR-NOTFOUND")
message(FATAL_ERROR "${name} not found in ${path}")
endif()
add_library(${module} SHARED IMPORTED)
set_target_properties(${module} PROPERTIES
IMPORTED_LOCATION ${${module}_LIBRARY_DIR}
)
target_link_libraries(${module} INTERFACE ${${module}_LIBRARY_DIR})
endfunction()

+ 2
- 1
cmake/external_libs/gtest.cmake View File

@@ -11,7 +11,8 @@ if ((${CMAKE_INSTALL_PREFIX} STREQUAL /usr/local) OR
endif()

if (GE_PB_PKG)
set(REQ_URL "${GE_PB_PKG}/libs/gtest/release-1.8.0.tar.gz")
#set(REQ_URL "${GE_PB_PKG}/libs/gtest/release-1.8.0.tar.gz")
set(REQ_URL "https://gitee.com/mirrors/googletest/repository/archive/release-1.8.0.tar.gz")
set(MD5 "")
elseif (ENABLE_GITEE)
set(REQ_URL "https://gitee.com/mirrors/googletest/repository/archive/release-1.8.0.tar.gz")


Loading…
Cancel
Save