mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +08:00
[gettext] macOS fixes (#4849)
This commit is contained in:
parent
540776b341
commit
945e0c0f09
@ -23,10 +23,31 @@ else()
|
||||
set(HAVE_ASPRINTF 1)
|
||||
set(HAVE_WPRINTF 1)
|
||||
set(HAVE_NEWLOCALE 1)
|
||||
add_definitions(-DHAVE_NEWLOCALE=1)
|
||||
add_definitions(-DHAVE_NEWLOCALE=1)
|
||||
|
||||
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
|
||||
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
|
||||
find_package(Threads REQUIRED)
|
||||
if(NOT CMAKE_USE_PTHREADS_INIT)
|
||||
message(FATAL_ERROR "Error: Only pthreads is currently supported.")
|
||||
endif()
|
||||
|
||||
include(CheckFunctionExists)
|
||||
include(CheckIncludeFiles)
|
||||
|
||||
if(APPLE)
|
||||
set(HAVE_CFLOCALECOPYCURRENT 1)
|
||||
set(HAVE_CFPREFERENCESCOPYAPPVALUE 1)
|
||||
endif()
|
||||
check_function_exists(dcgettext HAVE_DCGETTEXT)
|
||||
check_include_files(features.h HAVE_FEATURES_H)
|
||||
check_function_exists(gettext HAVE_GETTEXT)
|
||||
check_include_files(mach-o/dyld.h HAVE_MACH_O_DYLD_H)
|
||||
check_function_exists(mempcpy HAVE_MEMPCPY)
|
||||
check_include_files(xlocale.h HAVE_XLOCALE_H)
|
||||
|
||||
configure_file(intl/libgnuintl.in.h config/libgnuintl.h @ONLY)
|
||||
configure_file(config.win32.h config/config.h COPYONLY)
|
||||
configure_file(config.unix.h.in config/config.h @ONLY)
|
||||
endif()
|
||||
|
||||
if(NOT DISABLE_INSTALL_HEADERS)
|
||||
@ -85,7 +106,14 @@ add_definitions("-DBUILDING_LIBINTL -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIB
|
||||
add_definitions("-DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -D_CRT_SECURE_NO_WARNINGS")
|
||||
|
||||
add_library(libintl ${SOURCES})
|
||||
target_link_libraries(libintl PRIVATE unofficial::iconv::libcharset unofficial::iconv::libiconv)
|
||||
target_link_libraries(libintl PRIVATE unofficial::iconv::libcharset unofficial::iconv::libiconv)
|
||||
if(APPLE)
|
||||
find_library(COREFOUNDATION_LIBRARY CoreFoundation REQUIRED)
|
||||
target_link_libraries(libintl PRIVATE ${COREFOUNDATION_LIBRARY})
|
||||
endif()
|
||||
if(NOT WIN32)
|
||||
target_link_libraries(libintl PRIVATE Threads::Threads)
|
||||
endif()
|
||||
|
||||
install(TARGETS libintl
|
||||
RUNTIME DESTINATION bin
|
||||
|
@ -1,4 +1,4 @@
|
||||
Source: gettext
|
||||
Version: 0.19-4
|
||||
Version: 0.19-5
|
||||
Description: The GNU gettext utilities are a set of tools that provides a framework to help other GNU packages produce multi-lingual messages
|
||||
Build-Depends: libiconv
|
||||
|
1009
ports/gettext/config.unix.h.in
Normal file
1009
ports/gettext/config.unix.h.in
Normal file
File diff suppressed because it is too large
Load Diff
@ -17,6 +17,7 @@ vcpkg_extract_source_archive(${ARCHIVE})
|
||||
file(COPY
|
||||
${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_LIST_DIR}/config.win32.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/config.unix.h.in
|
||||
DESTINATION ${SOURCE_PATH}/gettext-runtime
|
||||
)
|
||||
file(REMOVE ${SOURCE_PATH}/gettext-runtime/intl/libgnuintl.h ${SOURCE_PATH}/gettext-runtime/config.h)
|
||||
|
Loading…
x
Reference in New Issue
Block a user