Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 20009 → Rev 20024

/branches/Version14x/Scribus/CMakeLists.txt
35,6 → 35,7
INCLUDE(CheckCXXCompilerFlag)
INCLUDE(CheckTypeSize)
INCLUDE(TestBigEndian)
INCLUDE(GNUInstallDirs)
 
#Set the custom CMake module directory where our include/lib finders are
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
274,57 → 275,85
#Setp all the directories we will use
#MAN
CMAKE_POLICY(SET CMP0005 OLD)
SET(MANDIR "share/man/")
SET(MANDIR "${CMAKE_INSTALL_DATAROOTDIR}/man/")
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()
 
#ICON
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()
 
#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.
377,8 → 406,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 ##########