diff options
Diffstat (limited to 'build_files/cmake')
-rw-r--r-- | build_files/cmake/Modules/FindOpenEXR.cmake | 3 | ||||
-rw-r--r-- | build_files/cmake/Modules/FindOpenJPEG.cmake | 67 | ||||
-rw-r--r-- | build_files/cmake/Modules/FindPythonLibsUnix.cmake | 1 | ||||
-rw-r--r-- | build_files/cmake/Modules/FindSndFile.cmake | 11 | ||||
-rw-r--r-- | build_files/cmake/macros.cmake | 2 |
5 files changed, 77 insertions, 7 deletions
diff --git a/build_files/cmake/Modules/FindOpenEXR.cmake b/build_files/cmake/Modules/FindOpenEXR.cmake index 0d4610bd926..4dc2d5d31de 100644 --- a/build_files/cmake/Modules/FindOpenEXR.cmake +++ b/build_files/cmake/Modules/FindOpenEXR.cmake @@ -63,7 +63,8 @@ SET(_openexr_LIBRARIES) FOREACH(COMPONENT ${_openexr_FIND_COMPONENTS}) STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT) - FIND_LIBRARY(OPENEXR_${UPPERCOMPONENT}_LIBRARY NAMES ${COMPONENT} + FIND_LIBRARY(OPENEXR_${UPPERCOMPONENT}_LIBRARY + NAMES ${COMPONENT} HINTS ${_openexr_SEARCH_DIRS} PATH_SUFFIXES lib64 lib ) diff --git a/build_files/cmake/Modules/FindOpenJPEG.cmake b/build_files/cmake/Modules/FindOpenJPEG.cmake new file mode 100644 index 00000000000..319d202a68f --- /dev/null +++ b/build_files/cmake/Modules/FindOpenJPEG.cmake @@ -0,0 +1,67 @@ +# - Find OpenJPEG library +# Find the native OpenJPEG includes and library +# This module defines +# OPENJPEG_INCLUDE_DIRS, where to find openjpeg.h, Set when +# OPENJPEG_INCLUDE_DIR is found. +# OPENJPEG_LIBRARIES, libraries to link against to use OpenJPEG. +# OPENJPEG_ROOT_DIR, The base directory to search for OpenJPEG. +# This can also be an environment variable. +# OPENJPEG_FOUND, If false, do not try to use OpenJPEG. +# +# also defined, but not for general use are +# OPENJPEG_LIBRARY, where to find the OpenJPEG library. + +#============================================================================= +# Copyright 2002-2009 Kitware, Inc. +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +# If OPENJPEG_ROOT_DIR was defined in the environment, use it. +IF(NOT OPENJPEG_ROOT_DIR AND NOT $ENV{OPENJPEG_ROOT_DIR} STREQUAL "") + SET(OPENJPEG_ROOT_DIR $ENV{OPENJPEG_ROOT_DIR}) +ENDIF() + +SET(_openjpeg_SEARCH_DIRS + ${OPENJPEG_ROOT_DIR} + /usr/local + /sw # Fink + /opt/local # DarwinPorts + /opt/csw # Blastwave +) + +FIND_PATH(OPENJPEG_INCLUDE_DIR openjpeg.h + HINTS + ${_openjpeg_SEARCH_DIRS} + PATH_SUFFIXES + include +) + +FIND_LIBRARY(OPENJPEG_LIBRARY + NAMES "openjpeg" + HINTS ${_openjpeg_SEARCH_DIRS} + PATH_SUFFIXES lib64 lib + ) + +# handle the QUIETLY and REQUIRED arguments and set OPENJPEG_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenJPEG DEFAULT_MSG + OPENJPEG_LIBRARY OPENJPEG_INCLUDE_DIR) + +IF(OPENJPEG_FOUND) + SET(OPENJPEG_LIBRARIES ${OPENJPEG_LIBRARY}) + SET(OPENJPEG_INCLUDE_DIRS ${OPENJPEG_INCLUDE_DIR}) +ENDIF(OPENJPEG_FOUND) + +MARK_AS_ADVANCED( + OPENJPEG_INCLUDE_DIR + OPENJPEG_LIBRARY +) diff --git a/build_files/cmake/Modules/FindPythonLibsUnix.cmake b/build_files/cmake/Modules/FindPythonLibsUnix.cmake index 07d95a53dc2..5df12c5d31b 100644 --- a/build_files/cmake/Modules/FindPythonLibsUnix.cmake +++ b/build_files/cmake/Modules/FindPythonLibsUnix.cmake @@ -3,7 +3,6 @@ # PYTHON_VERSION # PYTHON_INCLUDE_DIRS # PYTHON_LIBRARIES -# PYTHON_LIBPATH # PYTHON_LINKFLAGS # PYTHON_ROOT_DIR, The base directory to search for Python. # This can also be an environment variable. diff --git a/build_files/cmake/Modules/FindSndFile.cmake b/build_files/cmake/Modules/FindSndFile.cmake index e4c8d9f114b..5d0e1a50374 100644 --- a/build_files/cmake/Modules/FindSndFile.cmake +++ b/build_files/cmake/Modules/FindSndFile.cmake @@ -1,7 +1,7 @@ # - Find SndFile library # Find the native SndFile includes and library # This module defines -# SNDFILE_INCLUDE_DIRS, where to find ImfXdr.h, etc. Set when +# SNDFILE_INCLUDE_DIRS, where to find sndfile.h, Set when # SNDFILE_INCLUDE_DIR is found. # SNDFILE_LIBRARIES, libraries to link against to use SndFile. # SNDFILE_ROOT_DIR, The base directory to search for SndFile. @@ -44,7 +44,8 @@ FIND_PATH(SNDFILE_INCLUDE_DIR sndfile.h include ) -FIND_LIBRARY(SNDFILE_LIBRARY NAMES "sndfile" +FIND_LIBRARY(SNDFILE_LIBRARY + NAMES "sndfile" HINTS ${_sndfile_SEARCH_DIRS} PATH_SUFFIXES lib64 lib ) @@ -60,5 +61,7 @@ IF(SNDFILE_FOUND) SET(SNDFILE_INCLUDE_DIRS ${SNDFILE_INCLUDE_DIR}) ENDIF(SNDFILE_FOUND) -MARK_AS_ADVANCED(SNDFILE_INCLUDE_DIR) -MARK_AS_ADVANCED(SNDFILE_LIBRARY) +MARK_AS_ADVANCED( + SNDFILE_INCLUDE_DIR + SNDFILE_LIBRARY +) diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index 5e2db8edc47..bb3761d4539 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -266,7 +266,7 @@ macro(setup_liblinks endif() endif() if(WITH_IMAGE_OPENJPEG AND UNIX AND NOT APPLE) - target_link_libraries(${target} ${OPENJPEG_LIB}) + target_link_libraries(${target} ${OPENJPEG_LIBRARIES}) endif() if(WITH_CODEC_FFMPEG) target_link_libraries(${target} ${FFMPEG_LIBRARIES}) |