1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
Description: Fix FTBFS with recent versions of CMake
Author: Sebastien Jodogne <s.jodogne@orthanc-labs.com>
Forwarded: https://orthanc.uclouvain.be/hg/orthanc-databases/rev/3d1faa34233f
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: OrthancPostgreSQL-5.0/PostgreSQL/CMakeLists.txt
===================================================================
--- OrthancPostgreSQL-5.0.orig/PostgreSQL/CMakeLists.txt
+++ OrthancPostgreSQL-5.0/PostgreSQL/CMakeLists.txt
@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8...4.0)
project(OrthancPostgreSQL)
set(ORTHANC_PLUGIN_VERSION "5.0")
Index: OrthancPostgreSQL-5.0/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake
===================================================================
--- OrthancPostgreSQL-5.0.orig/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake
+++ OrthancPostgreSQL-5.0/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake
@@ -475,11 +475,19 @@ if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "s
include(CheckIncludeFile)
include(CheckIncludeFileCXX)
- include(FindPythonInterp)
+
+ if(CMAKE_VERSION VERSION_GREATER "3.11")
+ find_package(Python REQUIRED COMPONENTS Interpreter)
+ set(PYTHON_EXECUTABLE ${Python_EXECUTABLE})
+ else()
+ include(FindPythonInterp)
+ find_package(PythonInterp REQUIRED)
+ endif()
+
include(${CMAKE_CURRENT_LIST_DIR}/Compiler.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/DownloadPackage.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/AutoGeneratedCode.cmake)
- set(EMBED_RESOURCES_PYTHON ${CMAKE_CURRENT_LIST_DIR}/EmbedResources.py)
+ set(EMBED_RESOURCES_PYTHON ${CMAKE_CURRENT_LIST_DIR}/../EmbedResources.py)
if (ORTHANC_FRAMEWORK_USE_SHARED)
list(GET CMAKE_FIND_LIBRARY_PREFIXES 0 Prefix)
|