generate a componentized server/client installer

This commit is contained in:
Stephen Birarda 2016-01-05 13:18:01 -08:00
parent 550b47f58b
commit 92064fe507
3 changed files with 14 additions and 8 deletions

View file

@ -212,7 +212,8 @@ endif()
set_packaging_parameters()
# setup component categories for installer
set(APP_COMPONENT Runtime)
set(CLIENT_COMPONENT client)
set(SERVER_COMPONENT server)
# add subdirectories for all targets
if (NOT ANDROID)

View file

@ -12,21 +12,26 @@
macro(GENERATE_INSTALLERS)
include(CPackComponent)
set(CPACK_PACKAGE_NAME "High Fidelity")
set(CPACK_PACKAGE_VENDOR "High Fidelity, Inc.")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "High Fidelity")
if (APPLE)
install(TARGETS ${CLIENT_TARGET} BUNDLE DESTINATION bin COMPONENT ${APP_COMPONENT})
else ()
install(TARGETS ${CLIENT_TARGET} RUNTIME DESTINATION bin COMPONENT ${APP_COMPONENT})
endif ()
cpack_add_component(${APP_COMPONENT}
DISPLAY_NAME "Applications"
Description "The High Fidelity Applications"
GROUP "Runtime"
cpack_add_component(${CLIENT_COMPONENT}
DISPLAY_NAME "High Fidelity Client"
)
cpack_add_component_group(Runtime)
cpack_add_component(${SERVER_COMPONENT}
DISPLAY_NAME "High Fidelity Server"
)
include(CPack)
# if (DEPLOY_PACKAGE AND WIN32)
# file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/package-bundle")
# find_program(MAKENSIS_COMMAND makensis PATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\NSIS])

View file

@ -204,7 +204,7 @@ if (APPLE)
target_link_libraries(${TARGET_NAME} ${OpenGL} ${AppKit})
# setup install of OS X interface bundle
install(TARGETS ${TARGET_NAME} BUNDLE DESTINATION bin COMPONENT ${APP_COMPONENT})
install(TARGETS ${TARGET_NAME} BUNDLE DESTINATION bin COMPONENT ${CLIENT_COMPONENT})
else (APPLE)
# copy the resources files beside the executable
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
@ -217,7 +217,7 @@ else (APPLE)
)
# setup install of interface target
install(TARGETS ${TARGET_NAME} RUNTIME DESTINATION bin COMPONENT ${APP_COMPONENT})
install(TARGETS ${TARGET_NAME} RUNTIME DESTINATION bin COMPONENT ${CLIENT_COMPONENT})
# link target to external libraries
if (WIN32)