Commit c50eb11d authored by Ghislain MARY's avatar Ghislain MARY

Fix compilation with CMake on Debian 7.

parent 7244aa27
......@@ -120,6 +120,12 @@ if(HAVE_POLARSSL)
get_filename_component(polarssl_library_path "${POLARSSL_LIBRARIES}" PATH)
set(LIBS_PRIVATE "${LIBS_PRIVATE} -L${polarssl_library_path} -lpolarssl")
endif(HAVE_POLARSSL)
if(HAVE_LIBDL)
set(LIBS_PRIVATE "${LIBS_PRIVATE} -ldl")
endif()
if(HAVE_LIBRT)
set(LIBS_PRIVATE "${LIBS_PRIVATE} -lrt")
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/belle-sip.pc.in ${CMAKE_CURRENT_BINARY_DIR}/belle-sip.pc)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/belle-sip.pc DESTINATION lib/pkgconfig)
......
......@@ -31,6 +31,9 @@ endif(${Threads_FOUND})
if(${HAVE_LIBDL})
list(APPEND LIBS dl)
endif(${HAVE_LIBDL})
if(${HAVE_LIBRT})
list(APPEND LIBS rt)
endif()
if(${HAVE_RESINIT})
list(APPEND LIBS resolv)
endif(${HAVE_RESINIT})
......
......@@ -41,7 +41,11 @@ set(TESTER_SOURCES
add_executable(belle_sip_tester ${TESTER_SOURCES})
set_target_properties(belle_sip_tester PROPERTIES LINK_FLAGS "${LINK_FLAGS}")
target_include_directories(belle_sip_tester PUBLIC ${CUNIT_INCLUDE_DIR})
if("${CMAKE_VERSION}" VERSION_GREATER "2.8.10")
target_include_directories(belle_sip_tester PUBLIC ${CUNIT_INCLUDE_DIR})
else("${CMAKE_VERSION}" VERSION_GREATER "2.8.10")
include_directories(${CUNIT_INCLUDE_DIR})
endif("${CMAKE_VERSION}" VERSION_GREATER "2.8.10")
target_link_libraries(belle_sip_tester ${CUNIT_LIBRARIES} bellesip)
add_test(NAME belle_sip_tester COMMAND belle_sip_tester --verbose)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment