GSchemaCommonRules.cmake added.

This commit is contained in:
Kolan Sh 2015-09-30 16:25:29 +03:00
parent bcf06bedc5
commit e294fa055e
1 changed files with 8 additions and 0 deletions

8
GSchemaCommonRules.cmake Normal file
View File

@ -0,0 +1,8 @@
SET (GSCHEMAS_INSTALL_DIR "share/glib-2.0/schemas")
SET (GSCHEMAS_TARGET_DIR "${CMAKE_BINARY_DIR}/${GSCHEMAS_INSTALL_DIR}")
FILE (MAKE_DIRECTORY "${GSCHEMAS_TARGET_DIR}")
EXECUTE_PROCESS (COMMAND glib-compile-schemas "--targetdir=${GSCHEMAS_TARGET_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")
INSTALL (FILES "${GSchemaFile}" DESTINATION "${GSCHEMAS_INSTALL_DIR}")
IF (WIN32)
INSTALL (FILES "${GSCHEMAS_TARGET_DIR}/gschemas.compiled" DESTINATION "${GSCHEMAS_INSTALL_DIR}")
ENDIF (WIN32)