Commit 41e54aae authored by finetjul's avatar finetjul
Browse files

ENH: Make the applications to build customizable

By passing Slicer_APPLICATIONS_DIR, the applications to build can be
changed.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21548 3bd1e089-480b-0410-8dfb-8563597acbee
parent 96fc27a6
......@@ -356,8 +356,12 @@ set(SLICER_REVISION_SPECIFIC_USER_SETTINGS_FILEBASENAME "")
#-----------------------------------------------------------------------------
# Main application
#-----------------------------------------------------------------------------
set(Slicer_MAIN_PROJECT SlicerApp CACHE INTERNAL "Main project name")
set(${Slicer_MAIN_PROJECT}_APPLICATION_NAME Slicer CACHE INTERNAL "Main application name")
if (NOT DEFINED Slicer_MAIN_PROJECT)
set(Slicer_MAIN_PROJECT SlicerApp CACHE INTERNAL "Main project name")
endif()
if (NOT DEFINED ${Slicer_MAIN_PROJECT}_APPLICATION_NAME)
set(${Slicer_MAIN_PROJECT}_APPLICATION_NAME Slicer CACHE INTERNAL "Main application name")
endif()
set(Slicer_MAIN_PROJECT_APPLICATION_NAME ${${Slicer_MAIN_PROJECT}_APPLICATION_NAME})
......@@ -371,6 +375,22 @@ set(Slicer_VERSION_PATCH "0")
#set(Slicer_VERSION_TWEAK 0)
#set(Slicer_VERSION_RC 0)
if (${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_MAJOR)
set(Slicer_VERSION_MAJOR ${${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_MAJOR})
endif()
if (${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_MINOR)
set(Slicer_VERSION_MINOR ${${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_MINOR})
endif()
if (${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_PATCH)
set(Slicer_VERSION_PATCH ${${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_PATCH})
endif()
if (${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_TWEAK)
set(Slicer_VERSION_TWEAK ${${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_TWEAK})
endif()
if (${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_RC)
set(Slicer_VERSION_RC ${${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_RC})
endif()
SlicerMacroExtractRepositoryInfo(VAR_PREFIX Slicer) # Used to configure vtkSlicerVersionConfigure.h.in
string(REGEX REPLACE ".*([0-9][0-9][0-9][0-9]\\-[0-9][0-9]\\-[0-9][0-9]).*" "\\1"
Slicer_BUILDDATE "${Slicer_WC_LAST_CHANGED_DATE}")
......@@ -868,7 +888,13 @@ set(Slicer_GUI_LIBRARY qSlicerBaseQTApp)
add_subdirectory(Modules/Core)
add_subdirectory(Base/QTApp)
add_subdirectory(Modules)
add_subdirectory(Applications)
if (NOT DEFINED Slicer_APPLICATIONS_DIR)
add_subdirectory(Applications)
else()
add_subdirectory(${Slicer_APPLICATIONS_DIR}
${CMAKE_CURRENT_BINARY_DIR}/Applications
)
endif()
# --------------------------------------------------------------------------
# Bundle extension(s)
......
......@@ -376,6 +376,14 @@ ExternalProject_Add(${proj}
-DSlicer_SUPERBUILD:BOOL=OFF
-DSlicer_SUPERBUILD_DIR:PATH=${Slicer_BINARY_DIR}
-DSlicer_BUILD_WIN32_CONSOLE:BOOL=${Slicer_BUILD_WIN32_CONSOLE}
-DSlicer_MAIN_PROJECT:STRING=${Slicer_MAIN_PROJECT}
-D${Slicer_MAIN_PROJECT}_APPLICATION_NAME:STRING=${${Slicer_MAIN_PROJECT}_APPLICATION_NAME}
-D${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_MAJOR:STRING=${${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_MAJOR}
-D${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_MINOR:STRING=${${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_MINOR}
-D${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_PATCH:STRING=${${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_PATCH}
-D${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_TWEAK:STRING=${${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_TWEAK}
-D${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_RC:STRING=${${Slicer_MAIN_PROJECT_APPLICATION_NAME}_VERSION_RC}
-DSlicer_APPLICATIONS_DIR:PATH=${Slicer_APPLICATIONS_DIR}
-DSlicer_EXTENSION_SOURCE_DIRS:STRING=${Slicer_EXTENSION_SOURCE_DIRS}
-DDOCUMENTATION_ARCHIVES_OUTPUT_DIRECTORY:PATH=${DOCUMENTATION_ARCHIVES_OUTPUT_DIRECTORY}
-DDOXYGEN_EXECUTABLE:FILEPATH=${DOXYGEN_EXECUTABLE}
......
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