GettextCommonRules.cmake added.
This commit is contained in:
parent
2b04b0acc2
commit
16f08b6a98
|
@ -0,0 +1,36 @@
|
|||
SET (GETTEXT_PACKAGE "${PROJECT_LOWERCASE_NAME}-${MAJOR}")
|
||||
ADD_DEFINITIONS (-DGETTEXT_PACKAGE="${GETTEXT_PACKAGE}")
|
||||
|
||||
# FIXME: Custom locale directory
|
||||
IF (WIN32)
|
||||
SET (LOCALEDIR "")
|
||||
ELSE ()
|
||||
SET (LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/locale")
|
||||
ENDIF ()
|
||||
SET (CUSTOM_LOCALEDIR "" CACHE STRING "Directory to install l10n files into")
|
||||
IF (NOT CUSTOM_LOCALEDIR STREQUAL "")
|
||||
SET (LOCALEDIR "${CUSTOM_LOCALEDIR}")
|
||||
MESSAGE(STATUS "Using LOCALEDIR=${LOCALEDIR}")
|
||||
ENDIF ()
|
||||
ADD_DEFINITIONS (-DLOCALEDIR="${LOCALEDIR}")
|
||||
SET (LOCALE_INSTALL_DIR "share/locale")
|
||||
|
||||
# by all langs
|
||||
INCLUDE (MacroOptionalAddSubdirectory)
|
||||
FIND_PACKAGE (Gettext REQUIRED)
|
||||
MACRO_OPTIONAL_ADD_SUBDIRECTORY (langs)
|
||||
|
||||
# configure a header file for Gettext
|
||||
STRING (TOUPPER "${CMAKE_PROJECT_NAME}" GettextUniqueHeader)
|
||||
CONFIGURE_FILE (
|
||||
"gettext-config.h.in"
|
||||
"${PROJECT_BINARY_DIR}/po/gettext-config.h"
|
||||
)
|
||||
|
||||
# check for msgmerge utility
|
||||
IF (NOT GETTEXT_MSGMERGE_EXECUTABLE)
|
||||
MESSAGE (FATAL_ERROR "Please install msgmerge binary")
|
||||
ENDIF (NOT GETTEXT_MSGMERGE_EXECUTABLE)
|
||||
IF (NOT GETTEXT_MSGFMT_EXECUTABLE)
|
||||
MESSAGE(FATAL_ERROR "Please install msgmerge binary")
|
||||
ENDIF (NOT GETTEXT_MSGFMT_EXECUTABLE)
|
|
@ -1,6 +1,6 @@
|
|||
INCLUDE (FindVala)
|
||||
INCLUDE (UseVala)
|
||||
INCLUDE (CFlags)
|
||||
INCLUDE (CFlagsCommonRules)
|
||||
FIND_PACKAGE (PkgConfig REQUIRED)
|
||||
|
||||
SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/run") # Avoid of "dll not found" messages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
INCLUDE (FindVala)
|
||||
INCLUDE (UseVala)
|
||||
INCLUDE (CFlags)
|
||||
INCLUDE (CFlagsCommonRules)
|
||||
FIND_PACKAGE (PkgConfig REQUIRED)
|
||||
|
||||
IF (WIN32)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
INCLUDE (FindVala)
|
||||
INCLUDE (UseVala)
|
||||
INCLUDE (CFlags)
|
||||
INCLUDE (CFlagsCommonRules)
|
||||
FIND_PACKAGE (PkgConfig REQUIRED)
|
||||
|
||||
VALA_PRECOMPILE (VALA_C ${PluginSources}
|
||||
|
|
Loading…
Reference in New Issue