From 34c1da95ee824f6e337cdd13064d10c36965a5e0 Mon Sep 17 00:00:00 2001 From: Adrian Johnson Date: Sun, 3 Dec 2017 20:27:08 +1030 Subject: [PATCH 03/13] Remove unused cmake modules --- cmake/modules/FindLCMS.cmake | 84 ------------------------------------- cmake/modules/FindLIBOPENJPEG.cmake | 64 ---------------------------- 2 files changed, 148 deletions(-) delete mode 100644 cmake/modules/FindLCMS.cmake delete mode 100644 cmake/modules/FindLIBOPENJPEG.cmake diff --git a/cmake/modules/FindLCMS.cmake b/cmake/modules/FindLCMS.cmake deleted file mode 100644 index 9d162d2c..00000000 --- a/cmake/modules/FindLCMS.cmake +++ /dev/null @@ -1,84 +0,0 @@ -# - Find LCMS -# Find the LCMS includes and library -# This module defines -# LCMS_INCLUDE_DIR, where to find lcms.h -# LCMS_LIBRARIES, the libraries needed to use LCMS. -# LCMS_VERSION, The value of LCMS_VERSION defined in lcms.h -# LCMS_FOUND, If false, do not try to use LCMS. - - -# Copyright (c) 2008, Adrian Page, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -# use pkg-config to get the directories and then use these values -# in the FIND_PATH() and FIND_LIBRARY() calls -if(NOT WIN32) - find_package(PkgConfig) - pkg_check_modules(PC_LCMS lcms) - set(LCMS_DEFINITIONS ${PC_LCMS_CFLAGS_OTHER}) -endif(NOT WIN32) - -find_path(LCMS_INCLUDE_DIR lcms.h - PATHS - ${PC_LCMS_INCLUDEDIR} - ${PC_LCMS_INCLUDE_DIRS} - PATH_SUFFIXES lcms liblcms1 -) - -find_library(LCMS_LIBRARIES NAMES lcms liblcms lcms-1 liblcms-1 - PATHS - ${PC_LCMS_LIBDIR} - ${PC_LCMS_LIBRARY_DIRS} - PATH_SUFFIXES lcms -) - -if(LCMS_INCLUDE_DIR AND LCMS_LIBRARIES) - set(LCMS_FOUND TRUE) -else(LCMS_INCLUDE_DIR AND LCMS_LIBRARIES) - set(LCMS_FOUND FALSE) -endif(LCMS_INCLUDE_DIR AND LCMS_LIBRARIES) - -if(LCMS_FOUND) - set(FIND_LCMS_VERSION_SOURCE - "#include \n int main()\n {\n return LCMS_VERSION;\n }\n") - set(FIND_LCMS_VERSION_SOURCE_FILE ${CMAKE_BINARY_DIR}/CMakeTmp/FindLCMS.cxx) - file(WRITE "${FIND_LCMS_VERSION_SOURCE_FILE}" "${FIND_LCMS_VERSION_SOURCE}") - - set(FIND_LCMS_VERSION_ADD_INCLUDES - "-DINCLUDE_DIRECTORIES:STRING=${LCMS_INCLUDE_DIR}") - - try_run(LCMS_VERSION LCMS_COMPILE_RESULT - ${CMAKE_BINARY_DIR} - ${FIND_LCMS_VERSION_SOURCE_FILE} - CMAKE_FLAGS "${FIND_LCMS_VERSION_ADD_INCLUDES}" - OUTPUT_VARIABLE OUTPUT) - - if(LCMS_COMPILE_RESULT AND NOT LCMS_VERSION STREQUAL FAILED_TO_RUN) - if(NOT LCMS_FIND_QUIETLY) - string(SUBSTRING ${LCMS_VERSION} 0 1 LCMS_MAJOR_VERSION) - string(SUBSTRING ${LCMS_VERSION} 1 2 LCMS_MINOR_VERSION) - message(STATUS "Found lcms version ${LCMS_MAJOR_VERSION}.${LCMS_MINOR_VERSION}, ${LCMS_LIBRARIES}") - endif(NOT LCMS_FIND_QUIETLY) - else(LCMS_COMPILE_RESULT AND NOT LCMS_VERSION STREQUAL FAILED_TO_RUN) - if(NOT LCMS_FIND_QUIETLY) - message(STATUS "Found lcms but failed to find version ${LCMS_LIBRARIES}") - file(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log - "Find lcms version failed with the following output:\n${OUTPUT}\nFindLCMS.cxx:\n${FIND_LCMS_VERSION_SOURCE}\n\n") - endif(NOT LCMS_FIND_QUIETLY) - set(LCMS_VERSION NOTFOUND) - endif(LCMS_COMPILE_RESULT AND NOT LCMS_VERSION STREQUAL FAILED_TO_RUN) -else(LCMS_FOUND) - if(NOT LCMS_FIND_QUIETLY) - if(LCMS_FIND_REQUIRED) - message(FATAL_ERROR "Required package lcms NOT found") - else(LCMS_FIND_REQUIRED) - message(STATUS "lcms NOT found") - endif(LCMS_FIND_REQUIRED) - endif(NOT LCMS_FIND_QUIETLY) -endif(LCMS_FOUND) - -mark_as_advanced(LCMS_INCLUDE_DIR LCMS_LIBRARIES LCMS_VERSION) - diff --git a/cmake/modules/FindLIBOPENJPEG.cmake b/cmake/modules/FindLIBOPENJPEG.cmake deleted file mode 100644 index e2fccf30..00000000 --- a/cmake/modules/FindLIBOPENJPEG.cmake +++ /dev/null @@ -1,64 +0,0 @@ -# - Try to find the libopenjpeg library -# Once done this will define -# -# LIBOPENJPEG_FOUND - system has libopenjpeg -# LIBOPENJPEG_INCLUDE_DIRS - the libopenjpeg include directories -# LIBOPENJPEG_LIBRARIES - Link these to use libopenjpeg -# LIBOPENJPEG_INCLUDE_DIR is internal and deprecated for use - -# Copyright (c) 2008, Albert Astals Cid, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - - -if (LIBOPENJPEG_LIBRARIES AND LIBOPENJPEG_INCLUDE_DIR) - - # in cache already - set(LIBOPENJPEG_FOUND TRUE) - -else (LIBOPENJPEG_LIBRARIES AND LIBOPENJPEG_INCLUDE_DIR) - - #reset vars - set(LIBOPENJPEG_LIBRARIES) - set(LIBOPENJPEG_INCLUDE_DIR) - - find_package(PkgConfig REQUIRED) - pkg_check_modules(LIBOPENJPEG libopenjpeg) - - if(LIBOPENJPEG_FOUND) - add_definitions(-DUSE_OPENJPEG1) - set(LIBOPENJPEG_INCLUDE_DIR ${LIBOPENJPEG_INCLUDE_DIRS}) - else(LIBOPENJPEG_FOUND) - - find_path (LIBOPENJPEG_INCLUDE_DIR openjpeg.h PATH_SUFFIXES openjpeg) - find_library(LIBOPENJPEG_LIBRARIES openjpeg) - if(LIBOPENJPEG_INCLUDE_DIR AND LIBOPENJPEG_LIBRARIES) - - include(CheckCXXSourceCompiles) - - set(CMAKE_REQUIRED_INCLUDES ${LIBOPENJPEG_INCLUDE_DIR}) - set(CMAKE_REQUIRED_LIBRARIES ${LIBOPENJPEG_LIBRARIES}) - - check_cxx_source_compiles(" -#include -int main() -{ - int foo = OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG; - return 0; -}" - WITH_OPENJPEG_IGNORE_PCLR_CMAP_CDEF_FLAG) - - set(CMAKE_REQUIRED_INCLUDES) - set(CMAKE_REQUIRED_LIBRARIES) - - set(LIBOPENJPEG_FOUND TRUE) - endif(LIBOPENJPEG_INCLUDE_DIR AND LIBOPENJPEG_LIBRARIES) - - include(FindPackageHandleStandardArgs) - find_package_handle_standard_args(LibOpenJPEG DEFAULT_MSG LIBOPENJPEG_LIBRARIES LIBOPENJPEG_INCLUDE_DIR) - - endif (LIBOPENJPEG_FOUND) -endif (LIBOPENJPEG_LIBRARIES AND LIBOPENJPEG_INCLUDE_DIR) - -set(LIBOPENJPEG_INCLUDE_DIRS ${LIBOPENJPEG_INCLUDE_DIR}) -- 2.11.0