ports/devel/gdcm/files/patch-CMake_FindOpenJPEG.cmake
Jason Unovitch bd8b3ff67e devel/gdcm: update 2.4.4 -> 2.6.3
- Switch off by default DOCS option for Doxygen docs to DOXYGEN
- Switch DOXYGEN bits to options helpers
- Standardize on the more prevelant ON/OFF CMAKE flags
- Set USE_LDCONFIG=yes as ${PREFIX}/lib is the default
- Add gdcmviewer to DESKTOP_ENTRIES

PR:		203479
Submitted by:	tkato432@yahoo.com (with changes)
Security:	CVE-2015-8396
Security:	CVE-2015-8397
Security:	https://vuxml.FreeBSD.org/freebsd/e00d8b94-c88a-11e5-b5fe-002590263bf5.html
MFH:		2016Q1
2016-02-01 02:43:04 +00:00

24 lines
710 B
CMake

--- CMake/FindOpenJPEG.cmake.orig 2015-08-22 14:09:50 UTC
+++ CMake/FindOpenJPEG.cmake
@@ -18,7 +18,15 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-# Try first to locate a cmake config file
+# Try with pkg-config first
+find_package(PkgConfig)
+pkg_check_modules(OPENJPEG libopenjpeg1)
+if(OPENJPEG_FOUND)
+ set(OPENJPEG_MAJOR_VERSION 1)
+ set(OPENJPEG_INCLUDE_DIR ${OPENJPEG_INCLUDE_DIRS})
+ set(OPENJPEG_LIBRARIES ${OPENJPEG_LDFLAGS})
+else()
+# Try to locate a cmake config file
find_package(OpenJPEG QUIET NO_MODULE)
if( NOT OpenJPEG_DIR )
@@ -51,3 +59,4 @@ mark_as_advanced(
OPENJPEG_INCLUDE_DIR
)
endif()
+endif()