Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Link libintl in case of Alpine #5731

Merged
merged 1 commit into from Jun 14, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/pal/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ cmake_minimum_required(VERSION 2.8.12.2)

include_directories(SYSTEM /usr/local/include)

# set kernel version to detect Alpine
EXEC_PROGRAM(uname ARGS -v OUTPUT_VARIABLE CMAKE_SYSTEM_KERNEL_VERSION)
string(FIND "${CMAKE_SYSTEM_KERNEL_VERSION}" "Alpine" PAL_SYSTEM_ALPINE)
if(PAL_SYSTEM_ALPINE EQUAL -1)
unset(PAL_SYSTEM_ALPINE)
endif()

include(configure.cmake)

project(coreclrpal)
Expand Down Expand Up @@ -245,6 +252,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL Linux)
find_library(UNWIND_ARCH NAMES unwind-x86_64)
endif()

if(PAL_SYSTEM_ALPINE)
find_library(INTL intl)
endif()

find_library(UNWIND NAMES unwind)
find_library(UNWIND_GENERIC NAMES unwind-generic)

Expand All @@ -270,6 +281,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL Linux)
target_link_libraries(coreclrpal ${UNWIND_ARCH})
endif(NOT UNWIND_ARCH STREQUAL UNWIND_ARCH-NOTFOUND)

if(NOT INTL STREQUAL INTL-NOTFOUND)
target_link_libraries(coreclrpal ${INTL})
endif(NOT INTL STREQUAL INTL-NOTFOUND)

endif(CMAKE_SYSTEM_NAME STREQUAL Linux)

if(CMAKE_SYSTEM_NAME STREQUAL NetBSD)
Expand Down