Commit f54885c1 authored by Ghislain MARY's avatar Ghislain MARY

Fix BELLESIP_LDFLAGS with CMake.

parent 40f52b3a
......@@ -151,8 +151,9 @@ if(NOT MSVC)
add_definitions(-Werror -Wno-error=pragmas)
endif()
endif()
set(LINK_FLAGS )
if(APPLE)
set(LINK_FLAGS "${LINK_FLAGS} -framework CoreFoundation -framework CFNetwork")
list(APPEND LINK_FLAGS "-framework CoreFoundation" "-framework CFNetwork")
endif()
if(WIN32)
add_definitions(
......
......@@ -157,7 +157,11 @@ else()
endif()
endif()
endif()
set_target_properties(bellesip PROPERTIES LINKER_LANGUAGE CXX LINK_FLAGS "${LINK_FLAGS}")
set_target_properties(bellesip PROPERTIES LINKER_LANGUAGE CXX)
string(REPLACE ";" " " LINK_FLAGS_STR "${LINK_FLAGS}")
if(NOT "${LINK_FLAGS_STR}" STREQUAL "")
set_target_properties(bellesip PROPERTIES LINK_FLAGS "${LINK_FLAGS_STR}")
endif()
target_include_directories(bellesip PUBLIC ${INCLUDES})
target_link_libraries(bellesip ${LIBS})
......
......@@ -39,8 +39,12 @@ set(TESTER_SOURCES
register_tester.h
)
string(REPLACE ";" " " LINK_FLAGS_STR "${LINK_FLAGS}")
add_executable(belle_sip_tester ${TESTER_SOURCES})
set_target_properties(belle_sip_tester PROPERTIES LINK_FLAGS "${LINK_FLAGS}")
if(NOT "${LINK_FLAGS_STR}" STREQUAL "")
set_target_properties(belle_sip_tester PROPERTIES LINK_FLAGS "${LINK_FLAGS_STR}")
endif()
if("${CMAKE_VERSION}" VERSION_GREATER "2.8.10")
target_include_directories(belle_sip_tester PUBLIC ${CUNIT_INCLUDE_DIR})
else()
......@@ -53,12 +57,16 @@ add_test(NAME belle_sip_tester COMMAND belle_sip_tester --verbose)
set(OBJECT_DESCRIBE_SOURCES describe.c)
add_executable(belle_sip_object_describe ${OBJECT_DESCRIBE_SOURCES})
set_target_properties(belle_sip_object_describe PROPERTIES LINK_FLAGS "${LINK_FLAGS}")
if(NOT "${LINK_FLAGS_STR}" STREQUAL "")
set_target_properties(belle_sip_object_describe PROPERTIES LINK_FLAGS "${LINK_FLAGS_STR}")
endif()
target_link_libraries(belle_sip_object_describe bellesip)
set(PARSE_SOURCES parse.c)
add_executable(belle_sip_parse ${PARSE_SOURCES})
set_target_properties(belle_sip_parse PROPERTIES LINK_FLAGS "${LINK_FLAGS}")
if(NOT "${LINK_FLAGS_STR}" STREQUAL "")
set_target_properties(belle_sip_parse PROPERTIES LINK_FLAGS "${LINK_FLAGS_STR}")
endif()
target_link_libraries(belle_sip_parse bellesip)
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