-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
I am using CLion with CMake project and PJSIP libraries on Linux Debian. I downloaded FindPJSIP.cmake from this repo, placed it in my project directory, and then modified CMakeLists.txt as written in readme.md. CMake tells me that all libs are found, but when building this project I encounter a lot of "undefined references". Here is CMakeLists.txt:
cmake_minimum_required(VERSION 3.17)
project(Transmitter)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMakeHelpers")
find_package(PJSIP REQUIRED)
if (NOT PJSIP_FOUND)
message(SEND_ERROR "PJSIP not found")
return()
else()
include_directories(${PJSIP_INCLUDE_DIRS})
link_directories(${PJSIP_LIBRARY_DIRS})
endif()
add_executable(${PROJECT_NAME} main.cpp)
target_include_directories(${PROJECT_NAME} ${PJSIP_INCLUDE_DIRS})
target_link_libraries(${PROJECT_NAME} ${PJSIP_LIBRARIES})
And there are errors (lots and lots of them, about hundred or even more).

Maybe I am doing it wrong? Because I made this project previously in QT Creator using qmake and it worked fine.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels