在cygwin中,禁用//键入samba路径

时间:2016-10-17 11:50:22

标签: cmake cygwin

我使用CMake及其FindPackage。 FindPackage经常用于// usr / local / lib之类的东西。但是Cygwin解决了//是一个samba路径。因此,它的情况是CMake错误。

我想在Cygwin上禁用//键入samba路径。

问候。

我调用FindOpenCV,FindQtCore和FindECM(额外CMake模块)。 例如,Cygwin上有FindOpenCV的错误消息,如下所示。

CMake Error at /lib/cmake/opencv/OpenCVModules.cmake:124 (message):
  The imported target "opencv_core" references the file

     "//lib/libopencv_core.dll.a"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "/lib/cmake/opencv/OpenCVModules.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  /lib/cmake/opencv/OpenCVConfig.cmake:71 (include)
  util/CMakeLists.txt:5 (find_package)

在OpenCVModules.cmke上会出现消息。 (在OpenCVModule.cmake的第112行调用脚本,在OpenCVConfig.cmake的第71行调用OpenCVModule.cmake。) 例如,OpenCVModule-relwithdebinfo.cmake如下所示。

#----------------------------------------------------------------
# Generated CMake target import file for configuration "RelWithDebInfo".
#----------------------------------------------------------------

# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)

# Import target "opencv_core" for configuration "RelWithDebInfo"
set_property(TARGET opencv_core APPEND PROPERTY IMPORTED_CONFIGURATIONS RELWITHDEBINFO)
set_target_properties(opencv_core PROPERTIES
  IMPORTED_IMPLIB_RELWITHDEBINFO "${_IMPORT_PREFIX}/lib/libopencv_core.dll.a"
  IMPORTED_LINK_INTERFACE_LIBRARIES_RELWITHDEBINFO ""
  IMPORTED_LOCATION_RELWITHDEBINFO "${_IMPORT_PREFIX}/bin/cygopencv_core-2.4.dll"
  )

list(APPEND _IMPORT_CHECK_TARGETS opencv_core )
list(APPEND _IMPORT_CHECK_FILES_FOR_opencv_core "${_IMPORT_PREFIX}/lib/libopencv_core.dll.a" "${_IMPORT_PREFIX}/bin/cygopencv_core-2.4.dll" )

有脚本可以找到/lib/opencv_core.dll.a。 如果_IMPORT_PREFIX是/,则会找到//lib/opencv_core.dll.a。 在这种情况下,// lib / opencv_core.dll.a将成为Windows路径中的\ lib \ opencv_core.dll.a。 当然。它变成了错误,因为服务器名为" lib"不存在。

0 个答案:

没有答案