Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
72 lines (56 sloc) 2.16 KB
if(Slicer_USE_CTKAPPLAUNCHER)
set(proj CTKAPPLAUNCHER)
# Sanity checks
if(DEFINED CTKAPPLAUNCHER_DIR AND NOT EXISTS ${CTKAPPLAUNCHER_DIR})
message(FATAL_ERROR "CTKAPPLAUNCHER_DIR variable is defined but corresponds to nonexistent directory")
endif()
# Set dependency list
set(${proj}_DEPENDENCIES "")
if(WIN32)
set(${proj}_DEPENDENCIES CTKResEdit)
endif()
# Include dependent projects if any
ExternalProject_Include_Dependencies(${proj} PROJECT_VAR proj DEPENDS_VAR ${proj}_DEPENDENCIES)
if(Slicer_USE_SYSTEM_${proj})
message(FATAL_ERROR "Enabling Slicer_USE_SYSTEM_${proj} is not supported !")
endif()
if(NOT DEFINED CTKAppLauncher_DIR)
SlicerMacroGetOperatingSystemArchitectureBitness(VAR_PREFIX CTKAPPLAUNCHER)
set(launcher_version "0.1.27")
# On windows, use i386 launcher unconditionally
if("${CTKAPPLAUNCHER_OS}" STREQUAL "win")
set(CTKAPPLAUNCHER_ARCHITECTURE "i386")
set(md5 "3f05dcc605ac2144edc69b28c27bb8d1")
elseif("${CTKAPPLAUNCHER_OS}" STREQUAL "linux")
set(md5 "a9a8aab9c0e91cdd0b5265eb799daf74")
elseif("${CTKAPPLAUNCHER_OS}" STREQUAL "macosx")
set(md5 "a9de73a1609c988167884efa23819287")
endif()
set(EP_BINARY_DIR ${CMAKE_BINARY_DIR}/${proj})
ExternalProject_Add(${proj}
${${proj}_EP_ARGS}
URL https://github.com/commontk/AppLauncher/releases/download/v${launcher_version}/CTKAppLauncher-${launcher_version}-${CTKAPPLAUNCHER_OS}-${CTKAPPLAUNCHER_ARCHITECTURE}.tar.gz
URL_MD5 ${md5}
DOWNLOAD_DIR ${CMAKE_BINARY_DIR}
SOURCE_DIR ${EP_BINARY_DIR}
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
DEPENDS
${${proj}_DEPENDENCIES}
)
ExternalProject_GenerateProjectDescription_Step(${proj}
VERSION ${launcher_version}
LICENSE_FILES "https://raw.githubusercontent.com/commontk/AppLauncher/v${launcher_version}/LICENSE_Apache_20"
)
set(CTKAppLauncher_DIR ${EP_BINARY_DIR})
else()
ExternalProject_Add_Empty(${proj} DEPENDS ${${proj}_DEPENDENCIES})
endif()
mark_as_superbuild(
VARS
CTKAppLauncher_DIR:PATH
LABELS "FIND_PACKAGE"
)
endif()
You can’t perform that action at this time.