From b44b403869472d5a7eb65e90fa0b2594d6783f8c Mon Sep 17 00:00:00 2001
From: Guillaume Pasero <guillaume.pasero@c-s.fr>
Date: Mon, 5 Aug 2019 10:38:16 +0200
Subject: [PATCH] PKG: fix compilation script for external Python wrappers

---
 Modules/Wrappers/SWIG/src/python/StandaloneWrapper.in | 4 ++++
 Packaging/Files/build_wrapping.cmake                  | 1 +
 2 files changed, 5 insertions(+)

diff --git a/Modules/Wrappers/SWIG/src/python/StandaloneWrapper.in b/Modules/Wrappers/SWIG/src/python/StandaloneWrapper.in
index 9a657eabcd..a0b9e36291 100644
--- a/Modules/Wrappers/SWIG/src/python/StandaloneWrapper.in
+++ b/Modules/Wrappers/SWIG/src/python/StandaloneWrapper.in
@@ -21,6 +21,10 @@
 cmake_minimum_required(VERSION 3.10.1)
 project(OTBPythonWrappers)
 
+if(POLICY CMP0072)
+  cmake_policy(SET CMP0072 NEW)
+endif()
+
 get_filename_component(PKG_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}" PATH)
 get_filename_component(PKG_PREFIX "${PKG_PREFIX}" PATH)
 get_filename_component(PKG_PREFIX "${PKG_PREFIX}" PATH)
diff --git a/Packaging/Files/build_wrapping.cmake b/Packaging/Files/build_wrapping.cmake
index 3b1f28dd15..45036d00e7 100644
--- a/Packaging/Files/build_wrapping.cmake
+++ b/Packaging/Files/build_wrapping.cmake
@@ -22,6 +22,7 @@ get_filename_component(PKG_PREFIX "${CTEST_SCRIPT_DIRECTORY}" PATH)
 get_filename_component(PKG_PREFIX "${PKG_PREFIX}" PATH)
 get_filename_component(PKG_PREFIX "${PKG_PREFIX}" PATH)
 
+set(CTEST_PROJECT_NAME OTBPythonWrappers)
 set(CTEST_SOURCE_DIRECTORY ${CTEST_SCRIPT_DIRECTORY})
 set(CTEST_BINARY_DIRECTORY ${CTEST_SCRIPT_DIRECTORY}/build)
 if(WIN32)
-- 
GitLab