mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-11 07:34:32 +00:00
[cmake] actually use libintil headers/libraries if detected
Closes #4663.
This commit is contained in:
parent
42fa841573
commit
b6202c3c86
2 changed files with 4 additions and 2 deletions
|
@ -103,7 +103,7 @@ ADD_LIBRARY(fishlib STATIC ${FISH_SRCS})
|
|||
TARGET_SOURCES(fishlib PRIVATE ${FISH_HEADERS})
|
||||
TARGET_LINK_LIBRARIES(fishlib
|
||||
${CURSES_LIBRARY} ${CURSES_EXTRA_LIBRARY} Threads::Threads ${CMAKE_DL_LIBS}
|
||||
${PCRE2_LIB} muparser)
|
||||
${PCRE2_LIB} muparser ${Intl_LIBRARIES})
|
||||
|
||||
# Define fish.
|
||||
ADD_EXECUTABLE(fish src/fish.cpp)
|
||||
|
|
|
@ -8,6 +8,7 @@ IF(WITH_GETTEXT)
|
|||
FIND_PACKAGE(Gettext)
|
||||
IF(GETTEXT_FOUND)
|
||||
SET(HAVE_GETTEXT 1)
|
||||
INCLUDE_DIRECTORIES(${Intl_INCLUDE_DIR})
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ADD_FEATURE_INFO(gettext GETTEXT_FOUND "translate messages with gettext")
|
||||
|
@ -25,7 +26,8 @@ ENDIF()
|
|||
# libintl.h can be compiled into the stdlib on some GLibC systems
|
||||
IF(Intl_FOUND AND Intl_LIBRARIES)
|
||||
SET(LIBINTL_INCLUDE "#include <libintl.h>")
|
||||
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} intl)
|
||||
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}
|
||||
|
|
Loading…
Reference in a new issue