Giter VIP home page Giter VIP logo

Comments (8)

linwenchen avatar linwenchen commented on May 18, 2024

I did a test. When I build libevent by myself, /usr/local/lib/cmake/libevent/LibeventConfig.cmake is generated, which results in line 41 being judged to be true. COMMON_LIBS does not add libevent::pthreads, which will cause compilation errors.

When I use apt-get install libevent-dev to install libevent, apt-get does not install LibeventConfig.cmake for me. It will use coturn/cmake/LibeventConfig.cmake.

The key point is that lines 44-50 will be executed and used. This will add all components of libevent, core extra openssl pthreads, so it can work normally.

# src/apps/common/CMakeLists.txt

find_package(Libevent CONFIG)
if(Libevent_FOUND)
    list(APPEND COMMON_LIBS libevent::core libevent::extra libevent::openssl)
else()
    find_package(Libevent MODULE)
    if(Libevent_FOUND)
        list(APPEND COMMON_LIBS ${Libevent_LIBRARIES})
        list(APPEND COMMON_INCLUDE_DIR ${Libevent_INCLUDE_DIRS})
    else()
        message(FATAL_ERROR "Must set Libevent")
    endif()
endif()

from coturn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.