summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorKonstantin <ria.freelander@gmail.com>2019-02-28 08:14:54 +0000
committerKonstantin <ria.freelander@gmail.com>2019-02-28 08:14:54 +0000
commit76fcf3c822b77a987657f0832c873c465b842438 (patch)
tree1c97a47bebf49c428027709bb2c7d5cca844b773 /CMakeLists.txt
parent682c6353a7d24063be78787d45e63bfcaca78582 (diff)
parent941cf90573bc24778711199eb32d116446070101 (diff)
downloadmusl-locales-76fcf3c822b77a987657f0832c873c465b842438.tar.gz
musl-locales-76fcf3c822b77a987657f0832c873c465b842438.tar.bz2
musl-locales-76fcf3c822b77a987657f0832c873c465b842438.tar.xz
musl-locales-76fcf3c822b77a987657f0832c873c465b842438.zip
Merge branch 'master' into 'master'
de_DE locale See merge request rilian-la-te/musl-locales!8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt13
1 files changed, 10 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c393c5f..c8ac5c4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,12 +1,17 @@
project(locales C)
cmake_minimum_required(VERSION 2.8)
+
+option(LOCALE_PROFILE "Install profile file setting the MUSL_LOCPATH environment variable" ON)
+
include(GNUInstallDirs)
list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})
set(GETTEXT_PACKAGE "musl-locales")
set(MUSL_LOCPATH i18n/locales/musl CACHE PATH "Locales directory" FORCE)
configure_file(config.h.in config.h)
-configure_file(locale.in 00locale.sh)
+if(LOCALE_PROFILE)
+ configure_file(locale.in 00locale.sh)
+endif(LOCALE_PROFILE)
find_package(Intl)
set(LOCALE_SOURCES locale.c categories.c categories.h config.h)
add_executable(locale ${LOCALE_SOURCES})
@@ -16,8 +21,10 @@ endif()
target_compile_options(locale
PRIVATE $<$<COMPILE_LANGUAGE:C>:-std=gnu11 -Wno-pedantic>
)
-install(PROGRAMS ${CMAKE_BINARY_DIR}/00locale.sh DESTINATION
-"${CMAKE_INSTALL_FULL_SYSCONFDIR}/profile.d")
+if(LOCALE_PROFILE)
+ install(PROGRAMS ${CMAKE_BINARY_DIR}/00locale.sh DESTINATION
+ "${CMAKE_INSTALL_FULL_SYSCONFDIR}/profile.d")
+endif(LOCALE_PROFILE)
install(TARGETS locale DESTINATION bin)
add_subdirectory(po)
add_subdirectory(musl-po)