From dbe3c9a05f4a81b4a6092d832dfdb8ec0eae7ac1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20K=C3=BCmmel?= Date: Sat, 10 Jul 2010 20:20:54 +0000 Subject: [PATCH] cmake: don't install to /usr/local/2.0 by default git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34847 a592a061-630c-0410-9148-cb99ea01b6c8 --- development/cmake/CMakeLists.txt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/development/cmake/CMakeLists.txt b/development/cmake/CMakeLists.txt index 2913288caa..6b4ff0570c 100644 --- a/development/cmake/CMakeLists.txt +++ b/development/cmake/CMakeLists.txt @@ -10,10 +10,11 @@ cmake_minimum_required(VERSION 2.6.4) if(COMMAND cmake_policy) cmake_policy(SET CMP0003 OLD) - cmake_policy(SET CMP0005 OLD) -endif(COMMAND cmake_policy) + cmake_policy(SET CMP0005 OLD) +endif() -project(lyx) +set(LYX_PROJECT lyx) +project(${LYX_PROJECT}) set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true) @@ -142,8 +143,11 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) if (UNIX) # don't use the default "/usr/local" # but respect the user-choice on the command-line - SET(CMAKE_INSTALL_PREFIX - "/usr/local/${project}${LYX_INSTALL_SUFFIX}" CACHE PATH "LyX install prefix" FORCE) + if(LYX_INSTALL_SUFFIX) + SET(CMAKE_INSTALL_PREFIX "/usr/local/lyx${LYX_INSTALL_SUFFIX}" CACHE PATH "LyX install prefix" FORCE) + else() + SET(CMAKE_INSTALL_PREFIX "/usr/local/${LYX_PROJECT}" CACHE PATH "LyX install prefix" FORCE) + endif() endif() if(WIN32) SET(CMAKE_INSTALL_PREFIX @@ -518,7 +522,7 @@ SET(CPACK_RPM_PACKAGE_VENDOR "The LyX team") # # the next ones are needed by deb SET(CPACK_PACKAGE_CONTACT "${PACKAGE_BUGREPORT}") -SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${project}-${LYX_INSTALL_SUFFIX}") +SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${LYX_PROJECT}-${LYX_INSTALL_SUFFIX}") # This is experimental, valid on _my_ system (Kornel) SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libqtgui4 (>= 4.4.3-0)")