Commit c068cfc7 authored by Ghislain MARY's avatar Ghislain MARY

Link with appropriate frameworks when building with CMake for Mac OS X or iOS.

parent 41ffa88e
......@@ -123,6 +123,9 @@ if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
add_definitions(-Wno-error=pragmas)
endif()
if("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
set(LINK_FLAGS "${LINK_FLAGS} -framework CoreFoundation -framework CFNetwork")
endif("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
add_subdirectory(include)
add_subdirectory(src)
......
......@@ -145,6 +145,7 @@ else(${ENABLE_STATIC})
endif()
endif(MSVC)
endif(${ENABLE_STATIC})
set_target_properties(bellesip PROPERTIES LINK_FLAGS ${LINK_FLAGS})
target_include_directories(bellesip PUBLIC ${INCLUDES})
target_link_libraries(bellesip ${LIBS})
......
......@@ -40,6 +40,7 @@ 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})
target_link_libraries(belle_sip_tester ${CUNIT_LIBRARIES} bellesip)
add_test(NAME belle_sip_tester COMMAND belle_sip_tester --verbose)
......@@ -48,10 +49,13 @@ 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})
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})
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