# Find Quicktime # # This module defines # Quicktime_FOUND # Quicktime_INCLUDE_DIRS # Quicktime_LIBRARIES # Quicktime_BINARIES_DEBUG # Quicktime_BINARIES_RELEASE # # Copyright (c) 2012 I-maginer # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License along with # this program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place - Suite 330, Boston, MA 02111-1307, USA, or go to # http://www.gnu.org/copyleft/lesser.txt # # On a new cmake run, we do not need to be verbose IF(Quicktime_INCLUDE_DIR AND Quicktime_LIBRARY) SET(Quicktime_FIND_QUIETLY TRUE) ENDIF() # If Quicktime_ROOT was defined in the environment, use it. if (NOT Quicktime_ROOT) if(NOT "$ENV{QUICKTIME_ROOT}" STREQUAL "") set(Quicktime_ROOT $ENV{QUICKTIME_ROOT}) else() set(Quicktime_ROOT "$ENV{ProgramFiles(x86)}/QuickTime\ SDK" "$ENV{ProgramFiles}/QuickTime\ SDK" "$ENV{SCOL_DEPENDENCIES_PATH}/QuickTime") endif() endif() # concat all the search paths IF(Quicktime_ROOT) SET(Quicktime_INCLUDE_SEARCH_DIRS ${Quicktime_INCLUDE_SEARCH_DIRS} ${Quicktime_ROOT}/CIncludes ) SET(Quicktime_LIBRARY_SEARCH_DIRS ${Quicktime_LIBRARY_SEARCH_DIRS} ${Quicktime_ROOT}/Libraries ) ENDIF() # log message IF (NOT Quicktime_FIND_QUIETLY) MESSAGE(STATUS "Checking for Quicktime library") ENDIF() # Search for header files FIND_PATH(Quicktime_INCLUDE_DIR QuickTimeComponents.h PATHS ${Quicktime_INCLUDE_SEARCH_DIRS}) # Search for libraries files FIND_LIBRARY(Quicktime_LIBRARY QTMLClient PATHS ${Quicktime_LIBRARY_SEARCH_DIRS}) # Configure libraries for debug/release SET(Quicktime_INCLUDE_DIRS ${Quicktime_INCLUDE_DIR} CACHE STRING "Directory containing Quicktime header files") SET(Quicktime_LIBRARIES ${Quicktime_LIBRARY} CACHE STRING "Quicktime libraries files") IF(Quicktime_INCLUDE_DIR AND Quicktime_LIBRARY) SET(Quicktime_FOUND TRUE) ENDIF() # Hide those variables in GUI SET(Quicktime_INCLUDE_DIR ${Quicktime_INCLUDE_DIR} CACHE INTERNAL "") SET(Quicktime_LIBRARY ${Quicktime_LIBRARY} CACHE INTERNAL "") # log find result IF(Quicktime_FOUND) IF(NOT Quicktime_FIND_QUIETLY) MESSAGE(STATUS " libraries: ${Quicktime_LIBRARIES}") MESSAGE(STATUS " includes: ${Quicktime_INCLUDE_DIRS}") ENDIF() ELSE(Quicktime_FOUND) IF(NOT Quicktime_LIBRARIES) MESSAGE(STATUS, "Quicktime library or one of it dependencies could not be found.") ENDIF() IF(NOT Quicktime_INCLUDE_DIRS) MESSAGE(STATUS "Quicktime include files could not be found.") ENDIF() ENDIF(Quicktime_FOUND)