comparison Resources/CMake/OpenJpegConfiguration.cmake @ 13:e944d00a8a9e

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 27 Oct 2016 10:01:10 +0200
parents 2d7676b93a0f
children d101055fc20b
comparison
equal deleted inserted replaced
12:2d7676b93a0f 13:e944d00a8a9e
122 message(FATAL_ERROR "Please install the OpenJPEG development package") 122 message(FATAL_ERROR "Please install the OpenJPEG development package")
123 endif() 123 endif()
124 124
125 CHECK_LIBRARY_EXISTS(openjpeg opj_image_create "" HAVE_OPENJPEG_LIB) 125 CHECK_LIBRARY_EXISTS(openjpeg opj_image_create "" HAVE_OPENJPEG_LIB)
126 if (HAVE_OPENJPEG_LIB) 126 if (HAVE_OPENJPEG_LIB)
127 set(OPENJPEG_LIB openjpeg)
127 else() 128 else()
128 # Search for alternative name "libopenjp2.so" that is notably used by Debian 129 # Search for alternative name "libopenjp2.so" that is notably used by Debian
129 CHECK_LIBRARY_EXISTS(openjp2 opj_image_create "" HAVE_OPENJP2_LIB) 130 CHECK_LIBRARY_EXISTS(openjp2 opj_image_create "" HAVE_OPENJP2_LIB)
130 131
131 if (HAVE_OPENJP2_LIB) 132 if (HAVE_OPENJP2_LIB)
136 endif() 137 endif()
137 138
138 # Detection of the version of OpenJpeg 139 # Detection of the version of OpenJpeg
139 set(CMAKE_REQUIRED_INCLUDES ${OPENJPEG_INCLUDE_DIR}) 140 set(CMAKE_REQUIRED_INCLUDES ${OPENJPEG_INCLUDE_DIR})
140 set(CMAKE_REQUIRED_LIBRARIES ${OPENJPEG_LIB}) 141 set(CMAKE_REQUIRED_LIBRARIES ${OPENJPEG_LIB})
142
141 CHECK_SYMBOL_EXISTS(opj_destroy_decompress openjpeg.h HAVE_OPENJPEG_1) 143 CHECK_SYMBOL_EXISTS(opj_destroy_decompress openjpeg.h HAVE_OPENJPEG_1)
142 if (HAVE_OPENJPEG_1) 144 if (HAVE_OPENJPEG_1)
143 message("Your system has OpenJPEG version 1") 145 message("Your system has OpenJPEG version 1")
144 add_definitions(-DORTHANC_OPENJPEG_MAJOR_VERSION=1) 146 add_definitions(-DORTHANC_OPENJPEG_MAJOR_VERSION=1)
145 else() 147 else()