summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 9 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7483948..8ada96e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,14 @@
project(locales C)
cmake_minimum_required(VERSION 2.8)
+include(GNUInstallDirs)
list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
-set(LOCALE_SOURCES locale.c categories.c categories.h)
+configure_file(config.h.in config.h)
+configure_file(locale.in 00locale.sh)
+INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})
+set(GETTEXT_PACKAGE "musl-locales")
+set(MUSL_LOCPATH ${CMAKE_INSTALL_DATAROOTDIR}/i18n/locales/musl CACHE PATH "Locales directory" FORCE)
+set(LOCALE_SOURCES locale.c categories.c categories.h config.h)
add_executable(locale ${LOCALE_SOURCES})
+install(PROGRAMS 00locale.sh DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}/profile.d")
+install(TARGETS locale DESTINATION bin)
add_subdirectory(po)