Merge pull request #8 from bkuhls/gettext

cmake: simplify libintl check
This commit is contained in:
Robin Mills 2017-06-04 09:36:44 +01:00 committed by GitHub
commit 910f350779

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}" )