Commit 1ccf9be9 authored by DanmeiChen's avatar DanmeiChen Committed by Nicolas Michon

fix build issues sur ios

parent f1725c01
......@@ -37,7 +37,6 @@ include("${CMAKE_CURRENT_LIST_DIR}/${BZRTP_TARGETNAME}Targets.cmake")
if(@ENABLE_SHARED@)
set(BZRTP_LIBRARIES ${BZRTP_TARGETNAME})
else()
set(BZRTP_TARGETNAME bzrtp-static)
if(TARGET ${BZRTP_TARGETNAME})
get_target_property(BZRTP_LIBRARIES ${BZRTP_TARGETNAME} LOCATION)
get_target_property(BZRTP_LINK_LIBRARIES ${BZRTP_TARGETNAME} INTERFACE_LINK_LIBRARIES)
......
......@@ -55,13 +55,13 @@ if(XML2_FOUND)
endif()
if(ENABLE_STATIC)
add_library(bzrtp-static STATIC ${SOURCE_FILES})
set_target_properties(bzrtp-static PROPERTIES OUTPUT_NAME bzrtp)
target_include_directories(bzrtp-static INTERFACE
add_library(bzrtp STATIC ${SOURCE_FILES})
set_target_properties(bzrtp PROPERTIES OUTPUT_NAME bzrtp)
target_include_directories(bzrtp INTERFACE
$<INSTALL_INTERFACE:include>
PRIVATE ${INCLUDE_DIRS})
target_link_libraries(bzrtp-static PUBLIC bctoolbox ${LIBS})
install(TARGETS bzrtp-static EXPORT ${EXPORT_TARGETS_NAME}Targets
target_link_libraries(bzrtp PUBLIC bctoolbox ${LIBS})
install(TARGETS bzrtp EXPORT ${EXPORT_TARGETS_NAME}Targets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
......
......@@ -42,7 +42,7 @@ set_target_properties(bzrtpTest PROPERTIES LINKER_LANGUAGE CXX)
target_link_libraries(bzrtpTest PRIVATE bctoolbox bctoolbox-tester)
if(ENABLE_STATIC)
target_link_libraries(bzrtpTest PRIVATE bzrtp-static)
target_link_libraries(bzrtpTest PRIVATE bzrtp)
else()
target_link_libraries(bzrtpTest PRIVATE bzrtp)
endif()
......
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