Commit da335c38 authored by jcfr's avatar jcfr
Browse files

COMP: Rename Slicer3_USE_PYTHON into Slicer_USE_PYTHON

git-svn-id: http://svn.slicer.org/Slicer4/trunk@15090 3bd1e089-480b-0410-8dfb-8563597acbee
parent dfb06e6a
......@@ -164,12 +164,12 @@ if(Slicer_BUILD_CLI)
add_definitions(-DSlicer_BUILD_CLI)
endif(Slicer_BUILD_CLI)
if(Slicer3_USE_PYTHON AND PYTHON_INCLUDE_PATH)
if(Slicer_USE_PYTHON AND PYTHON_INCLUDE_PATH)
set(dir_list ${dir_list} ${PYTHON_INCLUDE_PATH})
if(WIN32)
set(dir_list ${dir_list} ${PYTHON_INCLUDE_PATH}/../PC)
endif(WIN32)
endif(Slicer3_USE_PYTHON AND PYTHON_INCLUDE_PATH)
endif(Slicer_USE_PYTHON AND PYTHON_INCLUDE_PATH)
include_directories(${dir_list})
......@@ -243,7 +243,7 @@ else(Slicer3_BUILD_MODULES)
endif(Slicer_BUILD_CLI)
endif(Slicer3_BUILD_MODULES)
if(Slicer3_USE_PYTHON AND PYTHON_LIBRARIES)
if(Slicer_USE_PYTHON AND PYTHON_LIBRARIES)
target_link_libraries(Slicer3${Slicer3_EXE_SUFFIX} SlicerBaseGUIPython)
if(WIN32 AND PYTHON_DEBUG_LIBRARIES)
target_link_libraries(Slicer3${Slicer3_EXE_SUFFIX}
......@@ -260,7 +260,7 @@ if(Slicer3_USE_PYTHON AND PYTHON_LIBRARIES)
target_link_libraries(Slicer3${Slicer3_EXE_SUFFIX} util)
endif(APPLE OR UNIX)
endif(NOT WIN32)
endif(Slicer3_USE_PYTHON AND PYTHON_LIBRARIES)
endif(Slicer_USE_PYTHON AND PYTHON_LIBRARIES)
# --------------------------------------------------------------------------
# Install
......
......@@ -91,9 +91,9 @@
#include "vtkSlicerROIGUI.h"
//---------------------------------------------------------------------------
// Slicer3_USE_PYTHON
// Slicer_USE_PYTHON
//
#ifdef Slicer3_USE_PYTHON
#ifdef Slicer_USE_PYTHON
#include "slicerPython.h"
extern "C" {
......@@ -344,7 +344,7 @@ void printAllInfo(int argc, char **argv)
fprintf(stdout, "<library version=\"%d.%d.%d\">TCL</library>\n", major, minor, patchLevel);
//fprintf(stdout, "<library version=\"%d.%d.%d\">TK</library>\n", major,
//minor, patchLevel);
#ifdef Slicer3_USE_PYTHON
#ifdef Slicer_USE_PYTHON
fprintf(stdout, "<library version=\"%s\">Python</library>\n", PY_VERSION);
#endif
fprintf(stdout, "<Repository>$HeadURL$</Repository>\n");
......@@ -503,7 +503,7 @@ int Slicer3_main(int& argc, char *argv[])
//
vtkOpenGLRenderWindow::SetGlobalMaximumNumberOfMultiSamples(0);
#ifdef Slicer3_USE_PYTHON
#ifdef Slicer_USE_PYTHON
// Initialize Python
// Set up the search path
......@@ -1929,7 +1929,7 @@ int Slicer3_main(int& argc, char *argv[])
Slicer3_Tcl_Eval( interp, tclCommand.c_str() );
}
#ifdef Slicer3_USE_PYTHON
#ifdef Slicer_USE_PYTHON
vtkSlicerApplication::GetInstance()->InitializePython(
(void*)PythonModule, (void*)PythonDictionary);
......@@ -1978,7 +1978,7 @@ int Slicer3_main(int& argc, char *argv[])
if ( EvalPython != "" )
{
#if defined(Slicer3_USE_PYTHON)
#if defined(Slicer_USE_PYTHON)
if ( !NoModules )
{
std::string pythonCmd = EvalPython + "\n";
......@@ -2087,7 +2087,7 @@ int Slicer3_main(int& argc, char *argv[])
if ( ExecPython != "" )
{
#if defined(Slicer3_USE_PYTHON)
#if defined(Slicer_USE_PYTHON)
if ( !NoModules )
{
std::string pythonCmd = ExecPython + "\n";
......@@ -2278,7 +2278,7 @@ int Slicer3_main(int& argc, char *argv[])
Slicer3_Tcl_Eval( interp, tclCommand.c_str() );
}
#if defined(Slicer3_USE_PYTHON)
#if defined(Slicer_USE_PYTHON)
if ( !NoModules )
{
v = PyRun_String( "SlicerScriptedModuleInfo.TearDownAllGUI();\n",
......@@ -2394,7 +2394,7 @@ int Slicer3_main(int& argc, char *argv[])
Slicer3_Tcl_Eval( interp, tclCommand.c_str() );
}
#if defined(Slicer3_USE_PYTHON)
#if defined(Slicer_USE_PYTHON)
if ( !NoModules )
{
v = PyRun_String( "SlicerScriptedModuleInfo.DeleteAllGUI();\n",
......@@ -2509,7 +2509,7 @@ int Slicer3_main(int& argc, char *argv[])
Slicer3_Tcl_Eval( interp, tclCommand.c_str() );
}
#if defined(Slicer3_USE_PYTHON)
#if defined(Slicer_USE_PYTHON)
if ( !NoModules )
{
v = PyRun_String( "SlicerScriptedModuleInfo.DeleteAllLogic();\n",
......@@ -2523,7 +2523,7 @@ int Slicer3_main(int& argc, char *argv[])
#endif
#endif
#ifdef Slicer3_USE_PYTHON
#ifdef Slicer_USE_PYTHON
// Shutdown python interpreter
v = PyRun_String( "import Slicer;\nSlicer.slicer.deleteInstances()\n",
Py_file_input,
......
......@@ -290,12 +290,12 @@ set(include_dirs
# add_definitions(-DSlicer_BUILD_CLI)
# endif(Slicer_BUILD_CLI)
# if(Slicer3_USE_PYTHON AND PYTHON_INCLUDE_PATH)
# if(Slicer_USE_PYTHON AND PYTHON_INCLUDE_PATH)
# set(include_dirs ${include_dirs} ${PYTHON_INCLUDE_PATH})
# if(WIN32)
# set(include_dirs ${include_dirs} ${PYTHON_INCLUDE_PATH}/../PC)
# endif(WIN32)
# endif(Slicer3_USE_PYTHON AND PYTHON_INCLUDE_PATH)
# endif(Slicer_USE_PYTHON AND PYTHON_INCLUDE_PATH)
INCLUDE_DIRECTORIES(${include_dirs})
......@@ -369,7 +369,7 @@ INCLUDE_DIRECTORIES(${include_dirs})
# endif(Slicer_BUILD_CLI)
# endif(Slicer3_BUILD_MODULES)
# if(Slicer3_USE_PYTHON AND PYTHON_LIBRARIES)
# if(Slicer_USE_PYTHON AND PYTHON_LIBRARIES)
# target_link_libraries(Slicer3${Slicer3_EXE_SUFFIX} SlicerBaseGUIPython)
# if(WIN32 AND PYTHON_DEBUG_LIBRARIES)
# target_link_libraries(Slicer3${Slicer3_EXE_SUFFIX}
......@@ -386,7 +386,7 @@ INCLUDE_DIRECTORIES(${include_dirs})
# target_link_libraries(Slicer3${Slicer3_EXE_SUFFIX} util)
# endif(APPLE OR UNIX)
# endif(NOT WIN32)
# endif(Slicer3_USE_PYTHON AND PYTHON_LIBRARIES)
# endif(Slicer_USE_PYTHON AND PYTHON_LIBRARIES)
# --------------------------------------------------------------------------
# Build the library
......
//# ifdef Slicer3_USE_PYTHON
//# ifdef Slicer_USE_PYTHON
//# include "PythonQt.h"
//# include "PythonQt_QtAll.h"
//# endif
......
//# ifdef Slicer3_USE_PYTHON
//# ifdef Slicer_USE_PYTHON
//# include "PythonQt.h"
//# include "PythonQt_QtAll.h"
//# endif
......
......@@ -218,7 +218,7 @@ IF (Slicer3_USE_KWWIDGETS)
# Python settings
if(Slicer3_USE_PYTHON AND PYTHON_INCLUDE_PATH)
if(Slicer_USE_PYTHON AND PYTHON_INCLUDE_PATH)
include_directories(${PYTHON_INCLUDE_PATH})
if(WIN32)
include_directories(${PYTHON_INCLUDE_PATH}/../PC)
......@@ -237,7 +237,7 @@ IF (Slicer3_USE_KWWIDGETS)
target_link_libraries(${lib_name} ${PYTHON_LIBRARIES} util)
endif(APPLE OR UNIX)
endif(NOT WIN32)
endif(Slicer3_USE_PYTHON AND PYTHON_INCLUDE_PATH)
endif(Slicer_USE_PYTHON AND PYTHON_INCLUDE_PATH)
file(GLOB PNGFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "Resources/*.png")
foreach(pngfile ${PNGFILES})
......@@ -256,9 +256,9 @@ IF (Slicer3_USE_KWWIDGETS)
# --------------------------------------------------------------------------
# Python support
IF(Slicer3_USE_PYTHON AND PYTHON_INCLUDE_PATH)
IF(Slicer_USE_PYTHON AND PYTHON_INCLUDE_PATH)
ADD_SUBDIRECTORY(Python)
ENDIF(Slicer3_USE_PYTHON AND PYTHON_INCLUDE_PATH)
ENDIF(Slicer_USE_PYTHON AND PYTHON_INCLUDE_PATH)
# --------------------------------------------------------------------------
# Testing
......
......@@ -25,7 +25,7 @@ libraries.)
#include "vtkSlicerConfigure.h" /* Slicer3_USE_* */
#ifdef Slicer3_USE_PYTHON
#ifdef Slicer_USE_PYTHON
#include "slicerPython.h"
#include <ctype.h>
......
......@@ -10,7 +10,7 @@
#include "vtkPointData.h"
#include "vtkMatrix4x4.h"
#ifdef Slicer3_USE_PYTHON
#ifdef Slicer_USE_PYTHON
// Python will define _LARGEFILE_SOURCE to 1, while kwsys simply defines it - undef it here
// to avoid getting a warning during the build
#ifdef _LARGEFILE_SOURCE
......
......@@ -87,7 +87,7 @@
#include "vtkSlicerBaseGUIWin32Header.h"
#ifdef Slicer3_USE_PYTHON
#ifdef Slicer_USE_PYTHON
#include "slicerPython.h"
#endif
......@@ -314,7 +314,7 @@ vtkSlicerApplication::vtkSlicerApplication ( ) {
// Disable stereo render capability by default
this->SetStereoEnabled(0);
#ifdef Slicer3_USE_PYTHON
#ifdef Slicer_USE_PYTHON
this->PythonModule = NULL;
this->PythonDictionary = NULL;
#endif
......
......@@ -103,7 +103,7 @@
#include "vtkURIHandler.h"
#include "vtkHTTPHandler.h"
#ifdef Slicer3_USE_PYTHON
#ifdef Slicer_USE_PYTHON
#include "slicerPython.h"
#endif
......@@ -2073,7 +2073,7 @@ void vtkSlicerApplicationGUI::BuildGUI ( )
this->MainSlicerWindow->GetEditMenu()->SetItemAccelerator ( i, "space");
this->MainSlicerWindow->GetEditMenu()->SetBindingForItemAccelerator ( i, this->MainSlicerWindow);
#ifdef Slicer3_USE_PYTHON
#ifdef Slicer_USE_PYTHON
i = this->MainSlicerWindow->GetWindowMenu()->AddCommand ( "Python Interactor", NULL, "$::slicer3::ApplicationGUI PythonConsole" );
this->MainSlicerWindow->GetWindowMenu()->SetItemAccelerator ( i, "Ctrl+P");
this->MainSlicerWindow->GetWindowMenu()->SetBindingForItemAccelerator ( i, this->MainSlicerWindow);
......@@ -2174,7 +2174,7 @@ void vtkSlicerApplicationGUI::InitializeViewControlGUI ( )
void vtkSlicerApplicationGUI::PythonConsole ( )
{
#ifdef Slicer3_USE_PYTHON
#ifdef Slicer_USE_PYTHON
PyObject* d =
(PyObject*)(vtkSlicerApplication::GetInstance()->GetPythonDictionary());
if ( d == NULL )
......@@ -2238,7 +2238,7 @@ void vtkSlicerApplicationGUI::PythonConsole ( )
void vtkSlicerApplicationGUI::PythonCommand ( const char *cmd )
{
#ifdef Slicer3_USE_PYTHON
#ifdef Slicer_USE_PYTHON
PyObject* d =
(PyObject*)(vtkSlicerApplication::GetInstance()->GetPythonDictionary());
if ( d == NULL )
......
......@@ -16,7 +16,7 @@
/// workarounds to incorporate python into slicer's build without warnings
//
#ifdef Slicer3_USE_PYTHON
#ifdef Slicer_USE_PYTHON
/// Python will define _LARGEFILE_SOURCE to 1, while kwsys simply defines it - undef it here
/// to avoid getting a warning during the build
......
......@@ -57,7 +57,7 @@
#include "vtkSlicerConfigure.h" /* Slicer3_USE_* */
// #ifdef Slicer3_USE_PYTHON
// #ifdef Slicer_USE_PYTHON
// #include "slicerPython.h"
// #endif
......@@ -1716,7 +1716,7 @@ void vtkSlicerCLIModuleLogic::ApplyTask(void *clientdata)
ExecuteModuleString += std::string(node0->GetID()) + "'\n";
ExecuteModuleString += "Module.Execute ( *PositionalArgs, **FlagArgs )\n";
// #ifdef Slicer3_USE_PYTHON
// #ifdef Slicer_USE_PYTHON
// PyObject* v;
// v = PyRun_String(
// ExecuteModuleString.c_str(),
......
......@@ -115,7 +115,7 @@ Slicer_USE_BatchMake:BOOL=@Slicer_USE_BatchMake@
Slicer3_USE_IGSTK:BOOL=@Slicer3_USE_IGSTK@
Slicer_USE_MIDAS:BOOL=@Slicer_USE_MIDAS@
Slicer3_USE_NAVITRACK:BOOL=@Slicer3_USE_NAVITRACK@
Slicer3_USE_PYTHON:BOOL=@Slicer3_USE_PYTHON@
Slicer_USE_PYTHON:BOOL=@Slicer_USE_PYTHON@
Teem_DIR:PATH=@Teem_DIR@
SLICERLIBCURL_DIR:PATH=@SLICERLIBCURL_DIR@
......
......@@ -243,8 +243,8 @@ set(SKIP_Teem_BUILD_SETTINGS_FILE 1)
#-----------------------------------------------------------------------------
## Python
option(Slicer3_USE_PYTHON "Integrate a python interpreter into Slicer." OFF)
IF(Slicer3_USE_PYTHON OR Slicer_USE_PYTHONQT)
option(Slicer_USE_PYTHON "Integrate a python interpreter into Slicer." OFF)
IF(Slicer_USE_PYTHON OR Slicer_USE_PYTHONQT)
find_package(PythonLibs)
find_package(PythonInterp)
ENDIF()
......
......@@ -3,7 +3,7 @@ project(SlicerLibs)
## Delegate the building of the SlicerExecutionModel to
## a bundled subdirectory that can easily be included in
## other packages.
set(ModuleDescriptionParser_USE_PYTHON ${Slicer3_USE_PYTHON})
set(ModuleDescriptionParser_USE_PYTHON ${Slicer_USE_PYTHON})
ADD_SUBDIRECTORY(SlicerExecutionModel)
set(dirs
......@@ -80,7 +80,7 @@ ENDIF(CUDA_SUPPORT_ENABLED)
set(include_dirs)
set(libs)
set(LoadableModule_USE_PYTHON ${Slicer3_USE_PYTHON})
set(LoadableModule_USE_PYTHON ${Slicer_USE_PYTHON})
set(IGT_USE_IGSTK ${Slicer3_USE_IGSTK})
set(IGT_USE_NAVITRACK ${Slicer3_USE_NAVITRACK})
......
......@@ -89,7 +89,7 @@ target_link_libraries(${lib_name}
# Python settings
if(Slicer3_USE_PYTHON)
if(Slicer_USE_PYTHON)
find_package(PythonLibs REQUIRED)
include_directories(${PYTHON_INCLUDE_PATH})
if(WIN32)
......@@ -109,7 +109,7 @@ if(Slicer3_USE_PYTHON)
target_link_libraries(${lib_name} ${PYTHON_LIBRARIES} util)
endif(APPLE OR UNIX)
endif(NOT WIN32)
endif(Slicer3_USE_PYTHON)
endif(Slicer_USE_PYTHON)
# Apply user-defined properties to the library target.
IF(Slicer3_LIBRARY_PROPERTIES)
......
......@@ -61,7 +61,7 @@ Version: $Revision: 1.2 $
#include "vtkSlicerConfigure.h" /* Slicer3_USE_* */
#ifdef Slicer3_USE_PYTHON
#ifdef Slicer_USE_PYTHON
#include "slicerPython.h"
#endif
......@@ -1736,7 +1736,7 @@ void vtkCommandLineModuleLogic::ApplyTask(void *clientdata)
ExecuteModuleString += std::string(node0->GetID()) + "'\n";
ExecuteModuleString += "Module.Execute ( *PositionalArgs, **FlagArgs )\n";
#ifdef Slicer3_USE_PYTHON
#ifdef Slicer_USE_PYTHON
PyObject* v;
v = PyRun_String(
ExecuteModuleString.c_str(),
......
......@@ -19,7 +19,7 @@ endif(NOT Slicer3_SOURCE_DIR)
# --------------------------------------------------------------------------
# Copy over the Python files
if(Slicer3_USE_PYTHON)
if(Slicer_USE_PYTHON)
file(GLOB PYTHONFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "*.py")
......@@ -35,4 +35,4 @@ if(Slicer3_USE_PYTHON)
DESTINATION ${Slicer_INSTALL_MODULES_LIB_DIR}/${PROJECT_NAME}
)
endif(Slicer3_USE_PYTHON)
endif(Slicer_USE_PYTHON)
......@@ -19,7 +19,7 @@ endif(NOT Slicer3_SOURCE_DIR)
# --------------------------------------------------------------------------
# Copy over the Python files
if(Slicer3_USE_PYTHON)
if(Slicer_USE_PYTHON)
file(GLOB PYTHONFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "*.py")
......@@ -35,4 +35,4 @@ if(Slicer3_USE_PYTHON)
DESTINATION ${Slicer_INSTALL_MODULES_LIB_DIR}/${PROJECT_NAME}
)
endif(Slicer3_USE_PYTHON)
endif(Slicer_USE_PYTHON)
......@@ -19,7 +19,7 @@ endif(NOT Slicer3_SOURCE_DIR)
# --------------------------------------------------------------------------
# Copy over the Python files
if(Slicer3_USE_PYTHON)
if(Slicer_USE_PYTHON)
file(GLOB PYTHONFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "*.py")
......@@ -35,4 +35,4 @@ if(Slicer3_USE_PYTHON)
DESTINATION ${Slicer_INSTALL_MODULES_LIB_DIR}/${PROJECT_NAME}
)
endif(Slicer3_USE_PYTHON)
endif(Slicer_USE_PYTHON)
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