From 0ef3ab7ca632203ca4fcba6a6acaf73ed01c3161 Mon Sep 17 00:00:00 2001
From: Guillaume Pasero <guillaume.pasero@c-s.fr>
Date: Thu, 31 Aug 2017 17:17:22 +0200
Subject: [PATCH] COMP: missing TIFF 3rd party module to compile SPTW

---
 Modules/ThirdParty/TIFF/CMakeLists.txt        | 26 +++++++++++++++
 Modules/ThirdParty/TIFF/otb-module-init.cmake | 21 ++++++++++++
 Modules/ThirdParty/TIFF/otb-module.cmake      | 32 +++++++++++++++++++
 3 files changed, 79 insertions(+)
 create mode 100644 Modules/ThirdParty/TIFF/CMakeLists.txt
 create mode 100644 Modules/ThirdParty/TIFF/otb-module-init.cmake
 create mode 100644 Modules/ThirdParty/TIFF/otb-module.cmake

diff --git a/Modules/ThirdParty/TIFF/CMakeLists.txt b/Modules/ThirdParty/TIFF/CMakeLists.txt
new file mode 100644
index 0000000000..d3cb2a3a7b
--- /dev/null
+++ b/Modules/ThirdParty/TIFF/CMakeLists.txt
@@ -0,0 +1,26 @@
+#
+# Copyright (C) 2005-2017 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.
+#
+
+project(OTBTIFF)
+
+set(OTBTIFF_SYSTEM_INCLUDE_DIRS ${TIFF_INCLUDE_DIRS})
+set(OTBTIFF_LIBRARIES "${TIFF_LIBRARIES}")
+
+otb_module_impl()
diff --git a/Modules/ThirdParty/TIFF/otb-module-init.cmake b/Modules/ThirdParty/TIFF/otb-module-init.cmake
new file mode 100644
index 0000000000..93a99b67b9
--- /dev/null
+++ b/Modules/ThirdParty/TIFF/otb-module-init.cmake
@@ -0,0 +1,21 @@
+#
+# Copyright (C) 2005-2017 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.
+#
+
+find_package ( TIFF REQUIRED )
diff --git a/Modules/ThirdParty/TIFF/otb-module.cmake b/Modules/ThirdParty/TIFF/otb-module.cmake
new file mode 100644
index 0000000000..a066280180
--- /dev/null
+++ b/Modules/ThirdParty/TIFF/otb-module.cmake
@@ -0,0 +1,32 @@
+#
+# Copyright (C) 2005-2017 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.
+#
+
+set(DOCUMENTATION "This module imports TIFF to the build system")
+
+otb_module(OTBTIFF
+  DEPENDS
+    
+  TEST_DEPENDS
+    
+  DESCRIPTION
+    "${DOCUMENTATION}"
+
+  EXCLUDE_FROM_DEFAULT
+  )
-- 
GitLab