cmake: simplify libintl check

According to https://cmake.org/cmake/help/v3.4/module/FindIntl.html
the FindIntl module already checks for libintl.so.
This commit is contained in:
Bernd Kuhls 2017-06-04 10:13:14 +02:00
parent 88cf58613f
commit 15e0b9052e

View File

@ -98,18 +98,11 @@ ENDIF( EXIV2_ENABLE_SHARED )
IF( EXIV2_ENABLE_NLS )
FIND_PACKAGE(Intl)
if(Intl_FOUND AND NOT MSVC)
if(Intl_FOUND)
INCLUDE_DIRECTORIES(${Intl_INCLUDE_DIRS})
find_library(LIBINTL_LIBRARY NAMES intl libintl)
if(libintl_FOUND)
INCLUDE_DIRECTORIES(${Intl_INCLUDE_DIRS})
SET(LIBINTL_LIBRARIES ${LIBINTL_LIBRARY})
else()
SET(LIBINTL_LIBRARIES)
if ( APPLE OR CYGWIN )
SET(LIBINTL_LIBRARIES -lintl)
endif()
endif()
SET(LIBINTL_LIBRARIES ${Intl_LIBRARIES})
else()
SET(LIBINTL_LIBRARIES)
endif()
IF( NOT LOCALEDIR )
SET( LOCALEDIR "${CMAKE_INSTALL_LOCALEDIR}" )