Cmake 如何将libobs构建为obs studio节点模块的依赖项?

Cmake 如何将libobs构建为obs studio节点模块的依赖项?,cmake,cpack,obs-studio,Cmake,Cpack,Obs Studio,我正在努力。 此模块需要libobs作为依赖项。构建此模块时,如果未指定任何版本,则下载预构建版本的libobs。我们可以指定自定义libobs,如README.md 我按照这些步骤构建了libobs。中列出了这些步骤 git克隆https://github.com/stream-labs/obs-studio cd-obs-studio git子模块更新--init--recursive mkdir构建 cd构建 cmake-DENABLE_UI=false-DDepsPath=“C:\Use

我正在努力。
此模块需要
libobs
作为依赖项。构建此模块时,如果未指定任何版本,则下载预构建版本的
libobs
。我们可以指定自定义
libobs
,如
README.md

我按照这些步骤构建了
libobs
。中列出了这些步骤

  • git克隆https://github.com/stream-labs/obs-studio
  • cd-obs-studio
  • git子模块更新--init--recursive
  • mkdir构建
  • cd构建
  • cmake-DENABLE_UI=false-DDepsPath=“C:\Users\alokm\Downloads\dependencies2019\win64”-DENABLE_SCRIPTING=false-G“Visual Studio 16 2019”-A x64
  • cmake——构建。
  • cpack-G ZIP
  • 最后一步(
    cpack-G ZIP
    )失败并出现错误

    PS C:\Users\alokm\tmp\streamlabs\obs-studio\build> cpack -G ZIP
    CPack: Create package using ZIP
    CPack: Install projects
    CPack: - Install project: obs-studio []
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/deps/w32-pthreads/cmake_install.cmake:51 (file):
      file INSTALL cannot find
      "C:/Users/alokm/tmp/streamlabs/obs-studio/build/deps/w32-pthreads/Release/w32-pthreads.dll":
      File exists.
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/deps/cmake_install.cmake:37 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:37 (include)
    
    
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/deps/glad/cmake_install.cmake:39 (file):
      file INSTALL cannot find
      "C:/Users/alokm/tmp/streamlabs/obs-studio/build/deps/glad/Release/obsglad.dll":
      File exists.
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/deps/cmake_install.cmake:42 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:37 (include)
    
    
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/libobs-d3d11/cmake_install.cmake:39 (file):
      file INSTALL cannot find
      "C:/Users/alokm/tmp/streamlabs/obs-studio/build/libobs-d3d11/Release/libobs-d3d11.dll":
      File exists.
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:42 (include)
    
    
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/libobs-winrt/cmake_install.cmake:39 (file):
      file INSTALL cannot find
      "C:/Users/alokm/tmp/streamlabs/obs-studio/build/libobs-winrt/Release/libobs-winrt.dll":
      File exists.
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:47 (include)
    
    
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/libobs-opengl/cmake_install.cmake:39 (file):
      file INSTALL cannot find
      "C:/Users/alokm/tmp/streamlabs/obs-studio/build/libobs-opengl/Release/libobs-opengl.dll":
      File exists.
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:52 (include)
    
    
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/libobs/cmake_install.cmake:51 (file):
      file INSTALL cannot find
      "C:/Users/alokm/tmp/streamlabs/obs-studio/build/libobs/Release/obs.dll":
      File exists.
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:57 (include)
    
    
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/coreaudio-encoder/cmake_install.cmake:39 (file):
      file INSTALL cannot find
      "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/coreaudio-encoder/Release/coreaudio-encoder.dll":
      File exists.
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:37 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)
    
    
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/win-wasapi/cmake_install.cmake:39 (file):
      file INSTALL cannot find
      "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/win-wasapi/Release/win-wasapi.dll":
      No such file or directory.
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:42 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)
    
    
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/win-dshow/cmake_install.cmake:39 (file):
      file INSTALL cannot find
      "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/win-dshow/Release/win-dshow.dll":
      No such file or directory.
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:47 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)
    
    
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/win-capture/cmake_install.cmake:39 (file):
      file INSTALL cannot find
      "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/win-capture/Release/win-capture.dll":
      No such file or directory.
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:52 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)
    
    
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/win-capture/graphics-hook/cmake_install.cmake:39 (file):
      file INSTALL cannot find
      "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/win-capture/graphics-hook/Release/graphics-hook64.dll":
      No such file or directory.
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/win-capture/cmake_install.cmake:59 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:52 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)
    
    
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/win-capture/get-graphics-offsets/cmake_install.cmake:39 (file):
      file INSTALL cannot find
      "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/win-capture/get-graphics-offsets/Release/get-graphics-offsets64.exe":
      No such file or directory.
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/win-capture/cmake_install.cmake:64 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:52 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)
    
    
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/win-capture/inject-helper/cmake_install.cmake:39 (file):
      file INSTALL cannot find
      "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/win-capture/inject-helper/Release/inject-helper64.exe":
      No such file or directory.
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/win-capture/cmake_install.cmake:69 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:52 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)
    
    
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/decklink/win/cmake_install.cmake:39 (file):
      file INSTALL cannot find
      "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/decklink/win/Release/win-decklink.dll":
      No such file or directory.
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:57 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)
    
    
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/win-mf/cmake_install.cmake:39 (file):
      file INSTALL cannot find
      "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/win-mf/Release/win-mf.dll":
      No such file or directory.
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:62 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)
    
    
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-qsv11/cmake_install.cmake:39 (file):
      file INSTALL cannot find
      "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-qsv11/Release/obs-qsv11.dll":
      No such file or directory.
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:67 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)
    
    
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/enc-amf/cmake_install.cmake:39 (file):
      file INSTALL cannot find
      "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/enc-amf/Release/enc-amf.dll":
      No such file or directory.
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:77 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)
    
    
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/enc-amf/amf-test/cmake_install.cmake:39 (file):
      file INSTALL cannot find
      "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/enc-amf/amf-test/Release/enc-amf-test64.exe":
      No such file or directory.
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/enc-amf/cmake_install.cmake:59 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:77 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)
    
    
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-openvr/cmake_install.cmake:39 (file):
      file INSTALL cannot find
      "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-openvr/Release/win-openvr.dll":
      No such file or directory.
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:87 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)
    
    
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/motion-effect/src/motion-transition/cmake_install.cmake:39 (file):
      file INSTALL cannot find
      "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/motion-effect/src/motion-transition/Release/motion-transition.dll":
      No such file or directory.
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/motion-effect/cmake_install.cmake:38 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:92 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)
    
    
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-vst/cmake_install.cmake:39 (file):
      file INSTALL cannot find
      "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-vst/Release/obs-vst.dll":
      No such file or directory.
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:97 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)
    
    
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/image-source/cmake_install.cmake:39 (file):
      file INSTALL cannot find
      "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/image-source/Release/image-source.dll":
      No such file or directory.
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:102 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)
    
    
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-x264/cmake_install.cmake:39 (file):
      file INSTALL cannot find
      "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-x264/Release/obs-x264.dll":
      No such file or directory.
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:107 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)
    
    
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-ffmpeg/cmake_install.cmake:39 (file):
      file INSTALL cannot find
      "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-ffmpeg/Release/obs-ffmpeg.dll":
      No such file or directory.
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:117 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)
    
    
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-ffmpeg/ffmpeg-mux/cmake_install.cmake:39 (file):
      file INSTALL cannot find
      "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-ffmpeg/ffmpeg-mux/Release/obs-ffmpeg-mux.exe":
      No such file or directory.
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-ffmpeg/cmake_install.cmake:59 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:117 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)
    
    
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-outputs/cmake_install.cmake:39 (file):
      file INSTALL cannot find
      "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-outputs/Release/obs-outputs.dll":
      No such file or directory.
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:122 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)
    
    
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-filters/cmake_install.cmake:39 (file):
      file INSTALL cannot find
      "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-filters/Release/obs-filters.dll":
      No such file or directory.
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:127 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)
    
    
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-transitions/cmake_install.cmake:39 (file):
      file INSTALL cannot find
      "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-transitions/Release/obs-transitions.dll":
      No such file or directory.
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:132 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)
    
    
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-text/cmake_install.cmake:39 (file):
      file INSTALL cannot find
      "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-text/Release/obs-text.dll":
      No such file or directory.
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:137 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)
    
    
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/rtmp-services/cmake_install.cmake:39 (file):
      file INSTALL cannot find
      "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/rtmp-services/Release/rtmp-services.dll":
      No such file or directory.
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:142 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)
    
    
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/text-freetype2/cmake_install.cmake:39 (file):
      file INSTALL cannot find
      "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/text-freetype2/Release/text-freetype2.dll":
      No such file or directory.
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:147 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)
    
    
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-ndi/cmake_install.cmake:37 (file):
      file INSTALL cannot find
      "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/obs-ndi/Release/obs-ndi.dll":
      No such file or directory.
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:152 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)
    
    
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/slobs-virtual-cam/windows/obs-virtual-cam/src/virtual-output/cmake_install.cmake:39 (file):
    ":
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/slobs-virtual-cam/cmake_install.cmake:37 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)
    
    
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/slobs-virtual-cam/windows/obs-virtual-cam/src/virtual-source/cmake_install.cmake:39 (file):
      file INSTALL cannot find
      "C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/slobs-virtual-cam/windows/obs-virtual-cam/src/virtual-source/Release/obs-virtualsource.dll":
      No such file or directory.
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/slobs-virtual-cam/cmake_install.cmake:37 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/plugins/cmake_install.cmake:157 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:62 (include)
    
    
    CMake Error at C:/Users/alokm/tmp/streamlabs/obs-studio/build/UI/obs-frontend-api/cmake_install.cmake:39 (file):
      file INSTALL cannot find
      "C:/Users/alokm/tmp/streamlabs/obs-studio/build/UI/obs-frontend-api/Release/obs-frontend-api.dll":
      No such file or directory.
    Call Stack (most recent call first):
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/UI/cmake_install.cmake:37 (include)
      C:/Users/alokm/tmp/streamlabs/obs-studio/build/cmake_install.cmake:67 (include)
    
    
    CPack Error: Error when generating package: OBS Studio (64bit)
    
    我猜不支持
    cpack
    ,所以它失败了。

    如何为
    obs studio node
    mobule构建自定义
    libobs

    检查您构建的确切配置。CPack的输出尝试安装
    版本
    配置。但是,您没有提到项目配置是什么时候进行的(设置一些默认值可能取决于项目)

    尝试显式添加所需内容:

    $ cmake .. -DENABLE_UI=false -DDepsPath="C:\Users\alokm\Downloads\dependencies2019\win64" -DENABLE_SCRIPTING=false -DCMAKE_CONFIGURATION_TYPES=Release -G "Visual Studio 16 2019" -A x64
    $ cmake --build . --config Release
    

    请帮我回答类似的问题