diff --git a/cmake/gettext.cmake b/cmake/gettext.cmake index 001297bcb..b52a0a975 100644 --- a/cmake/gettext.cmake +++ b/cmake/gettext.cmake @@ -23,12 +23,12 @@ IF(GETTEXT_FOUND) ENDFOREACH() ENDIF() - +CMAKE_PUSH_CHECK_STATE() +SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${Intl_INCLUDE_DIR}) +SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${Intl_LIBRARIES}) # libintl.h can be compiled into the stdlib on some GLibC systems IF(Intl_FOUND AND Intl_LIBRARIES) SET(LIBINTL_INCLUDE "#include ") - SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${Intl_INCLUDE_DIR}) - SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${Intl_LIBRARIES}) ENDIF() CHECK_CXX_SOURCE_COMPILES(" ${LIBINTL_INCLUDE} @@ -40,3 +40,4 @@ int main () { } " HAVE__NL_MSG_CAT_CNTR) +CMAKE_POP_CHECK_STATE()