Creating CMake Libraries - That others can find and use.

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ส.ค. 2024

ความคิดเห็น • 7

  •  หลายเดือนก่อน +2

    This is god sent stuff.

  • @hansdorfer3371
    @hansdorfer3371 หลายเดือนก่อน +1

    Nice Video, you are accually the first guy on youtube who explained it. But I have a question: 20:40 - When I use this command, it says that the source directory does not appear to contain CMakeLists.txt - And indeed, there is no file like this in the whole file tree after using cmake --install. What should I do? I have to use Qt so its a bit different I quess

    • @constref1983
      @constref1983  หลายเดือนก่อน +1

      Hey, there should be no CMakeLists.txt in the tree AFTER doing a --install. You are installing the library and the CMakeLists.txt file is the instructions on how to build/install. After installing, you would have the other scripts that I outline in the video which other projects would use to find all your headers and libs. What I'm showing at 20:40 is how one would pass the CMAKE_PREFIX_PATH variable to CMake if they weren't using Visual Studio/IDE and wanted to actually find and link with our library. This part of the video was a test project showing that we had set things up correctly and can actually find and link with our library. If you have gotten to that part, was able to build and install your library, and the files in installed directory match what I showed earlier in the video, congratulations, you did things correctly :)

  • @edwardzdankiewicz9068
    @edwardzdankiewicz9068 หลายเดือนก่อน

    What happens to all that on Windows? Is there a Windows equivalent to the linux usr/lib system?

    • @constref1983
      @constref1983  หลายเดือนก่อน

      The entire video is based in Windows. What are you having trouble with? There is no standard usr/lib equivalent, check the video again, I go over how to install a package and how to then find it on Windows.

  • @user-fj9hf4bu9f
    @user-fj9hf4bu9f 23 วันที่ผ่านมา

    Why even make a video when there's no github link to example project?

    • @constref1983
      @constref1983  22 วันที่ผ่านมา +1

      Here you go: github.com/constref/cmake-examples/tree/master/cmake-library