attempt to get mac sandbox plugins to work

This commit is contained in:
Brad Hefta-Gaub 2016-07-13 09:08:57 -07:00
parent 6d7c8d5759
commit b6ffabf500
3 changed files with 54 additions and 1 deletions

View file

@ -78,6 +78,32 @@ macro(GENERATE_INSTALLERS)
install(CODE "execute_process(COMMAND SetFile -a V \${CMAKE_INSTALL_PREFIX}/${ESCAPED_DMG_SUBFOLDER_NAME}/Icon\\r)")
endif ()
# this is a bit of a hack, but I couldn't find any other way to get plugins
# into the correct place under the console path. On windows this is handled
# exclusively in the plugins directories with the SetupHiFiClientServerPlugin
# macro
if (APPLE)
set(CONSOLE_PLUGINS_DIR "${CONSOLE_INSTALL_APP_PATH}/Contents/MacOS/Components.app/Contents/PlugIns")
set(SERVER_PLUGINS_DIR "${CMAKE_BINARY_DIR}/assignment-client/${CMAKE_BUILD_TYPE}/plugins")
message("TARGET_NAME: ${TARGET_NAME}")
message("CONFIGURATION: ${CONFIGURATION}")
message("<CONFIGURATION>: $<CONFIGURATION>")
message("CONSOLE_PLUGINS_DIR: ${CONSOLE_PLUGINS_DIR}")
message("SERVER_PLUGINS_DIR: ${SERVER_PLUGINS_DIR}")
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E make_directory
${CONSOLE_PLUGINS_DIR}
)
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy_directory
${SERVER_PLUGINS_DIR}
${CONSOLE_PLUGINS_DIR}
)
endif ()
# configure a cpack properties file for custom variables in template
set(CPACK_CONFIGURED_PROP_FILE "${CMAKE_CURRENT_BINARY_DIR}/CPackCustomProperties.cmake")
configure_file("${HF_CMAKE_DIR}/templates/CPackProperties.cmake.in" ${CPACK_CONFIGURED_PROP_FILE})

View file

@ -13,7 +13,8 @@ macro(SETUP_HIFI_CLIENT_SERVER_PLUGIN)
if (APPLE)
set(CLIENT_PLUGIN_PATH "${INTERFACE_BUNDLE_NAME}.app/Contents/PlugIns")
set(SERVER_PLUGIN_PATH "Components.app/Contents/PlugIns")
#set(SERVER_PLUGIN_PATH "Components.app/Contents/PlugIns")
set(SERVER_PLUGIN_PATH "plugins")
else()
set(CLIENT_PLUGIN_PATH "plugins")
set(SERVER_PLUGIN_PATH "plugins")

View file

@ -72,3 +72,29 @@ else ()
set_target_properties(${TARGET_NAME} PROPERTIES EXCLUDE_FROM_ALL TRUE EXCLUDE_FROM_DEFAULT_BUILD TRUE)
set_target_properties(${TARGET_NAME}-npm-install PROPERTIES EXCLUDE_FROM_ALL TRUE EXCLUDE_FROM_DEFAULT_BUILD TRUE)
endif ()
# this is a bit of a hack, but I couldn't find any other way to get plugins
# into the correct place under the console path. On windows this is handled
# exclusively in the plugins directories with the SetupHiFiClientServerPlugin
# macro
if (APPLE)
set(CONSOLE_PLUGINS_DIR "${CONSOLE_INSTALL_APP_PATH}/Contents/MacOS/Components.app/Contents/PlugIns")
set(SERVER_PLUGINS_DIR "${CMAKE_BINARY_DIR}/assignment-client/${CMAKE_BUILD_TYPE}/plugins")
message("TARGET_NAME: ${TARGET_NAME}")
message("CONFIGURATION: ${CONFIGURATION}")
message("<CONFIGURATION>: $<CONFIGURATION>")
message("CONSOLE_PLUGINS_DIR: ${CONSOLE_PLUGINS_DIR}")
message("SERVER_PLUGINS_DIR: ${SERVER_PLUGINS_DIR}")
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E make_directory
${CONSOLE_PLUGINS_DIR}
)
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy_directory
${SERVER_PLUGINS_DIR}
${CONSOLE_PLUGINS_DIR}
)
endif ()