All pastes #490191 Raw Edit

malex

public text v1 · immutable
·published 2007-05-15 21:55 UTC
rendered paste body
#CMAKE SETUP
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.3 FATAL_ERROR)
SET(CMAKE_COLOR_MAKEFILE ON)
SET(CMAKE_VERBOSE_MAKEFILE OFF)

#PROJECT SETUP
PROJECT(templates)
SET (VERSION_MAJOR "1")
SET (VERSION_MINOR "3")
#SET (VERSION_PATCH "0")
#SET (VERSION_SUFFIX "SVN")
#SET (VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_SUFFIX})
SET (VERSION ${VERSION_MAJOR}.${VERSION_MINOR})
MESSAGE(STATUS "Scribus Templates ${VERSION} will be installed into ${CMAKE_INSTALL_PREFIX}")

#Setup location to install based on CMake prefix
SET(MAIN_DIR_NAME "scribus")
#Useful for installing multiple copies at the same time
IF(TAG_VERSION)
  MESSAGE(STATUS "Previously selected version tag: ${TAG_VERSION}")
  SET(WANT_VERSIONING 1)
  SET(CACHED_VERSIONING 1)
ENDIF(TAG_VERSION)
IF (WANT_VERSIONING AND NOT CACHED_VERSIONING)
  IF (NOT CUSTOM_VERSIONTAG)
    SET(TAG_VERSION "-${VERSION}" CACHE TYPE STRING)
  ELSE (NOT CUSTOM_VERSIONTAG)
    SET(TAG_VERSION ${CUSTOM_VERSIONTAG} CACHE TYPE STRING)
  ENDIF (NOT CUSTOM_VERSIONTAG)
ENDIF (WANT_VERSIONING AND NOT CACHED_VERSIONING)
#Where we will install to basically.
SET(SHAREDIR "share/${MAIN_DIR_NAME}${TAG_VERSION}/")


#Create uninstall setup
CONFIGURE_FILE(
  "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
  "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
  IMMEDIATE @ONLY)

ADD_CUSTOM_TARGET(uninstall
  "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")


#Template Files
INSTALL(DIRECTORY
    template
  DESTINATION ${SHAREDIR}
)