Merge pull request #18 from piponazo/findDependencies
Move all the cmake commands for finding dependencies into a separate filev0.27.3
commit
c890872e8a
@ -1,31 +0,0 @@
|
||||
# - Find expat
|
||||
# Find the native EXPAT headers and libraries.
|
||||
#
|
||||
# EXPAT_INCLUDE_DIRS - where to find expat.h, etc.
|
||||
# EXPAT_LIBRARIES - List of libraries when using expat.
|
||||
# EXPAT_FOUND - True if expat found.
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
# Look for the header file.
|
||||
FIND_PATH(EXPAT_INCLUDE_DIR NAMES expat.h)
|
||||
|
||||
# Look for the library.
|
||||
FIND_LIBRARY(EXPAT_LIBRARY NAMES expat libexpat)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set EXPAT_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(EXPAT DEFAULT_MSG EXPAT_LIBRARY EXPAT_INCLUDE_DIR)
|
||||
|
||||
# Copy the results to the output variables.
|
||||
IF(EXPAT_FOUND)
|
||||
SET(EXPAT_LIBRARIES ${EXPAT_LIBRARY})
|
||||
SET(EXPAT_INCLUDE_DIRS ${EXPAT_INCLUDE_DIR})
|
||||
ELSE(EXPAT_FOUND)
|
||||
SET(EXPAT_LIBRARIES)
|
||||
SET(EXPAT_INCLUDE_DIRS)
|
||||
ENDIF(EXPAT_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(EXPAT_INCLUDE_DIR EXPAT_LIBRARY)
|
@ -0,0 +1,63 @@
|
||||
# set include path for FindXXX.cmake files
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/config/")
|
||||
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
if( EXIV2_ENABLE_PNG )
|
||||
find_package( ZLIB REQUIRED )
|
||||
include_directories( ${ZLIB_INCLUDE_DIR} )
|
||||
set (HAVE_LIBZ ${ZLIB_FOUND})
|
||||
endif( EXIV2_ENABLE_PNG )
|
||||
|
||||
if( EXIV2_ENABLE_WEBREADY )
|
||||
set( ENABLE_WEBREADY 1 )
|
||||
if( EXIV2_ENABLE_CURL )
|
||||
find_package( CURL REQUIRED)
|
||||
include_directories( ${CURL_INCLUDE_DIR} )
|
||||
set ( USE_CURL 1 )
|
||||
endif()
|
||||
|
||||
if( EXIV2_ENABLE_SSH )
|
||||
find_package( SSH REQUIRED)
|
||||
include_directories( ${SSH_INCLUDE_DIR} )
|
||||
set ( USE_SSH 1 )
|
||||
endif( EXIV2_ENABLE_SSH )
|
||||
endif( EXIV2_ENABLE_WEBREADY )
|
||||
|
||||
if (EXIV2_ENABLE_XMP)
|
||||
find_package(EXPAT REQUIRED)
|
||||
include_directories(${EXPAT_INCLUDE_DIR})
|
||||
endif (EXIV2_ENABLE_XMP)
|
||||
|
||||
if( EXIV2_ENABLE_NLS )
|
||||
find_package(Intl)
|
||||
if(Intl_FOUND)
|
||||
include_directories(${Intl_INCLUDE_DIRS})
|
||||
set(LIBINTL_LIBRARIES ${Intl_LIBRARIES})
|
||||
else()
|
||||
set(LIBINTL_LIBRARIES)
|
||||
endif()
|
||||
if( NOT LOCALEDIR )
|
||||
set( LOCALEDIR "${CMAKE_INSTALL_LOCALEDIR}" )
|
||||
if( WIN32 )
|
||||
STRING( REPLACE "/" "\\\\" LOCALEDIR ${LOCALEDIR} )
|
||||
endif( WIN32 )
|
||||
endif( NOT LOCALEDIR )
|
||||
add_definitions( -DEXV_LOCALEDIR="${LOCALEDIR}" )
|
||||
set( ENABLE_NLS 1 )
|
||||
endif( EXIV2_ENABLE_NLS )
|
||||
|
||||
find_package(Iconv)
|
||||
if( ICONV_FOUND )
|
||||
set( HAVE_ICONV 1 )
|
||||
include_directories(${ICONV_INCLUDE_DIR})
|
||||
message ( "-- ICONV_LIBRARIES : " ${ICONV_LIBRARIES} )
|
||||
endif( ICONV_FOUND )
|
||||
|
||||
if( EXIV2_ENABLE_BUILD_PO )
|
||||
find_package(MSGFMT)
|
||||
if(MSGFMT_FOUND)
|
||||
message(STATUS "Program msgfmt found (${MSGFMT_EXECUTABLE})")
|
||||
set( EXIV2_BUILD_PO 1 )
|
||||
endif(MSGFMT_FOUND)
|
||||
endif()
|
Loading…
Reference in New Issue