From 5743c8046c837211650c1dfe15ec4a0801a3d1a3 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Fri, 22 Jan 2016 11:15:49 -0800 Subject: [PATCH] install the server-console in a subdir on win32 --- cmake/macros/InstallBesideConsole.cmake | 22 ++++------------------ cmake/macros/SetPackagingParameters.cmake | 12 +++++++++++- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/cmake/macros/InstallBesideConsole.cmake b/cmake/macros/InstallBesideConsole.cmake index c17e8d2564..e257defcb7 100644 --- a/cmake/macros/InstallBesideConsole.cmake +++ b/cmake/macros/InstallBesideConsole.cmake @@ -12,25 +12,17 @@ macro(install_beside_console) if (WIN32 OR APPLE) # install this component beside the installed server-console executable - if (APPLE) - set(CONSOLE_APP_CONTENTS "${CONSOLE_INSTALL_APP_PATH}/Contents") - set(COMPONENT_APP_PATH "${CONSOLE_APP_CONTENTS}/MacOS/Components.app") - set(COMPONENT_DESTINATION "${COMPONENT_APP_PATH}/Contents/MacOS") - else () - set(COMPONENT_DESTINATION ${CONSOLE_INSTALL_DIR}) - endif () - if (APPLE) install( TARGETS ${TARGET_NAME} - RUNTIME DESTINATION ${COMPONENT_DESTINATION} + RUNTIME DESTINATION ${COMPONENT_INSTALL_DIR} COMPONENT ${SERVER_COMPONENT} ) else () # setup install of executable and things copied by fixup/windeployqt install( FILES "$/" - DESTINATION ${COMPONENT_DESTINATION} + DESTINATION ${COMPONENT_INSTALL_DIR} COMPONENT ${SERVER_COMPONENT} ) @@ -40,16 +32,10 @@ macro(install_beside_console) endif () if (TARGET_NAME STREQUAL domain-server) - if (APPLE) - set(RESOURCES_DESTINATION ${COMPONENT_DESTINATION}) - else () - set(RESOURCES_DESTINATION ${CONSOLE_INSTALL_DIR}) - endif () - # install the resources folder for the domain-server where its executable will be install( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/resources - DESTINATION ${RESOURCES_DESTINATION} + DESTINATION ${COMPONENT_INSTALL_DIR} USE_SOURCE_PERMISSIONS COMPONENT ${SERVER_COMPONENT} ) @@ -81,7 +67,7 @@ macro(install_beside_console) endif () # set variables used by manual ssleay library copy - set(TARGET_INSTALL_DIR ${COMPONENT_DESTINATION}) + set(TARGET_INSTALL_DIR ${COMPONENT_INSTALL_DIR}) set(TARGET_INSTALL_COMPONENT ${SERVER_COMPONENT}) manually_install_ssl_eay() diff --git a/cmake/macros/SetPackagingParameters.cmake b/cmake/macros/SetPackagingParameters.cmake index 5bfbb0794d..9aba143c03 100644 --- a/cmake/macros/SetPackagingParameters.cmake +++ b/cmake/macros/SetPackagingParameters.cmake @@ -52,8 +52,18 @@ macro(SET_PACKAGING_PARAMETERS) set(CONSOLE_INSTALL_DIR ${DMG_SUBFOLDER_NAME}) set(INTERFACE_INSTALL_DIR ${DMG_SUBFOLDER_NAME}) + + 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") else () - set(CONSOLE_INSTALL_DIR ".") + if (WIN32) + set(CONSOLE_INSTALL_DIR "server-console") + else () + set(CONSOLE_INSTALL_DIR ".") + endif () + + set(COMPONENT_INSTALL_DIR ".") set(INTERFACE_INSTALL_DIR ".") endif ()