Commit 0479111c authored by Benjamin REIS's avatar Benjamin REIS

change static lib to framework in ios build

parent 1797049a
......@@ -81,6 +81,13 @@ endif()
if(ENABLE_SHARED)
add_library(bctoolbox SHARED ${BCTOOLBOX_SOURCE_FILES} ${BCTOOLBOX_HEADER_FILES})
target_link_libraries(bctoolbox PRIVATE ${CMAKE_THREAD_LIBS_INIT})
if(APPLE)
set_target_properties(bctoolbox PROPERTIES
FRAMEWORK TRUE
MACOSX_FRAMEWORK_IDENTIFIER com.belledonne-communications.bctoolbox
PUBLIC_HEADER "${BCTOOLBOX_HEADER_FILES}"
)
endif()
if(WIN32)
target_link_libraries(bctoolbox PRIVATE "Winmm" "Ws2_32")
target_compile_definitions(bctoolbox PRIVATE "-DBCTBX_EXPORTS")
......@@ -172,6 +179,13 @@ if(BCUNIT_FOUND)
if(ENABLE_SHARED)
target_include_directories(bctoolbox-tester PUBLIC ${BCUNIT_INCLUDE_DIRS})
target_link_libraries(bctoolbox-tester PRIVATE bctoolbox ${BCUNIT_LIBRARIES})
if(APPLE)
set_target_properties(bctoolbox-tester PROPERTIES
FRAMEWORK TRUE
MACOSX_FRAMEWORK_IDENTIFIER com.belledonne-communications.bctoolbox-tester
PUBLIC_HEADER "${BCTOOLBOX_HEADER_FILES}"
)
endif()
endif()
endif()
......@@ -195,6 +209,7 @@ if(ENABLE_SHARED)
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
FRAMEWORK DESTINATION Frameworks
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
COMPONENT core
)
......@@ -203,6 +218,7 @@ if(ENABLE_SHARED)
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
FRAMEWORK DESTINATION Frameworks
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
COMPONENT tester
)
......
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