vcpkg/ports/gettext-libintl/detect/CMakeLists.txt
Kai Pastor b593af97f7
[gettext-libintl] Handle atypical Linux installations (#39662)
Co-authored-by: Lily Wang <v-lilywang@microsoft.com>
2024-07-05 14:06:12 -04:00

17 lines
561 B
CMake

cmake_minimum_required(VERSION 3.20)
project(find-libintl C)
set(OUTFILE "${CMAKE_CURRENT_BINARY_DIR}/detected_intl.cmake" CACHE FILEPATH "Where to store results")
find_package(Intl)
find_file(LIBINTL_H NAMES libintl.h PATHS ${Intl_INCLUDE_DIRS})
string(CONFIGURE [[
set(VCPKG_DETECTED_Intl_FOUND "@Intl_FOUND@")
set(VCPKG_DETECTED_Intl_IS_BUILT_IN "@Intl_IS_BUILT_IN@")
set(VCPKG_DETECTED_Intl_INCLUDE_DIRS "@Intl_INCLUDE_DIRS@")
set(VCPKG_DETECTED_LIBINTL_H "@LIBINTL_H@")
]] detected_intl @ONLY ESCAPE_QUOTES)
file(WRITE "${OUTFILE}" "${detected_intl}")