Mercurial > hg > orthanc-wsi
changeset 11:217a219ac0fc
additional search path for openjpeg.h
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 27 Oct 2016 09:08:26 +0200 |
parents | 77338c77b3f5 |
children | 2d7676b93a0f |
files | Resources/CMake/OpenJpegConfiguration.cmake TODO |
diffstat | 2 files changed, 14 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/Resources/CMake/OpenJpegConfiguration.cmake Wed Oct 26 17:39:58 2016 +0200 +++ b/Resources/CMake/OpenJpegConfiguration.cmake Thu Oct 27 09:08:26 2016 +0200 @@ -106,19 +106,25 @@ ) endif() - source_group(ThirdParty\\OpenJpeg REGULAR_EXPRESSION ${OPENJPEG_SOURCES_DIR}/.*) + source_group(ThirdParty\\OpenJPEG REGULAR_EXPRESSION ${OPENJPEG_SOURCES_DIR}/.*) else() - CHECK_INCLUDE_FILE_CXX(openjpeg.h HAVE_OPENJPEG_H) + find_path(OPENJPEG_INCLUDE_DIR + NAMES openjpega.h + PATH + /usr/include/ + /usr/local/include/ + /usr/local/openjpeg-2.1/ + ) + + CHECK_INCLUDE_FILE_CXX(${OPENJPEG_INCLUDE_DIR}/openjpeg.h HAVE_OPENJPEG_H) if (NOT HAVE_OPENJPEG_H) - message(FATAL_ERROR "Please install the openjpeg-devel package") + message(FATAL_ERROR "Please install the OpenJPEG development package") endif() - find_path(OPENJPEG_INCLUDE_DIR openjpeg.h) - CHECK_LIBRARY_EXISTS(openjpeg opj_image_create "" HAVE_OPENJPEG_LIB) if (NOT HAVE_OPENJPEG_LIB) - message(FATAL_ERROR "Please install the openjpeg-devel package") + message(FATAL_ERROR "Please install the OpenJPEG development package") endif() # Autodetection of the version of OpenJpeg @@ -137,7 +143,7 @@ elseif (OPENJPEG_MAJOR_VERSION EQUAL 2) add_definitions(-DORTHANC_OPENJPEG_MAJOR_VERSION=2) else() - message(FATAL_ERROR "Cannot parse the version of OpenJpeg") + message(FATAL_ERROR "Cannot parse the version of OpenJPEG") endif() link_libraries(openjpeg)