diff --git a/cmake/macros/GenerateInstallers.cmake b/cmake/macros/GenerateInstallers.cmake index 2d2ede69f0..0def701739 100644 --- a/cmake/macros/GenerateInstallers.cmake +++ b/cmake/macros/GenerateInstallers.cmake @@ -78,32 +78,6 @@ 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(": $") - 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}) diff --git a/cmake/macros/InstallBesideConsole.cmake b/cmake/macros/InstallBesideConsole.cmake index 318a7a3ffe..0eb6025f38 100644 --- a/cmake/macros/InstallBesideConsole.cmake +++ b/cmake/macros/InstallBesideConsole.cmake @@ -16,6 +16,7 @@ macro(install_beside_console) install( TARGETS ${TARGET_NAME} RUNTIME DESTINATION ${COMPONENT_INSTALL_DIR} + LIBRARY DESTINATION ${CONSOLE_PLUGIN_INSTALL_DIR} COMPONENT ${SERVER_COMPONENT} ) else () diff --git a/cmake/macros/SetPackagingParameters.cmake b/cmake/macros/SetPackagingParameters.cmake index d8532aa081..76f6812921 100644 --- a/cmake/macros/SetPackagingParameters.cmake +++ b/cmake/macros/SetPackagingParameters.cmake @@ -69,6 +69,8 @@ macro(SET_PACKAGING_PARAMETERS) set(CONSOLE_APP_CONTENTS "${CONSOLE_INSTALL_APP_PATH}/Contents") set(COMPONENT_APP_PATH "${CONSOLE_APP_CONTENTS}/MacOS/Components.app") set(COMPONENT_INSTALL_DIR "${COMPONENT_APP_PATH}/Contents/MacOS") + set(CONSOLE_PLUGIN_INSTALL_DIR "${COMPONENT_APP_PATH}/Contents/PlugIns") + set(INTERFACE_INSTALL_APP_PATH "${CONSOLE_INSTALL_DIR}/${INTERFACE_BUNDLE_NAME}.app") set(INTERFACE_ICON_FILENAME "${INTERFACE_ICON_PREFIX}.icns") diff --git a/cmake/macros/SetupHifiClientServerPlugin.cmake b/cmake/macros/SetupHifiClientServerPlugin.cmake index a065ee99b6..8ba38a09c3 100644 --- a/cmake/macros/SetupHifiClientServerPlugin.cmake +++ b/cmake/macros/SetupHifiClientServerPlugin.cmake @@ -13,7 +13,6 @@ 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 "plugins") else() set(CLIENT_PLUGIN_PATH "plugins") diff --git a/plugins/hifiCodec/CMakeLists.txt b/plugins/hifiCodec/CMakeLists.txt index 3939529c3e..0af7e42ea1 100644 --- a/plugins/hifiCodec/CMakeLists.txt +++ b/plugins/hifiCodec/CMakeLists.txt @@ -15,5 +15,6 @@ if (WIN32 OR APPLE) add_dependency_external_projects(HiFiAudioCodec) target_include_directories(${TARGET_NAME} PRIVATE ${HIFIAUDIOCODEC_INCLUDE_DIRS}) target_link_libraries(${TARGET_NAME} ${HIFIAUDIOCODEC_LIBRARIES}) + install_beside_console() endif() diff --git a/plugins/pcmCodec/CMakeLists.txt b/plugins/pcmCodec/CMakeLists.txt index 5dca1f0e14..900a642a88 100644 --- a/plugins/pcmCodec/CMakeLists.txt +++ b/plugins/pcmCodec/CMakeLists.txt @@ -9,3 +9,5 @@ set(TARGET_NAME pcmCodec) setup_hifi_client_server_plugin() link_hifi_libraries(shared plugins) +install_beside_console() + diff --git a/server-console/CMakeLists.txt b/server-console/CMakeLists.txt index 7b9c17ace4..1c6e40c582 100644 --- a/server-console/CMakeLists.txt +++ b/server-console/CMakeLists.txt @@ -72,29 +72,3 @@ 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(": $") - 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 ()