summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2012-03-27 10:24:53 +0000
committerPierre Ossman <ossman@cendio.se>2012-03-27 10:24:53 +0000
commit95e28f74a278363dc3f72b0846c23ab0587e9fd7 (patch)
tree7abddf9fcb30c935b63ffb7d590ff733bef0e0b1 /CMakeLists.txt
parent84c9467b8e8a8e9cf2bb24944fec4bb91d4caeb8 (diff)
downloadtigervnc-95e28f74a278363dc3f72b0846c23ab0587e9fd7.tar.gz
tigervnc-95e28f74a278363dc3f72b0846c23ab0587e9fd7.zip
Consolidate the installation paths and make sure we have decent defaults.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4873 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt15
1 files changed, 13 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ed1975ba..dd03a5a2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,10 +23,22 @@ set(VERSION 1.2.80)
# The RC version must always be four comma-separated numbers
set(RCVERSION 1,2,80,0)
+# Installation paths
+set(BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin")
+set(DATA_DIR "${CMAKE_INSTALL_PREFIX}/share")
+set(MAN_DIR "${DATA_DIR}/man")
+set(LOCALE_DIR "${DATA_DIR}/locale")
+set(DOC_DIR "${CMAKE_INSTALL_PREFIX}/share/doc/${CMAKE_PROJECT_NAME}-${VERSION}")
+
+if(WIN32)
+set(BIN_DIR "${CMAKE_INSTALL_PREFIX}")
+set(DOC_DIR "${CMAKE_INSTALL_PREFIX}")
+endif()
+
# Compatibility variables for the migration from autotools
add_definitions(-DPACKAGE_NAME="${CMAKE_PROJECT_NAME}")
add_definitions(-DPACKAGE_VERSION="${VERSION}")
-add_definitions(-DLOCALEDIR="${CMAKE_INSTALL_PREFIX}/share/locale")
+add_definitions(-DLOCALEDIR="${LOCALE_DIR}")
if(MSVC)
message(FATAL_ERROR "TigerVNC cannot be built with Visual Studio. Please use MinGW")
@@ -162,7 +174,6 @@ option(ENABLE_NLS "Enable translation of program messages" ON)
if(ENABLE_NLS)
# Tools
find_package(Gettext)
- set(LOCALE_DIR "${CMAKE_INSTALL_PREFIX}/share/locale")
# Gettext needs iconv
find_package(Iconv)