Commit c506ffee authored by jcfr's avatar jcfr
Browse files

ENH: Switch to version 0.1.2 of CTKAppLauncher

The launcher is now configured using relatively to a Target instead of the
location of a generated executable. TARGET parameter should be specified
instead of APPLICATION_PATH

Also move the call to the macro at in the CMakeLists where the associated
target is defined.

Related changes:
 - Launcher properly configured on windows by using custom_target
and ensuring the intermediate build directory is properly passed
 - Remove suffix ADDITIONAL_ from macro signature
 - Argument given on the command line are now properly passed to the target application

git-svn-id: http://svn.slicer.org/Slicer4/trunk@15463 3bd1e089-480b-0410-8dfb-8563597acbee
parent 6ba0da27
......@@ -466,6 +466,43 @@ INSTALL(TARGETS SlicerQT${SlicerQT_EXE_SUFFIX}
DESTINATION ${Slicer_INSTALL_BIN_DIR}
COMPONENT Runtime)
# --------------------------------------------------------------------------
# Configure Slicer Launcher
#
IF(Slicer_USE_CTKAPPLAUNCHER)
INCLUDE(${CTKAPPLAUNCHER_DIR}/CMake/ctkAppLauncher.cmake)
INCLUDE(${Slicer_CMAKE_DIR}/SlicerCTKAppLauncherSettings.cmake)
ctkAppLauncherConfigure(
TARGET SlicerQT${SlicerQT_EXE_SUFFIX}
APPLICATION_INSTALL_SUBDIR ${Slicer_INSTALL_BIN_DIR}
APPLICATION_NAME Slicer
SPLASH_IMAGE_PATH ${Slicer_SOURCE_DIR}/Applications/SlicerQT/Resources/Images/SlicerSplashScreen.png
SPLASH_IMAGE_INSTALL_SUBDIR ${Slicer_INSTALL_BIN_DIR}
SPLASHSCREEN_HIDE_DELAY_MS 3000
HELP_SHORT_ARG "-h"
HELP_LONG_ARG "--help"
NOSPLASH_LONG_ARG "--no-splash"
DESTINATION_DIR ${Slicer_BINARY_DIR}
LIBRARY_PATHS_BUILD "${SLICER_LIBRARY_PATHS_BUILD}"
PATHS_BUILD "${SLICER_PATHS_BUILD}"
ENVVARS_BUILD "${SLICER_ENVVARS_BUILD}"
LIBRARY_PATHS_INSTALLED "${SLICER_LIBRARY_PATHS_INSTALLED}"
PATHS_INSTALLED "${SLICER_PATHS_INSTALLED}"
ENVVARS_INSTALLED "${SLICER_ENVVARS_INSTALLED}"
)
INSTALL(PROGRAMS "${Slicer_BINARY_DIR}/Slicer${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION ".")
INSTALL(
FILES "${Slicer_SOURCE_DIR}/Applications/SlicerQT/Resources/Images/SlicerSplashScreen.png"
DESTINATION ${Slicer_INSTALL_BIN_DIR}
)
INSTALL(
FILES "${Slicer_BINARY_DIR}/SlicerLauncherSettingsToInstall.ini"
DESTINATION ${Slicer_INSTALL_BIN_DIR}
RENAME SlicerLauncherSettings.ini
)
ENDIF()
# Install headers
#FILE(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
#INSTALL(FILES
......
......@@ -872,40 +872,6 @@ IF(Slicer_USE_QT)
ENDIF()
ENDFOREACH()
ENDIF()
# ctkAppLauncher for slicer
IF(Slicer_USE_CTKAPPLAUNCHER)
INCLUDE(${CTKAPPLAUNCHER_DIR}/CMake/ctkAppLauncher.cmake)
INCLUDE(${Slicer_CMAKE_DIR}/SlicerCTKAppLauncherSettings.cmake)
ctkAppLauncherConfigure(
APPLICATION_PATH ${Slicer_BINARY_DIR}/bin/SlicerQT-real${CMAKE_EXECUTABLE_SUFFIX}
APPLICATION_INSTALL_SUBDIR ${Slicer_INSTALL_BIN_DIR}
APPLICATION_NAME Slicer
SPLASH_IMAGE_PATH ${Slicer_SOURCE_DIR}/Applications/SlicerQT/Resources/Images/SlicerSplashScreen.png
SPLASH_IMAGE_INSTALL_SUBDIR ${Slicer_INSTALL_BIN_DIR}
SPLASHSCREEN_HIDE_DELAY_MS 3000
ADDITIONAL_HELP_SHORT_ARG "-h"
ADDITIONAL_HELP_LONG_ARG "--help"
ADDITIONAL_NOSPLASH_LONG_ARG "--no-splash"
DESTINATION_DIR ${Slicer_BINARY_DIR}
LIBRARY_PATHS_BUILD "${SLICER_LIBRARY_PATHS_BUILD}"
PATHS_BUILD "${SLICER_PATHS_BUILD}"
ENVVARS_BUILD "${SLICER_ENVVARS_BUILD}"
LIBRARY_PATHS_INSTALLED "${SLICER_LIBRARY_PATHS_INSTALLED}"
PATHS_INSTALLED "${SLICER_PATHS_INSTALLED}"
ENVVARS_INSTALLED "${SLICER_ENVVARS_INSTALLED}"
)
INSTALL(PROGRAMS "${Slicer_BINARY_DIR}/Slicer${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION ".")
INSTALL(
FILES "${Slicer_SOURCE_DIR}/Applications/SlicerQT/Resources/Images/SlicerSplashScreen.png"
DESTINATION ${Slicer_INSTALL_BIN_DIR}
)
INSTALL(
FILES "${Slicer_BINARY_DIR}/SlicerLauncherSettingsToInstall.ini"
DESTINATION ${Slicer_INSTALL_BIN_DIR}
RENAME SlicerLauncherSettings.ini
)
ENDIF()
ENDIF(Slicer_USE_QT)
......
......@@ -21,7 +21,7 @@ IF(Slicer_USE_CTKAPPLAUNCHER)
MESSAGE(FATAL_ERROR "Failed to download pre-built launcher - Unsupported platform: ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
ENDIF()
SET(launcher_version "0.1.1")
SET(launcher_version "0.1.2")
ExternalProject_Add(${proj}
URL http://cloud.github.com/downloads/commontk/AppLauncher/CTKAppLauncher-${launcher_version}-${launcher_suffix}.tar.gz
SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment