0

I know how the basic Makefile for a simple project using pjsip library looks like. But what does the equivalent CMake file look like?

B Faley
  • 17,120
  • 43
  • 133
  • 223

1 Answers1

4
project(myapp)
cmake_minimum_required(VERSION 2.8)
aux_source_directory(. SRC_LIST)

include (FindPkgConfig)
if (PKG_CONFIG_FOUND) # true if pkg-config works on the system
  pkg_check_modules(PJSIP REQUIRED libpjproject)
endif()

include_directories(${PJSIP_INCLUDE_DIRS})
link_directories(${PJSIP_LIBRARY_DIRS})

add_executable(${PROJECT_NAME} ${SRC_LIST})

target_link_libraries(${PROJECT_NAME} ${PJSIP_LIBRARIES})
B Faley
  • 17,120
  • 43
  • 133
  • 223