mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-04-13 09:42:32 +02:00
99 lines
2.9 KiB
Diff
99 lines
2.9 KiB
Diff
From 18042eba75e02270f844f19479caa650bc096174 Mon Sep 17 00:00:00 2001
|
|
From: Orion Poplawski <orion@nwra.com>
|
|
Date: Sun, 4 Jun 2023 16:33:23 -0600
|
|
Subject: [PATCH] Use charls cmake config, expect version >= 2.2.0
|
|
|
|
---
|
|
CMake/FindCharLS.cmake | 40 ----------------------------------------
|
|
CMakeLists.txt | 7 ++++---
|
|
Utilities/gdcm_charls.h | 4 ++--
|
|
3 files changed, 6 insertions(+), 45 deletions(-)
|
|
delete mode 100644 CMake/FindCharLS.cmake
|
|
|
|
diff --git a/CMake/FindCharLS.cmake b/CMake/FindCharLS.cmake
|
|
deleted file mode 100644
|
|
index 8f6bf196f4..0000000000
|
|
--- a/CMake/FindCharLS.cmake
|
|
+++ /dev/null
|
|
@@ -1,40 +0,0 @@
|
|
-#
|
|
-# Copyright (c) 2006-2011 Mathieu Malaterre <mathieu.malaterre@gmail.com>
|
|
-#
|
|
-# Redistribution and use is allowed according to the terms of the New
|
|
-# BSD license.
|
|
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
|
-#
|
|
-
|
|
-find_path(CHARLS_INCLUDE_DIR CharLS/charls.h
|
|
-/usr/local/include
|
|
-/usr/include
|
|
-)
|
|
-
|
|
-find_library(CHARLS_LIBRARY
|
|
- NAMES CharLS
|
|
- PATHS /usr/lib /usr/local/lib
|
|
- )
|
|
-
|
|
-if (CHARLS_LIBRARY AND CHARLS_INCLUDE_DIR)
|
|
- set(CHARLS_LIBRARIES ${CHARLS_LIBRARY})
|
|
- set(CHARLS_INCLUDE_DIRS ${CHARLS_INCLUDE_DIR})
|
|
- set(CHARLS_FOUND "YES")
|
|
-else ()
|
|
- set(CHARLS_FOUND "NO")
|
|
-endif ()
|
|
-
|
|
-if (CHARLS_FOUND)
|
|
- if (NOT CHARLS_FIND_QUIETLY)
|
|
- message(STATUS "Found CHARLS: ${CHARLS_LIBRARIES}")
|
|
- endif ()
|
|
-else ()
|
|
- if (CHARLS_FIND_REQUIRED)
|
|
- message(FATAL_ERROR "Could not find CHARLS library")
|
|
- endif ()
|
|
-endif ()
|
|
-
|
|
-mark_as_advanced(
|
|
- CHARLS_LIBRARY
|
|
- CHARLS_INCLUDE_DIR
|
|
- )
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 41f5b4349f..e6f16484be 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -319,7 +319,7 @@ option(GDCM_USE_SYSTEM_PAPYRUS3 "Use system papyrus3" OFF)
|
|
option(GDCM_USE_SYSTEM_SOCKETXX "Use system socket++" OFF)
|
|
option(GDCM_USE_SYSTEM_LJPEG "Use system ljpeg (ijg lib)" OFF)
|
|
option(GDCM_USE_SYSTEM_OPENJPEG "Use system openjpeg" OFF)
|
|
-option(GDCM_USE_SYSTEM_CHARLS "Use system CharLS" OFF)
|
|
+option(GDCM_USE_SYSTEM_CHARLS "Use system charls" OFF)
|
|
mark_as_advanced(
|
|
GDCM_USE_SYSTEM_ZLIB
|
|
GDCM_USE_SYSTEM_OPENSSL
|
|
@@ -352,8 +352,9 @@ else()
|
|
endif()
|
|
|
|
if(GDCM_USE_SYSTEM_CHARLS)
|
|
- find_package(CharLS 2.0.0 REQUIRED)
|
|
- set(GDCM_CHARLS_LIBRARIES ${CHARLS_LIBRARIES})
|
|
+ find_package(charls 2.2.0 REQUIRED)
|
|
+ set(GDCM_CHARLS_LIBRARIES charls)
|
|
+ message(STATUS "Found charls version " ${charls_VERSION})
|
|
else()
|
|
set(GDCM_CHARLS_LIBRARIES gdcmcharls)
|
|
endif()
|
|
diff --git a/Utilities/gdcm_charls.h b/Utilities/gdcm_charls.h
|
|
index b80451c490..d2b8d6a78e 100644
|
|
--- a/Utilities/gdcm_charls.h
|
|
+++ b/Utilities/gdcm_charls.h
|
|
@@ -17,8 +17,8 @@
|
|
/* Use the charls library configured for gdcm. */
|
|
#include "gdcmTypes.h"
|
|
#ifdef GDCM_USE_SYSTEM_CHARLS
|
|
-// It is expected that version 2.0.0 is used
|
|
-# include <CharLS/charls.h>
|
|
+// It is expected that version >= 2.2.0 is used
|
|
+# include <charls/charls.h>
|
|
#else
|
|
#include "gdcmcharls/charls.h"
|
|
#endif
|