Skip to content

Commit

Permalink
Use charls cmake config, expect version >= 2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
opoplawski committed Jun 6, 2023
1 parent 335472d commit 18042eb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 45 deletions.
40 changes: 0 additions & 40 deletions CMake/FindCharLS.cmake

This file was deleted.

7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions Utilities/gdcm_charls.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 18042eb

Please sign in to comment.