mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-23 11:07:10 +01:00
[gettext] Set includes correctly in target (#5463)
This commit is contained in:
parent
3a7c94a19e
commit
68039e4572
@ -3,8 +3,6 @@ project(libintl C)
|
|||||||
|
|
||||||
find_package(unofficial-iconv REQUIRED)
|
find_package(unofficial-iconv REQUIRED)
|
||||||
|
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR}/config .)
|
|
||||||
|
|
||||||
set(CMAKE_STATIC_LIBRARY_PREFIX)
|
set(CMAKE_STATIC_LIBRARY_PREFIX)
|
||||||
set(CMAKE_SHARED_LIBRARY_PREFIX)
|
set(CMAKE_SHARED_LIBRARY_PREFIX)
|
||||||
|
|
||||||
@ -23,27 +21,28 @@ else()
|
|||||||
set(HAVE_ASPRINTF 1)
|
set(HAVE_ASPRINTF 1)
|
||||||
set(HAVE_WPRINTF 1)
|
set(HAVE_WPRINTF 1)
|
||||||
set(HAVE_NEWLOCALE 1)
|
set(HAVE_NEWLOCALE 1)
|
||||||
add_definitions(-DHAVE_NEWLOCALE=1)
|
add_definitions(-DHAVE_NEWLOCALE=1)
|
||||||
|
add_definitions(-DHAVE_NEWLOCALE=1)
|
||||||
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
|
|
||||||
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
|
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
|
||||||
find_package(Threads REQUIRED)
|
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
|
||||||
if(NOT CMAKE_USE_PTHREADS_INIT)
|
find_package(Threads REQUIRED)
|
||||||
message(FATAL_ERROR "Error: Only pthreads is currently supported.")
|
if(NOT CMAKE_USE_PTHREADS_INIT)
|
||||||
endif()
|
message(FATAL_ERROR "Error: Only pthreads is currently supported.")
|
||||||
|
endif()
|
||||||
include(CheckFunctionExists)
|
|
||||||
include(CheckIncludeFiles)
|
include(CheckFunctionExists)
|
||||||
|
include(CheckIncludeFiles)
|
||||||
if(APPLE)
|
|
||||||
set(HAVE_CFLOCALECOPYCURRENT 1)
|
if(APPLE)
|
||||||
set(HAVE_CFPREFERENCESCOPYAPPVALUE 1)
|
set(HAVE_CFLOCALECOPYCURRENT 1)
|
||||||
endif()
|
set(HAVE_CFPREFERENCESCOPYAPPVALUE 1)
|
||||||
check_function_exists(dcgettext HAVE_DCGETTEXT)
|
endif()
|
||||||
check_include_files(features.h HAVE_FEATURES_H)
|
check_function_exists(dcgettext HAVE_DCGETTEXT)
|
||||||
check_function_exists(gettext HAVE_GETTEXT)
|
check_include_files(features.h HAVE_FEATURES_H)
|
||||||
check_include_files(mach-o/dyld.h HAVE_MACH_O_DYLD_H)
|
check_function_exists(gettext HAVE_GETTEXT)
|
||||||
check_function_exists(mempcpy HAVE_MEMPCPY)
|
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)
|
check_include_files(xlocale.h HAVE_XLOCALE_H)
|
||||||
|
|
||||||
configure_file(intl/libgnuintl.in.h config/libgnuintl.h @ONLY)
|
configure_file(intl/libgnuintl.in.h config/libgnuintl.h @ONLY)
|
||||||
@ -106,13 +105,19 @@ 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_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})
|
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_include_directories(libintl PUBLIC
|
||||||
target_link_libraries(libintl PRIVATE ${COREFOUNDATION_LIBRARY})
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/config>
|
||||||
endif()
|
$<INSTALL_INTERFACE:include>
|
||||||
if(NOT WIN32)
|
)
|
||||||
target_link_libraries(libintl PRIVATE Threads::Threads)
|
|
||||||
|
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()
|
endif()
|
||||||
|
|
||||||
install(TARGETS libintl
|
install(TARGETS libintl
|
||||||
@ -135,3 +140,8 @@ find_dependency(unofficial-iconv)
|
|||||||
find_dependency(Threads)
|
find_dependency(Threads)
|
||||||
include(\${CMAKE_CURRENT_LIST_DIR}/unofficial-gettext-targets.cmake)
|
include(\${CMAKE_CURRENT_LIST_DIR}/unofficial-gettext-targets.cmake)
|
||||||
")
|
")
|
||||||
|
|
||||||
|
install(
|
||||||
|
FILES ${CMAKE_CURRENT_BINARY_DIR}/unofficial-gettext-config.cmake
|
||||||
|
DESTINATION share/unofficial-gettext
|
||||||
|
)
|
@ -1,4 +1,4 @@
|
|||||||
Source: gettext
|
Source: gettext
|
||||||
Version: 0.19-7
|
Version: 0.19-8
|
||||||
Description: The GNU gettext utilities are a set of tools that provides a framework to help other GNU packages produce multi-lingual messages. Provides libintl.
|
Description: The GNU gettext utilities are a set of tools that provides a framework to help other GNU packages produce multi-lingual messages. Provides libintl.
|
||||||
Build-Depends: libiconv
|
Build-Depends: libiconv
|
||||||
|
Loading…
x
Reference in New Issue
Block a user