Commit 9836c7ba authored by Ghislain MARY's avatar Ghislain MARY

Handle code signing on Mac OS X.

parent f5fc2669
...@@ -59,7 +59,7 @@ if(ENABLE_PACKAGING) ...@@ -59,7 +59,7 @@ if(ENABLE_PACKAGING)
SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/linphone_package" SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/linphone_package"
DOWNLOAD_COMMAND "" DOWNLOAD_COMMAND ""
CMAKE_GENERATOR ${CMAKE_GENERATOR} CMAKE_GENERATOR ${CMAKE_GENERATOR}
CMAKE_ARGS ${LINPHONE_BUILDER_EP_ARGS} -DCMAKE_INSTALL_PREFIX=${LINPHONE_BUILDER_WORK_DIR}/PACKAGE -DTOOLS_DIR=${CMAKE_BINARY_DIR}/programs -DLINPHONE_OUTPUT_DIR=${CMAKE_INSTALL_PREFIX} -DLINPHONE_DESKTOP_DIR=${CMAKE_CURRENT_LIST_DIR}/../linphone-desktop -DLINPHONE_SOURCE_DIR=${EP_linphone_SOURCE_DIR} ${ENABLE_VARIABLES} -DOPENH264_VERSION=${OPENH264_VERSION} CMAKE_ARGS ${LINPHONE_BUILDER_EP_ARGS} -DCMAKE_INSTALL_PREFIX=${LINPHONE_BUILDER_WORK_DIR}/PACKAGE -DTOOLS_DIR=${CMAKE_BINARY_DIR}/programs -DLINPHONE_OUTPUT_DIR=${CMAKE_INSTALL_PREFIX} -DLINPHONE_DESKTOP_DIR=${CMAKE_CURRENT_LIST_DIR}/../linphone-desktop -DLINPHONE_SOURCE_DIR=${EP_linphone_SOURCE_DIR} ${ENABLE_VARIABLES} -DOPENH264_VERSION=${OPENH264_VERSION} -DLINPHONE_BUILDER_SIGNING_IDENTITY=${LINPHONE_BUILDER_SIGNING_IDENTITY}
) )
endif() endif()
endif() endif()
...@@ -225,14 +225,30 @@ elseif(APPLE) ...@@ -225,14 +225,30 @@ elseif(APPLE)
COMMAND "${DEPLOYQT_PROGRAM}" "${CMAKE_CURRENT_BINARY_DIR}/Linphone.app" "-qmldir=${LINPHONE_QML_DIR}" "-verbose=2" COMMAND "${DEPLOYQT_PROGRAM}" "${CMAKE_CURRENT_BINARY_DIR}/Linphone.app" "-qmldir=${LINPHONE_QML_DIR}" "-verbose=2"
) )
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/Linphone.app" DESTINATION "." USE_SOURCE_PERMISSIONS)
if(EXISTS "${LINPHONE_OUTPUT_DIR}/lib/mediastreamer") if(EXISTS "${LINPHONE_OUTPUT_DIR}/lib/mediastreamer")
install(DIRECTORY "${LINPHONE_OUTPUT_DIR}/lib/mediastreamer" DESTINATION "Linphone.app/Contents/Resources/lib" USE_SOURCE_PERMISSIONS) file(COPY "${LINPHONE_OUTPUT_DIR}/lib/mediastreamer" DESTINATION "Linphone.app/Contents/Resources/lib" USE_SOURCE_PERMISSIONS)
endif()
file(COPY "${LINPHONE_OUTPUT_DIR}/share/images" DESTINATION "Linphone.app/Contents/Resources/share" USE_SOURCE_PERMISSIONS)
file(COPY "${LINPHONE_OUTPUT_DIR}/share/sounds" DESTINATION "Linphone.app/Contents/Resources/share" USE_SOURCE_PERMISSIONS)
file(COPY "${LINPHONE_OUTPUT_DIR}/share/Linphone/rootca.pem" DESTINATION "Linphone.app/Contents/Resources/share/linphone")
file(COPY "${LINPHONE_OUTPUT_DIR}/share/Linphone/linphonerc-factory" DESTINATION "Linphone.app/Contents/Resources/share/linphone")
if(LINPHONE_BUILDER_SIGNING_IDENTITY)
file(GLOB FRAMEWORKS_NAMES "${CMAKE_CURRENT_BINARY_DIR}/Linphone.app/Contents/Frameworks/*")
foreach(_framework ${FRAMEWORKS_NAMES})
execute_process(COMMAND "codesign" "--verbose" "-s" "${LINPHONE_BUILDER_SIGNING_IDENTITY}" "${_framework}")
endforeach()
file(GLOB PLUGINS_NAMES "${CMAKE_CURRENT_BINARY_DIR}/Linphone.app/Contents/PlugIns/*")
foreach(_plugin ${PLUGINS_NAMES})
file(GLOB PLUGINS_FILES "${_plugin}/*")
foreach(_pluginfile ${PLUGINS_FILES})
execute_process(COMMAND "codesign" "--verbose" "-s" "${LINPHONE_BUILDER_SIGNING_IDENTITY}" "${_pluginfile}")
endforeach()
endforeach()
execute_process(COMMAND "codesign" "--verbose" "-s" "${LINPHONE_BUILDER_SIGNING_IDENTITY}" "${CMAKE_CURRENT_BINARY_DIR}/Linphone.app")
endif() endif()
install(DIRECTORY "${LINPHONE_OUTPUT_DIR}/share/images" DESTINATION "Linphone.app/Contents/Resources/share" USE_SOURCE_PERMISSIONS)
install(DIRECTORY "${LINPHONE_OUTPUT_DIR}/share/sounds" DESTINATION "Linphone.app/Contents/Resources/share" USE_SOURCE_PERMISSIONS) install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/Linphone.app" DESTINATION "." USE_SOURCE_PERMISSIONS)
install(FILES "${LINPHONE_OUTPUT_DIR}/share/Linphone/rootca.pem" DESTINATION "Linphone.app/Contents/Resources/share/linphone")
install(FILES "${LINPHONE_OUTPUT_DIR}/share/Linphone/linphonerc-factory" DESTINATION "Linphone.app/Contents/Resources/share/linphone")
configure_file("MacPackaging.cmake.in" "MacPackaging.cmake" @ONLY) configure_file("MacPackaging.cmake.in" "MacPackaging.cmake" @ONLY)
install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/MacPackaging.cmake") install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/MacPackaging.cmake")
......
...@@ -53,7 +53,7 @@ if(NOT WIN32) ...@@ -53,7 +53,7 @@ if(NOT WIN32)
-Wuninitialized \ -Wuninitialized \
-Wunused \ -Wunused \
") ")
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang") if(NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CUSTOM_FLAGS "${CUSTOM_FLAGS} -Wlogical-op") set(CUSTOM_FLAGS "${CUSTOM_FLAGS} -Wlogical-op")
endif() endif()
if(SUGGEST_OVERRIDE) if(SUGGEST_OVERRIDE)
......
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