# HG changeset patch # User Sebastien Jodogne # Date 1477555270 -7200 # Node ID e944d00a8a9e2887e7520e4a45bf02194e1906ea # Parent 2d7676b93a0fc7e18c7293ed84c0f7155104dd1c fix diff -r 2d7676b93a0f -r e944d00a8a9e Applications/CMakeLists.txt --- a/Applications/CMakeLists.txt Thu Oct 27 09:54:28 2016 +0200 +++ b/Applications/CMakeLists.txt Thu Oct 27 10:01:10 2016 +0200 @@ -53,6 +53,7 @@ include(CheckLibraryExists) include(FindPythonInterp) include(FindPkgConfig) +include(CheckSymbolExists) include(${ORTHANC_ROOT}/Resources/CMake/Compiler.cmake) include(${ORTHANC_ROOT}/Resources/CMake/AutoGeneratedCode.cmake) diff -r 2d7676b93a0f -r e944d00a8a9e Resources/CMake/OpenJpegConfiguration.cmake --- a/Resources/CMake/OpenJpegConfiguration.cmake Thu Oct 27 09:54:28 2016 +0200 +++ b/Resources/CMake/OpenJpegConfiguration.cmake Thu Oct 27 10:01:10 2016 +0200 @@ -124,6 +124,7 @@ CHECK_LIBRARY_EXISTS(openjpeg opj_image_create "" HAVE_OPENJPEG_LIB) if (HAVE_OPENJPEG_LIB) + set(OPENJPEG_LIB openjpeg) else() # Search for alternative name "libopenjp2.so" that is notably used by Debian CHECK_LIBRARY_EXISTS(openjp2 opj_image_create "" HAVE_OPENJP2_LIB) @@ -138,6 +139,7 @@ # Detection of the version of OpenJpeg set(CMAKE_REQUIRED_INCLUDES ${OPENJPEG_INCLUDE_DIR}) set(CMAKE_REQUIRED_LIBRARIES ${OPENJPEG_LIB}) + CHECK_SYMBOL_EXISTS(opj_destroy_decompress openjpeg.h HAVE_OPENJPEG_1) if (HAVE_OPENJPEG_1) message("Your system has OpenJPEG version 1") diff -r 2d7676b93a0f -r e944d00a8a9e ViewerPlugin/CMakeLists.txt --- a/ViewerPlugin/CMakeLists.txt Thu Oct 27 09:54:28 2016 +0200 +++ b/ViewerPlugin/CMakeLists.txt Thu Oct 27 10:01:10 2016 +0200 @@ -20,7 +20,7 @@ SET(USE_SYSTEM_ORTHANC_SDK ON CACHE BOOL "Use the system version of the Orthanc plugin SDK") # Parameters related to OpenLayers -SET(USE_SYSTEM_OPENLAYERS ON CACHE BOOL "Use the system version of OpenLayers") +SET(USE_SYSTEM_OPENLAYERS OFF CACHE BOOL "Use the system version of OpenLayers") SET(OPENLAYERS_CSS "" CACHE FILEPATH "Path to the system version of OpenLayers CSS") SET(OPENLAYERS_JS "" CACHE FILEPATH "Path to the system version of OpenLayers JavaScript") @@ -39,6 +39,7 @@ include(CheckLibraryExists) include(FindPythonInterp) include(FindPkgConfig) +include(CheckSymbolExists) include(${ORTHANC_ROOT}/Resources/CMake/Compiler.cmake) include(${ORTHANC_ROOT}/Resources/CMake/AutoGeneratedCode.cmake) @@ -128,6 +129,14 @@ ) else() + if (OPENLAYERS_CSS STREQUAL "") + message(FATAL_ERROR "The option OPENLAYERS_CSS is not set") + endif() + + if (OPENLAYERS_JS STREQUAL "") + message(FATAL_ERROR "The option OPENLAYERS_JS is not set") + endif() + set(OPENLAYERS_RESOURCES OPENLAYERS_CSS ${OPENLAYERS_CSS} OPENLAYERS_JS ${OPENLAYERS_JS}