Browse Source

Don't probe libintl if it wasn't found

It just makes CMake error out rather than continue without NLS
support.
tags/v1.6.90
Pierre Ossman 8 years ago
parent
commit
210b4b5b24
1 changed files with 6 additions and 4 deletions
  1. 6
    4
      CMakeLists.txt

+ 6
- 4
CMakeLists.txt View File

@@ -151,10 +151,12 @@ if(ENABLE_NLS)
set(GETTEXT_FOUND TRUE)
else()
find_library(LIBINTL_LIBRARY NAMES intl libintl)
check_library_exists(${LIBINTL_LIBRARY} "dgettext" "" LIBINTL_HAS_DGETTEXT)
if(LIBINTL_HAS_DGETTEXT)
set(GETTEXT_LIBRARIES ${LIBINTL_LIBRARY} ${ICONV_LIBRARIES})
set(GETTEXT_FOUND TRUE)
if(LIBINTL_LIBRARY)
check_library_exists(${LIBINTL_LIBRARY} "dgettext" "" LIBINTL_HAS_DGETTEXT)
if(LIBINTL_HAS_DGETTEXT)
set(GETTEXT_LIBRARIES ${LIBINTL_LIBRARY} ${ICONV_LIBRARIES})
set(GETTEXT_FOUND TRUE)
endif()
endif()
endif()
set(CMAKE_REQUIRED_LIBRARIES)

Loading…
Cancel
Save