summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--CMakeLists.txt15
-rw-r--r--cmake/BuildPackages.cmake4
-rw-r--r--java/CMakeLists.txt2
-rw-r--r--unix/CMakeLists.txt4
-rw-r--r--unix/vncconfig/CMakeLists.txt4
-rw-r--r--unix/vncpasswd/CMakeLists.txt4
-rw-r--r--unix/x0vncserver/CMakeLists.txt4
-rw-r--r--win/vncconfig/CMakeLists.txt2
-rw-r--r--win/winvnc/CMakeLists.txt4
9 files changed, 27 insertions, 16 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)
diff --git a/cmake/BuildPackages.cmake b/cmake/BuildPackages.cmake
index 8bc25b8e..8b3527ae 100644
--- a/cmake/BuildPackages.cmake
+++ b/cmake/BuildPackages.cmake
@@ -86,5 +86,5 @@ endif() #UNIX
# Common
#
-install(FILES ${CMAKE_SOURCE_DIR}/LICENCE.TXT DESTINATION doc)
-install(FILES ${CMAKE_SOURCE_DIR}/README.txt DESTINATION doc)
+install(FILES ${CMAKE_SOURCE_DIR}/LICENCE.TXT DESTINATION ${DOC_DIR})
+install(FILES ${CMAKE_SOURCE_DIR}/README.txt DESTINATION ${DOC_DIR})
diff --git a/java/CMakeLists.txt b/java/CMakeLists.txt
index e6ced805..eb391e3a 100644
--- a/java/CMakeLists.txt
+++ b/java/CMakeLists.txt
@@ -99,5 +99,5 @@ if(NOT WIN32)
${JAVA_SRCDIR}/README
${JAVA_SRCDIR}/index.vnc
${JAVA_SRCDIR}/favicon.ico
- DESTINATION vnc/classes)
+ DESTINATION ${DATA_DIR}/vnc/classes)
endif()
diff --git a/unix/CMakeLists.txt b/unix/CMakeLists.txt
index 3ffe79c9..8b2c70eb 100644
--- a/unix/CMakeLists.txt
+++ b/unix/CMakeLists.txt
@@ -4,5 +4,5 @@ add_subdirectory(vncconfig)
add_subdirectory(vncpasswd)
add_subdirectory(x0vncserver)
-install(PROGRAMS vncserver DESTINATION bin)
-install(FILES vncserver.man DESTINATION man/man1 RENAME vncserver.1)
+install(PROGRAMS vncserver DESTINATION ${BIN_DIR})
+install(FILES vncserver.man DESTINATION ${MAN_DIR}/man1 RENAME vncserver.1)
diff --git a/unix/vncconfig/CMakeLists.txt b/unix/vncconfig/CMakeLists.txt
index 1f674790..959681f6 100644
--- a/unix/vncconfig/CMakeLists.txt
+++ b/unix/vncconfig/CMakeLists.txt
@@ -11,5 +11,5 @@ add_executable(vncconfig
target_link_libraries(vncconfig tx rfb network rdr ${X11_LIBRARIES})
-install(TARGETS vncconfig DESTINATION bin)
-install(FILES vncconfig.man DESTINATION man/man1 RENAME vncconfig.1)
+install(TARGETS vncconfig DESTINATION ${BIN_DIR})
+install(FILES vncconfig.man DESTINATION ${MAN_DIR}/man1 RENAME vncconfig.1)
diff --git a/unix/vncpasswd/CMakeLists.txt b/unix/vncpasswd/CMakeLists.txt
index 77640caa..d1425af9 100644
--- a/unix/vncpasswd/CMakeLists.txt
+++ b/unix/vncpasswd/CMakeLists.txt
@@ -5,5 +5,5 @@ add_executable(vncpasswd
target_link_libraries(vncpasswd tx rfb rdr os)
-install(TARGETS vncpasswd DESTINATION bin)
-install(FILES vncpasswd.man DESTINATION man/man1 RENAME vncpasswd.1)
+install(TARGETS vncpasswd DESTINATION ${BIN_DIR})
+install(FILES vncpasswd.man DESTINATION ${MAN_DIR}/man1 RENAME vncpasswd.1)
diff --git a/unix/x0vncserver/CMakeLists.txt b/unix/x0vncserver/CMakeLists.txt
index bdd64827..3f41db7d 100644
--- a/unix/x0vncserver/CMakeLists.txt
+++ b/unix/x0vncserver/CMakeLists.txt
@@ -23,5 +23,5 @@ else()
message(WARNING "No XTest extension. x0vncserver will be view-only.")
endif()
-install(TARGETS x0vncserver DESTINATION bin)
-install(FILES x0vncserver.man DESTINATION man/man1 RENAME x0vncserver.1)
+install(TARGETS x0vncserver DESTINATION ${BIN_DIR})
+install(FILES x0vncserver.man DESTINATION ${MAN_DIR}/man1 RENAME x0vncserver.1)
diff --git a/win/vncconfig/CMakeLists.txt b/win/vncconfig/CMakeLists.txt
index 2cee4ee4..54e6643a 100644
--- a/win/vncconfig/CMakeLists.txt
+++ b/win/vncconfig/CMakeLists.txt
@@ -9,5 +9,5 @@ add_executable(vncconfig WIN32
target_link_libraries(vncconfig rfb_win32 rfb Xregion network rdr ws2_32.lib)
install(TARGETS vncconfig
- RUNTIME DESTINATION .
+ RUNTIME DESTINATION ${BIN_DIR}
)
diff --git a/win/winvnc/CMakeLists.txt b/win/winvnc/CMakeLists.txt
index 72a007b4..94799649 100644
--- a/win/winvnc/CMakeLists.txt
+++ b/win/winvnc/CMakeLists.txt
@@ -33,9 +33,9 @@ if(BUILD_JAVA)
endif()
install(TARGETS winvnc4
- RUNTIME DESTINATION .
+ RUNTIME DESTINATION ${BIN_DIR}
)
install(TARGETS wm_hooks
- RUNTIME DESTINATION .
+ RUNTIME DESTINATION ${BIN_DIR}
)