Commit 8ff6459b authored by Julien Michel's avatar Julien Michel

REFAC: Drop swig/java support

parent 943cfaa5
Pipeline #455 failed with stage
in 25 minutes and 34 seconds
This diff is collapsed.
#
# This script create a list of compiled Java class files to be added to a
# jar file. This avoids including cmake files which get created in the
# binary directory.
#
#=============================================================================
# Copyright 2010-2011 Andreas schneider <asn@redhat.com>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
if (CMAKE_JAVA_CLASS_OUTPUT_PATH)
if (EXISTS "${CMAKE_JAVA_CLASS_OUTPUT_PATH}")
set(_JAVA_GLOBBED_FILES)
if (CMAKE_JAR_CLASSES_PREFIX)
foreach(JAR_CLASS_PREFIX ${CMAKE_JAR_CLASSES_PREFIX})
message(STATUS "JAR_CLASS_PREFIX: ${JAR_CLASS_PREFIX}")
file(GLOB_RECURSE _JAVA_GLOBBED_TMP_FILES "${CMAKE_JAVA_CLASS_OUTPUT_PATH}/${JAR_CLASS_PREFIX}/*.class")
if (_JAVA_GLOBBED_TMP_FILES)
list(APPEND _JAVA_GLOBBED_FILES ${_JAVA_GLOBBED_TMP_FILES})
endif ()
endforeach()
else()
file(GLOB_RECURSE _JAVA_GLOBBED_FILES "${CMAKE_JAVA_CLASS_OUTPUT_PATH}/*.class")
endif ()
set(_JAVA_CLASS_FILES)
# file(GLOB_RECURSE foo RELATIVE) is broken so we need this.
foreach(_JAVA_GLOBBED_FILE ${_JAVA_GLOBBED_FILES})
file(RELATIVE_PATH _JAVA_CLASS_FILE ${CMAKE_JAVA_CLASS_OUTPUT_PATH} ${_JAVA_GLOBBED_FILE})
set(_JAVA_CLASS_FILES ${_JAVA_CLASS_FILES}${_JAVA_CLASS_FILE}\n)
endforeach()
# write to file
file(WRITE ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/java_class_filelist ${_JAVA_CLASS_FILES})
else ()
message(SEND_ERROR "FATAL: Java class output path doesn't exist")
endif ()
else ()
message(SEND_ERROR "FATAL: Can't find CMAKE_JAVA_CLASS_OUTPUT_PATH")
endif ()
#
# Helper script for UseJava.cmake
#
#=============================================================================
# Copyright 2010-2011 Andreas schneider <asn@redhat.com>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
if (UNIX AND _JAVA_TARGET_OUTPUT_LINK)
if (_JAVA_TARGET_OUTPUT_NAME)
find_program(LN_EXECUTABLE
NAMES
ln
)
execute_process(
COMMAND ${LN_EXECUTABLE} -sf "${_JAVA_TARGET_OUTPUT_NAME}" "${_JAVA_TARGET_OUTPUT_LINK}"
WORKING_DIRECTORY ${_JAVA_TARGET_DIR}
)
else ()
message(SEND_ERROR "FATAL: Can't find _JAVA_TARGET_OUTPUT_NAME")
endif ()
endif ()
......@@ -21,7 +21,7 @@ entry points. While the framework can be extended, the Orfeo ToolBox ships with
reporting,
- A SWIG interface, which means that any application can be loaded,
set-up and executed into a high-level language such as Python or Java
set-up and executed into a high-level language such as Python
for instance.
- `QGIS <http://www.qgis.org/>`_ plugin built on top of
......
......@@ -37,8 +37,7 @@ namespace Wrapper
/** \class DocExampleStructure
* \brief This class is a structure that gathered the necessary
* element to generate an example (for CommandLine, python, Java
* ...).
* element to generate an example (for CommandLine, python ...).
* User has to set the application name, the binary path and a list of
* key/value couple.
*
......
......@@ -19,9 +19,8 @@
#
option ( OTB_WRAP_PYTHON "Wrap Python" OFF )
option ( OTB_WRAP_JAVA "Wrap Java" OFF )
if ( OTB_WRAP_PYTHON OR OTB_WRAP_JAVA )
if ( OTB_WRAP_PYTHON )
find_package ( SWIG REQUIRED )
mark_as_advanced(SWIG_DIR)
mark_as_advanced(SWIG_EXECUTABLE)
......@@ -51,14 +50,4 @@ if ( OTB_WRAP_PYTHON )
message( WARNING
"OTB wrappers will be done without support for NumPy (not found).")
endif()
endif()
#
# JAVA SWIG configuration
#
if ( OTB_WRAP_JAVA )
check_PIC_flag ( Java )
find_package ( Java REQUIRED )
find_package ( JNI REQUIRED )
mark_as_advanced( JAVA_HOME )
endif()
endif()
\ No newline at end of file
......@@ -18,7 +18,7 @@
# limitations under the License.
#
if ( OTB_WRAP_PYTHON OR OTB_WRAP_JAVA )
if ( OTB_WRAP_PYTHON )
include ( UseSWIGLocal )
list(APPEND SWIG_EXTRA_DEPS
otbWrapperSWIGIncludes.h
......@@ -32,9 +32,4 @@ endif()
# Python SWIG configuration
if ( OTB_WRAP_PYTHON )
add_subdirectory(python)
endif()
# JAVA SWIG configuration
if ( OTB_WRAP_JAVA )
add_subdirectory(java)
endif()
endif()
\ No newline at end of file
/*
* Copyright (C) 2005-2019 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#if SWIGJAVA
%ignore CreateAnother;
%ignore Delete;
%ignore Register;
%ignore UnRegister;
%ignore GetReferenceCount;
%ignore SetReferenceCount;
%ignore DebugOn;
%ignore DebugOff;
%ignore GetDebug;
%ignore SetDebug;
%ignore GetMTime;
%ignore Modified;
%ignore SetGlobalWarningDisplay;
%ignore GetGlobalWarningDisplay;
%ignore GlobalWarningDisplayOn;
%ignore GlobalWarningDisplayOff;
%ignore New;
//######################################################################
// Simulating smart pointers in SWIG
// This gets rid of wrapping ITK smart pointers.
// TODO: always tell swig we're the owner
// TODO: itk classes with no New() must be marked as abstract
%define DECLARE_REF_COUNT_CLASS(itkClass)
class itkClass##_Pointer
{
public:
itkClass##_Pointer();
itkClass##_Pointer(itkClass##_Pointer const & p);
itkClass##_Pointer(itkClass * p);
~itkClass##_Pointer();
itkClass * operator->() const;
bool IsNotNull() const;
bool IsNull() const;
itkClass * GetPointer() const;
private:
void Register();
void UnRegister();
protected:
};
/*
%extend itkClass {
public:
itkClass() {
typedef ::itk::SmartPointer<itkLightObject> Pointer;
Pointer smtPtr = itkClass::New().GetPointer();
itkClass *rawPtr = dynamic_cast<itkClass *>(smtPtr.GetPointer());
rawPtr->Register();
return rawPtr;
}
~itkClass() {
self->UnRegister();
}
}
%typemap(out) itkClass##_Pointer {
itkClass* ptrRaw = $1.GetPointer();
if (ptrRaw) {
ptrRaw->Register();
}
*(itkClass **)&$result = ptrRaw;
}
%typemap(out) itkClass##_Pointer & {
itkClass* ptrRaw = (*$1).GetPointer();
if (ptrRaw) {
ptrRaw->Register();
}
*(itkClass **)&$result = ptrRaw;
}
// Do not wrap the corresponding itkSmartPointer
//%ignore itkClass##_Pointer;
*/
%enddef
%pragma(java) jniclasscode=%{
static {
System.loadLibrary ( "otbApplicationJava" );
}
%}
%rename(CreateApplicationInternal) Registry::CreateApplication(const std::string& name);
%typemap(javacode) Registry %{
public static Application CreateApplication(String name) {
Application_Pointer app = CreateApplicationInternal(name);
return app.__deref__();
}
%}
/* This tells SWIG to treat char ** as a special case when used as a parameter
in a function call */
%typemap(in) std::vector< std::string > {
int i = 0;
int size = jenv->GetArrayLength($input);
for (i = 0; i<size; i++) {
jstring j_string = (jstring)jenv->GetObjectArrayElement($input, i);
const char * c_string = jenv->GetStringUTFChars(j_string, 0);
$1.push_back(c_string);
jenv->ReleaseStringUTFChars(j_string, c_string);
jenv->DeleteLocalRef(j_string);
}
}
// transform std::vector< std::string > to a more standard String Array
%typemap(out) std::vector< std::string >
{
int i;
int len=$1.size();
jstring temp_string;
const jclass clazz = jenv->FindClass("java/lang/String");
jresult = jenv->NewObjectArray(len, clazz, NULL);
/* exception checking omitted */
for (i=0; i<len; i++)
{
temp_string = jenv->NewStringUTF($1[i].c_str());
jenv->SetObjectArrayElement(jresult, i, temp_string);
jenv->DeleteLocalRef(temp_string);
}
}
%typemap(jni) std::vector< std::string > "jobjectArray"
%typemap(jtype) std::vector< std::string > "String[]"
%typemap(jstype) std::vector< std::string > "String[]"
%typemap(javain) std::vector< std::string > "$javainput"
%typemap(javaout) std::vector< std::string > {
return $jnicall;
}
#endif
/*
* Copyright (C) 2005-2019 CS Systemes d'Information (CS SI)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#if SWIGLUA
%ignore CreateAnother;
%ignore Delete;
%ignore Register;
%ignore UnRegister;
%ignore GetReferenceCount;
%ignore SetReferenceCount;
%ignore DebugOn;
%ignore DebugOff;
%ignore GetDebug;
%ignore SetDebug;
%ignore GetMTime;
%ignore Modified;
%ignore SetGlobalWarningDisplay;
%ignore GetGlobalWarningDisplay;
%ignore GlobalWarningDisplayOn;
%ignore GlobalWarningDisplayOff;
%ignore New;
//######################################################################
// Simulating smart pointers in SWIG
// This gets rid of wrapping ITK smart pointers.
// TODO: always tell swig we're the owner
// TODO: itk classes with no New() must be marked as abstract
%define DECLARE_REF_COUNT_CLASS(itkClass)
class itkClass##_Pointer
{
public:
itkClass##_Pointer();
itkClass##_Pointer(itkClass##_Pointer const & p);
itkClass##_Pointer(itkClass * p);
~itkClass##_Pointer();
itkClass * operator->() const;
bool IsNotNull() const;
bool IsNull() const;
itkClass * GetPointer() const;
bool operator<(itkClass##_Pointer const & r) const;
bool operator>(itkClass##_Pointer const & r) const;
bool operator<=(itkClass##_Pointer const & r) const;
bool operator>=(itkClass##_Pointer const & r) const;
itkClass##_Pointer & operator=(itkClass##_Pointer const & r);
itkClass##_Pointer & operator=(itkClass## * r);
// itkClass * Print(std::ostream & os) const;
private:
void Register();
void UnRegister();
protected:
};
// Extend the itk classtype defined for wrapping to simulate a smart pointer in SWIG.
// Also, make the ctor public to make the 'new' operator available in java
%extend itkClass {
public:
itkClass() {
typedef ::itk::SmartPointer<itkLightObject> Pointer;
Pointer smtPtr = itkClass::New().GetPointer();
itkClass *rawPtr = dynamic_cast<itkClass *>(smtPtr.GetPointer());
rawPtr->Register();
return rawPtr;
};
~itkClass() {
self->UnRegister();
};
}
/*
%typemap(out) itkClass * {
itkClass* ptrRaw = $1;
if (ptrRaw) {
ptrRaw->Register();
}
*(itkClass **)&$result = ptrRaw;
}
*/
%typemap(out) itkClass##_Pointer {
itkClass* ptrRaw = $1.GetPointer();
if (ptrRaw) {
ptrRaw->Register();
}
*(itkClass **)&$result = ptrRaw;
}
%typemap(out) itkClass##_Pointer & {
itkClass* ptrRaw = (*$1).GetPointer();
if (ptrRaw) {
ptrRaw->Register();
}
*(itkClass **)&$result = ptrRaw;
}
// Do not wrap the corresponding itkSmartPointer
%ignore itkClass##_Pointer;
%enddef
#endif
/*
* Copyright (C) 2005-2019 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#if SWIGRUBY
%ignore CreateAnother;
%ignore Delete;
%ignore Register;
%ignore UnRegister;
%ignore GetReferenceCount;
%ignore SetReferenceCount;
%ignore DebugOn;
%ignore DebugOff;
%ignore GetDebug;
%ignore SetDebug;
%ignore GetMTime;
%ignore Modified;
%ignore SetGlobalWarningDisplay;
%ignore GetGlobalWarningDisplay;
%ignore GlobalWarningDisplayOn;
%ignore GlobalWarningDisplayOff;
%ignore New;
//######################################################################
// Simulating smart pointers in SWIG
// This gets rid of wrapping ITK smart pointers.
// TODO: always tell swig we're the owner
// TODO: itk classes with no New() must be marked as abstract
%define DECLARE_REF_COUNT_CLASS(itkClass)
class itkClass##_Pointer
{
public:
itkClass##_Pointer();
itkClass##_Pointer(itkClass##_Pointer const & p);
itkClass##_Pointer(itkClass * p);
~itkClass##_Pointer();
itkClass * operator->() const;
bool IsNotNull() const;
bool IsNull() const;
itkClass * GetPointer() const;
bool operator<(itkClass##_Pointer const & r) const;
bool operator>(itkClass##_Pointer const & r) const;
bool operator<=(itkClass##_Pointer const & r) const;
bool operator>=(itkClass##_Pointer const & r) const;
itkClass##_Pointer & operator=(itkClass##_Pointer const & r);
itkClass##_Pointer & operator=(itkClass## * r);
// itkClass * Print(std::ostream & os) const;
private:
void Register();
void UnRegister();
protected:
};
// Extend the itk classtype defined for wrapping to simulate a smart pointer in SWIG.
// Also, make the ctor public to make the 'new' operator available in java
%extend itkClass {
public:
itkClass() {
typedef ::itk::SmartPointer<itkLightObject> Pointer;
Pointer smtPtr = itkClass::New().GetPointer();
itkClass *rawPtr = dynamic_cast<itkClass *>(smtPtr.GetPointer());
rawPtr->Register();
return rawPtr;
};
~itkClass() {
self->UnRegister();
};
}
/*
%typemap(out) itkClass * {
itkClass* ptrRaw = $1;
if (ptrRaw) {
ptrRaw->Register();
}
*(itkClass **)&$result = ptrRaw;
}
*/
%typemap(out) itkClass##_Pointer {
itkClass* ptrRaw = $1.GetPointer();
if (ptrRaw) {
ptrRaw->Register();
}
*(itkClass **)&$result = ptrRaw;
}
%typemap(out) itkClass##_Pointer & {
itkClass* ptrRaw = (*$1).GetPointer();
if (ptrRaw) {
ptrRaw->Register();
}
*(itkClass **)&$result = ptrRaw;
}
// Do not wrap the corresponding itkSmartPointer
%ignore itkClass##_Pointer;
%enddef
%pragma(java) jniclasscode=%{
static {
System.loadLibrary ( "otbApplicationJava" );
}
%}
#endif
#
# Copyright (C) 2005-2019 CS Systemes d'Information (CS SI)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_directories ( ${JAVA_INCLUDE_PATH} ${JNI_INCLUDE_DIRS} )
set_source_files_properties ( ../otbApplication.i PROPERTIES CPLUSPLUS ON )
# Make sure the nested directory structure exists
set(JAVA_SOURCE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/org/otb/application)
set(JAVA_BINARY_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/build)
file(MAKE_DIRECTORY ${JAVA_SOURCE_DIRECTORY})
file(MAKE_DIRECTORY ${JAVA_BINARY_DIRECTORY})
# Nicely write the bridge code in org/itk/simple
set(CMAKE_SWIG_OUTDIR ${JAVA_SOURCE_DIRECTORY})
set(CMAKE_SWIG_FLAGS -package "org.otb.application" ${CMAKE_SWIG_GLOBAL_FLAGS})
set(SWIG_MODULE_otbApplicationJava_EXTRA_DEPS
${CMAKE_CURRENT_SOURCE_DIR}/../Java.i
OTBApplicationEngine)
SWIG_add_module ( otbApplicationJava java ../otbApplication.i otbApplicationJAVA_wrap.cxx)
SWIG_link_libraries(otbApplicationJava OTBApplicationEngine )
if(MSVC)
set_source_files_properties( ${CMAKE_CURRENT_BINARY_DIR}/otbApplicationJAVA_wrap.cxx COMPILE_FLAGS "/wd4005" )
else()
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/otbApplicationJAVA_wrap.cxx COMPILE_FLAGS "-w")
endif()
# Add target for org.otb.Application.jar
add_custom_target(org_otb_Application_jar ALL DEPENDS org.otb.application.jar)
otb_module_target_label( org_otb_Application_jar )
# Add custom command and target to compile the generated files and put them in a jar file
# Make sure the commands depend on the output library from SWIG
add_custom_command(
OUTPUT org.otb.application.jar
COMMENT "Creating jar file..."
COMMAND ${Java_JAVAC_EXECUTABLE} -d ${JAVA_BINARY_DIRECTORY} ${JAVA_SOURCE_DIRECTORY}/*.java
COMMAND ${Java_JAR_EXECUTABLE} cf ${CMAKE_CURRENT_BINARY_DIR}/org.otb.application.jar -C ${JAVA_BINARY_DIRECTORY} org
DEPENDS ${SWIG_MODULE_otbApplication_REAL_NAME} otbApplicationJava OTBApplicationEngine
)
# Get the location of the extension directory
string(REGEX REPLACE "include" "jre/lib/ext" JAVA_EXTENSION_DIR ${JAVA_INCLUDE_PATH} )
# Add the install target
# -- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.otb.application.jar DESTINATION ${JAVA_EXTENSION_DIR})
# Prefer using OTB_INSTALL_JAVA_DIR which defaults to something that honors CMAKE_INSTALL_PREFIX
# Using the system-wide Java extension dir usually require admin privileges,
# and shall better be left to packagers.
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.otb.application.jar
DESTINATION ${OTB_INSTALL_JAVA_DIR}
COMPONENT RuntimeLibraries )
......@@ -31,8 +31,6 @@
// Language specific extension
%include "Python.i"
%include "Java.i"
%include "Ruby.i"
%include "Lua.i"
%include "itkMacro.i"
%include "itkBase.i"
......
......@@ -20,8 +20,4 @@
if (OTB_WRAP_PYTHON)
add_subdirectory(python)
endif()
if (OTB_WRAP_JAVA)
add_subdirectory(java)
endif()
endif()
\ No newline at end of file
#
# Copyright (C) 2005-2019 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include( UseJava )
set(TEST_DRIVER otbTestDriver
--add-before-env OTB_APPLICATION_PATH $<TARGET_FILE_DIR:otbapp_Smoothing>
)
set( PATH_SEPARATOR ":")
if (WIN32)
set( PATH_SEPARATOR ";")
# on windows, loading the module _otbApplication requires the otbossimplugins*.dll
# which is in the 'bin' folder
set(TEST_DRIVER ${TEST_DRIVER}
--add-before-env PATH ${OTB_BINARY_DIR}/bin)
endif()
set( CMAKE_JAVA_INCLUDE_PATH ${OTBSWIGWrapper_BINARY_DIR}/src/java/org.otb.application.jar )
set( JAVA_COMMAND "${Java_JAVA_EXECUTABLE}"
"-Djava.library.path=${OTB_BINARY_DIR}/Code/Wrappers/SWIG${PATH_SEPARATOR}$<TARGET_FILE_DIR:otbApplicationJava>" )
add_jar( JavaSmoothingTest JavaSmoothingTest.java )
add_dependencies( JavaSmoothingTest org_otb_Application_jar )
add_dependencies( OTBSWIGWrapper-all JavaSmoothingTest )
add_test( NAME jaTvSmoothing
COMMAND ${TEST_DRIVER} Execute
${Java_JAVA_EXECUTABLE}
"-Djava.library.path=${OTB_BINARY_DIR}/Code/Wrappers/SWIG${PATH_SEPARATOR}$<TARGET_FILE_DIR:otbApplicationJava>"
-cp "${CMAKE_JAVA_INCLUDE_PATH}${PATH_SEPARATOR}${CMAKE_CURRENT_BINARY_DIR}/JavaSmoothingTest.jar"
SmoothingTest
${OTB_DATA_ROOT}/Input/ToulouseExtract_WithGeom.tif
${TEMP}/jaTvSmoothing_ )
add_jar( JavaRescaleTest JavaRescaleTest.java )
add_dependencies( JavaRescaleTest org_otb_Application_jar )
add_dependencies( OTBSWIGWrapper-all JavaRescaleTest )
add_test( NAME jaTvRescale
COMMAND ${TEST_DRIVER} Execute
${Java_JAVA_EXECUTABLE}
"-Djava.library.path=${OTB_BINARY_DIR}/Code/Wrappers/SWIG${PATH_SEPARATOR}$<TARGET_FILE_DIR:otbApplicationJava>"
-cp "${CMAKE_JAVA_INCLUDE_PATH}${PATH_SEPARATOR}${CMAKE_CURRENT_BINARY_DIR}/JavaRescaleTest.jar"
RescaleTest
${INPUTDATA}/poupees.tif
${TEMP}/jaTvRescaleTest.tif
20
150 )