Skip to content

Commit

Permalink
Consolidate the installation paths and make sure we have decent defau…
Browse files Browse the repository at this point in the history
…lts.

git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4873 3789f03b-4d11-0410-bbf8-ca57d06f2519
  • Loading branch information
CendioOssman committed Mar 27, 2012
1 parent 84c9467 commit 95e28f7
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 16 deletions.
15 changes: 13 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions cmake/BuildPackages.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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})
2 changes: 1 addition & 1 deletion java/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
4 changes: 2 additions & 2 deletions unix/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
4 changes: 2 additions & 2 deletions unix/vncconfig/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
4 changes: 2 additions & 2 deletions unix/vncpasswd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
4 changes: 2 additions & 2 deletions unix/x0vncserver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion win/vncconfig/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}
)
4 changes: 2 additions & 2 deletions win/winvnc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}
)

0 comments on commit 95e28f7

Please sign in to comment.