Tools: Application launcher/external project definition: Difference between revisions

From Commontk
Jump to navigationJump to search
m (Created page with 'Back to CTKAppLauncher page <pre> # # CTKAPPLAUNCHER # IF(Slicer_USE_CTKAPPLAUNCHER) # Sanity checks IF(DEFINED CTKAPPLAUNCHER_DIR AND NOT EX…')
 
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
[[Tools:_Application_launcher|Back to CTKAppLauncher page]]


<pre>
<pre>

Latest revision as of 21:00, 19 March 2012

Home < Tools: Application launcher < external project definition
#
# CTKAPPLAUNCHER
#
IF(Slicer_USE_CTKAPPLAUNCHER)
  # Sanity checks
  IF(DEFINED CTKAPPLAUNCHER_DIR AND NOT EXISTS ${CTKAPPLAUNCHER_DIR})
    MESSAGE(FATAL_ERROR "CTKAPPLAUNCHER_DIR variable is defined but corresponds to non-existing directory")
  ENDIF()
  
  set(proj CTKAPPLAUNCHER)
  
  IF(NOT DEFINED CTKAPPLAUNCHER_DIR)
    SET(launcher_suffix)
    IF (CMAKE_SYSTEM_NAME STREQUAL "Linux"
        #OR CMAKE_SYSTEM_NAME STREQUAL "Windows"
        #OR CMAKE_SYSTEM_NAME STREQUAL "Darwin"
        #OR CMAKE_SYSTEM_NAME STREQUAL "Solaris"
        )
      SET(launcher_suffix ${CMAKE_SYSTEM_NAME})
    ELSE()
      MESSAGE(FATAL_ERROR "Failed to download pre-built launcher - Unsupported platform: ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
    ENDIF()
    
    SET(launcher_version "0.1.0")
    ExternalProject_Add(${proj}
      #URL /home/jchris/Projects/CTK-AppLauncher-Release/CTKAppLauncher-${launcher_version}-${launcher_suffix}.tar.gz
      URL http://github.com/downloads/commontk/AppLauncher/CTKAppLauncher-${launcher_version}-${launcher_suffix}.tar.gz
      SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
      CONFIGURE_COMMAND ""
      BUILD_COMMAND ""
      INSTALL_COMMAND ""
      DEPENDS 
        ${CTKAPPLAUNCHER_DEPENDENCIES}
      )
    SET(CTKAPPLAUNCHER_DIR ${CMAKE_BINARY_DIR}/${proj})
  ENDIF()
  
ENDIF()