install fixed up DS and AC beside console

This commit is contained in:
Stephen Birarda 2016-01-07 18:03:14 -08:00
parent 5ccf59dae9
commit 1faa78fe72
5 changed files with 54 additions and 43 deletions

View file

@ -9,7 +9,5 @@ link_hifi_libraries(
controllers physics
)
install_beside_console()
package_libraries_for_deployment()
consolidate_installer_components()
install_beside_console()

View file

@ -10,43 +10,54 @@
#
macro(install_beside_console)
# install this component beside the installed server-console executable
if (APPLE)
set(CONSOLE_APP_CONTENTS "${CONSOLE_INSTALL_APP_PATH}/Contents")
set(COMPONENT_DESTINATION "${CONSOLE_APP_CONTENTS}/MacOS/Components.app/Contents/MacOS")
else ()
set(COMPONENT_DESTINATION ${CONSOLE_INSTALL_DIR})
endif ()
install(
TARGETS ${TARGET_NAME}
RUNTIME DESTINATION ${COMPONENT_DESTINATION}
COMPONENT ${SERVER_COMPONENT}
)
if (TARGET_NAME STREQUAL domain-server)
if (WIN32 OR APPLE)
# install this component beside the installed server-console executable
if (APPLE)
set(RESOURCES_DESTINATION ${COMPONENT_DESTINATION})
set(CONSOLE_APP_CONTENTS "${CONSOLE_INSTALL_APP_PATH}/Contents")
set(COMPONENT_DESTINATION "${CONSOLE_APP_CONTENTS}/MacOS/Components.app/Contents/MacOS")
else ()
set(RESOURCES_DESTINATION ${CONSOLE_INSTALL_DIR})
set(COMPONENT_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}
USE_SOURCE_PERMISSIONS
COMPONENT ${SERVER_COMPONENT}
)
endif ()
if (APPLE)
install(
TARGETS ${TARGET_NAME}
RUNTIME DESTINATION ${COMPONENT_DESTINATION}
COMPONENT ${SERVER_COMPONENT}
)
else ()
# setup install of executable and things copied by fixup/windeployqt
install(
FILES $<TARGET_FILE_DIR:${TARGET_NAME}>
DESTINATION ${COMPONENT_DESTINATION}
COMPONENT ${SERVER_COMPONENT}
)
endif ()
if (APPLE)
# during the install phase, call fixup to drop the shared libraries for these components in the right place
set(EXECUTABLE_NEEDING_FIXUP "\${CMAKE_INSTALL_PREFIX}/${COMPONENT_DESTINATION}/${TARGET_NAME}")
install(CODE "
include(BundleUtilities)
fixup_bundle(\"${EXECUTABLE_NEEDING_FIXUP}\" \"\" \"${FIXUP_LIBS}\")
" COMPONENT ${SERVER_COMPONENT})
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}
USE_SOURCE_PERMISSIONS
COMPONENT ${SERVER_COMPONENT}
)
endif ()
if (APPLE)
# during the install phase, call fixup to drop the shared libraries for these components in the right place
set(EXECUTABLE_NEEDING_FIXUP "\${CMAKE_INSTALL_PREFIX}/${COMPONENT_DESTINATION}/${TARGET_NAME}")
install(CODE "
include(BundleUtilities)
fixup_bundle(\"${EXECUTABLE_NEEDING_FIXUP}\" \"\" \"${FIXUP_LIBS}\")
" COMPONENT ${SERVER_COMPONENT})
endif ()
endif ()
endmacro()

View file

@ -22,14 +22,14 @@ elseif (UNIX)
set(PACKAGED_CONSOLE_FOLDER "server-console-linux-x64")
endif ()
# install the packaged Server Console
# install the packaged Server Console in our install directory
if (APPLE)
install(
PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/${PACKAGED_CONSOLE_FOLDER}"
DESTINATION ${CONSOLE_INSTALL_DIR}
COMPONENT ${SERVER_COMPONENT}
)
else ()
elseif (WIN32)
install(
DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${PACKAGED_CONSOLE_FOLDER}/"
DESTINATION ${CONSOLE_INSTALL_DIR}

View file

@ -36,7 +36,5 @@ if (UNIX)
target_link_libraries(${TARGET_NAME} ${CMAKE_DL_LIBS})
endif (UNIX)
install_beside_console()
package_libraries_for_deployment()
consolidate_installer_components()
install_beside_console()

View file

@ -225,12 +225,16 @@ else (APPLE)
$<TARGET_FILE_DIR:${TARGET_NAME}>/scripts
)
# setup install of interface target
install(TARGETS ${TARGET_NAME} RUNTIME DESTINATION . COMPONENT ${CLIENT_COMPONENT})
# link target to external libraries
if (WIN32)
target_link_libraries(${TARGET_NAME} wsock32.lib Winmm.lib)
# setup install of executable and things copied by fixup/windeployqt
install(
FILES $<TARGET_FILE_DIR:${TARGET_NAME}>
DESTINATION ${INTERFACE_INSTALL_DIR}
COMPONENT ${CLIENT_COMPONENT}
)
endif()
endif (APPLE)