r20023 by craig - #13035: Forward port #13035 to 1.5.x.svn with some minor changes
scribus-commit
scribus-commit at lists.scribus.net
Sat Apr 25 21:42:34 UTC 2015
Author: craig
Date: Sat Apr 25 21:42:34 2015
New Revision: 20023
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20023
Log:
#13035: Forward port #13035 to 1.5.x.svn with some minor changes
Modified:
trunk/Scribus/CMakeLists.txt
trunk/Scribus/scribus/manpages/CMakeLists.txt
Modified: trunk/Scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20023&path=/trunk/Scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/CMakeLists.txt (original)
+++ trunk/Scribus/CMakeLists.txt Sat Apr 25 21:42:34 2015
@@ -27,6 +27,7 @@
INCLUDE(CheckCXXCompilerFlag)
INCLUDE(CheckTypeSize)
INCLUDE(TestBigEndian)
+INCLUDE(GNUInstallDirs)
#ENABLE_TESTING()
@@ -229,67 +230,94 @@
#Setup all the directories we will use
-#MAN
CMAKE_POLICY(SET CMP0005 OLD)
-SET(MANDIR "share/man/")
+#SHARE
IF(WANT_VERSIONING)
- SET(SHAREDIR "share/${MAIN_DIR_NAME}${TAG_VERSION}/")
+ SET(SHAREDIR "${CMAKE_INSTALL_DATAROOTDIR}/${MAIN_DIR_NAME}${TAG_VERSION}/")
ELSE(WANT_VERSIONING)
- SET(SHAREDIR "share/${MAIN_DIR_NAME}/")
+ SET(SHAREDIR "${CMAKE_INSTALL_DATAROOTDIR}/${MAIN_DIR_NAME}/")
ENDIF(WANT_VERSIONING)
-ADD_DEFINITIONS("-DSHAREDIR=\\\"${CMAKE_INSTALL_PREFIX}/${SHAREDIR}\\\"")
+IF(NOT IS_ABSOLUTE ${SHAREDIR})
+ ADD_DEFINITIONS("-DSHAREDIR=\\\"${CMAKE_INSTALL_PREFIX}/${SHAREDIR}\\\"")
+ELSE()
+ ADD_DEFINITIONS("-DSHAREDIR=\\\"${SHAREDIR}\\\"")
+ENDIF()
#SHARE - use the default on Apple as TAG_VERSION is empty
IF(WIN32 OR OS2)
- SET(DOCDIR "share/doc/")
+ SET(DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/")
ELSE (WIN32 OR OS2)
IF(TAG_VERSION OR BUILD_OSX_BUNDLE)
- SET(DOCDIR "share/doc/${MAIN_DIR_NAME}${TAG_VERSION}/")
+ SET(DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/${MAIN_DIR_NAME}${TAG_VERSION}/")
ELSE(TAG_VERSION OR BUILD_OSX_BUNDLE)
IF(NOT WANT_VERSIONING)
- SET(DOCDIR "share/doc/${MAIN_DIR_NAME}/")
+ SET(DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/${MAIN_DIR_NAME}/")
ELSE(NOT WANT_VERSIONING)
- SET(DOCDIR "share/doc/${MAIN_DIR_NAME}-${VERSION}/")
+ SET(DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/${MAIN_DIR_NAME}-${VERSION}/")
ENDIF(NOT WANT_VERSIONING)
ENDIF (TAG_VERSION OR BUILD_OSX_BUNDLE)
ENDIF (WIN32 OR OS2)
-ADD_DEFINITIONS("-DDOCDIR=\\\"${CMAKE_INSTALL_PREFIX}/${DOCDIR}\\\"")
+IF(NOT IS_ABSOLUTE ${DOCDIR})
+ ADD_DEFINITIONS("-DDOCDIR=\\\"${CMAKE_INSTALL_PREFIX}/${DOCDIR}\\\"")
+ELSE()
+ ADD_DEFINITIONS("-DDOCDIR=\\\"${DOCDIR}\\\"")
+ENDIF()
#ICONS
IF(WIN32)
- SET(ICONDIR "share/icons/")
+ SET(ICONDIR "${CMAKE_INSTALL_DATAROOTDIR}/icons/")
ELSE(WIN32)
- SET(ICONDIR "share/${MAIN_DIR_NAME}${TAG_VERSION}/icons/")
+ SET(ICONDIR "${CMAKE_INSTALL_DATAROOTDIR}/${MAIN_DIR_NAME}${TAG_VERSION}/icons/")
ENDIF(WIN32)
-ADD_DEFINITIONS("-DICONDIR=\\\"${CMAKE_INSTALL_PREFIX}/${ICONDIR}\\\"")
+IF(NOT IS_ABSOLUTE ${ICONDIR})
+ ADD_DEFINITIONS("-DICONDIR=\\\"${CMAKE_INSTALL_PREFIX}/${ICONDIR}\\\"")
+ELSE()
+ ADD_DEFINITIONS("-DICONDIR=\\\"${ICONDIR}\\\"")
+ENDIF()
#SAMPLES
-SET(SAMPLESDIR "share/${MAIN_DIR_NAME}${TAG_VERSION}/samples/")
-ADD_DEFINITIONS("-DSAMPLESDIR=\\\"${CMAKE_INSTALL_PREFIX}/${SAMPLESDIR}\\\"")
+SET(SAMPLESDIR "${CMAKE_INSTALL_DATAROOTDIR}/${MAIN_DIR_NAME}${TAG_VERSION}/samples/")
+IF(NOT IS_ABSOLUTE ${SAMPLESDIR})
+ ADD_DEFINITIONS("-DSAMPLESDIR=\\\"${CMAKE_INSTALL_PREFIX}/${SAMPLESDIR}\\\"")
+ELSE()
+ ADD_DEFINITIONS("-DSAMPLESDIR=\\\"${SAMPLESDIR}\\\"")
+ENDIF()
#SCRIPTS
-SET(SCRIPTSDIR "share/${MAIN_DIR_NAME}${TAG_VERSION}/scripts/")
-ADD_DEFINITIONS("-DSCRIPTSDIR=\\\"${CMAKE_INSTALL_PREFIX}/${SCRIPTSDIR}\\\"")
+SET(SCRIPTSDIR "${CMAKE_INSTALL_DATAROOTDIR}/${MAIN_DIR_NAME}${TAG_VERSION}/scripts/")
+IF(NOT IS_ABSOLUTE ${SCRIPTSDIR})
+ ADD_DEFINITIONS("-DSCRIPTSDIR=\\\"${CMAKE_INSTALL_PREFIX}/${SCRIPTSDIR}\\\"")
+ELSE()
+ ADD_DEFINITIONS("-DSCRIPTSDIR=\\\"${SCRIPTSDIR}\\\"")
+ENDIF()
#TEMPLATES
IF(WIN32)
- SET(TEMPLATEDIR "share/templates/")
+ SET(TEMPLATEDIR "${CMAKE_INSTALL_DATAROOTDIR}/templates/")
ELSE(WIN32)
- SET(TEMPLATEDIR "share/${MAIN_DIR_NAME}${TAG_VERSION}/templates/")
+ SET(TEMPLATEDIR "${CMAKE_INSTALL_DATAROOTDIR}/${MAIN_DIR_NAME}${TAG_VERSION}/templates/")
ENDIF(WIN32)
-ADD_DEFINITIONS("-DTEMPLATEDIR=\\\"${CMAKE_INSTALL_PREFIX}/${TEMPLATEDIR}\\\"")
+IF(NOT IS_ABSOLUTE ${TEMPLATEDIR})
+ ADD_DEFINITIONS("-DTEMPLATEDIR=\\\"${CMAKE_INSTALL_PREFIX}/${TEMPLATEDIR}\\\"")
+ELSE()
+ ADD_DEFINITIONS("-DTEMPLATEDIR=\\\"${TEMPLATEDIR}\\\"")
+ENDIF()
#QML
IF(WIN32)
- SET(QMLDIR "share/qml/")
+ SET(QMLDIR "${CMAKE_INSTALL_DATAROOTDIR}/qml/")
ELSE(WIN32)
- SET(QMLDIR "share/${MAIN_DIR_NAME}${TAG_VERSION}/qml/")
+ SET(QMLDIR "${CMAKE_INSTALL_DATAROOTDIR}/${MAIN_DIR_NAME}${TAG_VERSION}/qml/")
ENDIF(WIN32)
ADD_DEFINITIONS("-DQMLDIR=\\\"${CMAKE_INSTALL_PREFIX}/${QMLDIR}\\\"")
#DESKTOP
-SET(DESKTOPDIR "share/applications/")
-ADD_DEFINITIONS("-DDESKTOPDIR=\\\"${CMAKE_INSTALL_PREFIX}/${DESKTOPDIR}\\\"")
+SET(DESKTOPDIR "${CMAKE_INSTALL_DATAROOTDIR}/applications/")
+IF(NOT IS_ABSOLUTE ${DESKTOPDIR})
+ ADD_DEFINITIONS("-DDESKTOPDIR=\\\"${CMAKE_INSTALL_PREFIX}/${DESKTOPDIR}\\\"")
+ELSE()
+ ADD_DEFINITIONS("-DDESKTOPDIR=\\\"${DESKTOPDIR}\\\"")
+ENDIF()
# APPLICATION_DATA_DIR
# It allows specify the user configuration directory in the compile time.
@@ -349,8 +377,8 @@
ENDIF (WANT_NORPATH OR WANT_DISTROBUILD)
# Set the XDG mime stuff
-SET(MIMEDIR "share/mime/packages/")
-SET(MIMELNKDIR "share/mimelnk/application/")
+SET(MIMEDIR "${CMAKE_INSTALL_DATAROOTDIR}/mime/packages/")
+SET(MIMELNKDIR "${CMAKE_INSTALL_DATAROOTDIR}/mimelnk/application/")
##############################################################################################################
########## Build Setup ##########
Modified: trunk/Scribus/scribus/manpages/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20023&path=/trunk/Scribus/scribus/manpages/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/manpages/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/manpages/CMakeLists.txt Sat Apr 25 21:42:34 2015
@@ -4,17 +4,17 @@
INSTALL(FILES
scribus.1
- DESTINATION ${MANDIR}man1
+ DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
)
INSTALL(FILES
scribus.1.de
- DESTINATION ${MANDIR}de/man1
+ DESTINATION ${CMAKE_INSTALL_MANDIR}/de/man1
RENAME scribus.1
)
INSTALL(FILES
scribus.1.pl
- DESTINATION ${MANDIR}pl/man1
+ DESTINATION ${CMAKE_INSTALL_MANDIR}/pl/man1
RENAME scribus.1
)
More information about the scribus-commit
mailing list