]> source.dussan.org Git - tigervnc.git/commitdiff
Use standard install dir variable names
authorPierre Ossman <ossman@cendio.se>
Fri, 1 Feb 2019 12:24:20 +0000 (13:24 +0100)
committerPierre Ossman <ossman@cendio.se>
Thu, 12 Mar 2020 11:03:52 +0000 (12:03 +0100)
This makes our builds directly compatible with most distributions
without packagers/users having to specify extra flags.

23 files changed:
CMakeLists.txt
cmake/BuildPackages.cmake
config.h.in
contrib/packages/deb/ubuntu-bionic/debian/rules
contrib/packages/deb/ubuntu-xenial/debian/rules
contrib/packages/rpm/el7/SPECS/tigervnc.spec
java/CMakeLists.txt
media/CMakeLists.txt
po/CMakeLists.txt
unix/vncconfig/CMakeLists.txt
unix/vncpasswd/CMakeLists.txt
unix/vncserver/CMakeLists.txt
unix/vncserver/vncserver.in
unix/vncserver/vncserver@.service.in
unix/vncserver/vncsession-start.in
unix/vncserver/vncsession.c
unix/x0vncserver/CMakeLists.txt
vncviewer/CMakeLists.txt
vncviewer/vncviewer.cxx
vncviewer/vncviewer.desktop.in.in
win/vncconfig/CMakeLists.txt
win/winvnc/CMakeLists.txt
win/wm_hooks/CMakeLists.txt

index 540ef944571ad390e101b10bb19afcd87b0f8fe4..72672cd013bbfea548be0ecca49251dc6a466921 100644 (file)
@@ -6,6 +6,9 @@ cmake_minimum_required(VERSION 2.8.11)
 if(POLICY CMP0022)
   cmake_policy(SET CMP0022 OLD)
 endif()
+if(${CMAKE_VERSION} VERSION_LESS "3.4.0")
+  message(WARNING "CMake 3.4.0 or newer is required to get correct default installation paths")
+endif()
 
 # Internal cmake modules
 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
@@ -27,19 +30,12 @@ set(VERSION 1.10.80)
 set(RCVERSION 1,10,80,0)
 
 # Installation paths
-set(SYSCONF_DIR "${CMAKE_INSTALL_PREFIX}/etc")
-set(BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin")
-set(SBIN_DIR "${CMAKE_INSTALL_PREFIX}/sbin")
-set(DATA_DIR "${CMAKE_INSTALL_PREFIX}/share")
-set(LIBEXEC_DIR "${CMAKE_INSTALL_PREFIX}/libexec")
-set(MAN_DIR "${DATA_DIR}/man")
-set(LOCALE_DIR "${DATA_DIR}/locale")
-set(DOC_DIR "${CMAKE_INSTALL_PREFIX}/share/doc/${CMAKE_PROJECT_NAME}-${VERSION}")
-set(UNIT_DIR "${CMAKE_INSTALL_PREFIX}/lib/systemd/system")
-
-if(WIN32)
-set(BIN_DIR "${CMAKE_INSTALL_PREFIX}")
-set(DOC_DIR "${CMAKE_INSTALL_PREFIX}")
+include(GNUInstallDirs)
+set(CMAKE_INSTALL_UNITDIR "lib/systemd/system" CACHE PATH "systemd unit files (lib/systemd/system)")
+if(IS_ABSOLUTE "${CMAKE_INSTALL_UNITDIR}")
+  set(CMAKE_INSTALL_FULL_UNITDIR "${CMAKE_INSTALL_UNITDIR}")
+else()
+  set(CMAKE_INSTALL_FULL_UNITDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_UNITDIR}")
 endif()
 
 option(INSTALL_SYSTEMD_UNITS "Install TigerVNC systemd units" ON)
index ec96318d6acd3c351562de36e414a75550343b5b..1f2519294845a01ee5ff99335556e74ea58aef7b 100644 (file)
@@ -86,5 +86,5 @@ endif() #UNIX
 # Common
 #
 
-install(FILES ${CMAKE_SOURCE_DIR}/LICENCE.TXT DESTINATION ${DOC_DIR})
-install(FILES ${CMAKE_SOURCE_DIR}/README.rst DESTINATION ${DOC_DIR})
+install(FILES ${CMAKE_SOURCE_DIR}/LICENCE.TXT DESTINATION ${CMAKE_INSTALL_FULL_DOCDIR})
+install(FILES ${CMAKE_SOURCE_DIR}/README.rst DESTINATION ${CMAKE_INSTALL_FULL_DOCDIR})
index ce594829cf2cd69bee1fd629a3a60fb40a430a8c..2d7a741a2ffc394efdcf7f28423319ea206246ea 100644 (file)
@@ -5,9 +5,9 @@
 #cmakedefine HAVE_ACTIVE_DESKTOP_L
 #cmakedefine ENABLE_NLS 1
 
-#cmakedefine LIBEXEC_DIR "@LIBEXEC_DIR@"
-#cmakedefine DATA_DIR "@DATA_DIR@"
-#cmakedefine LOCALE_DIR "@LOCALE_DIR@"
+#cmakedefine CMAKE_INSTALL_FULL_LIBEXECDIR "@CMAKE_INSTALL_FULL_LIBEXECDIR@"
+#cmakedefine CMAKE_INSTALL_FULL_DATADIR "@CMAKE_INSTALL_FULL_DATADIR@"
+#cmakedefine CMAKE_INSTALL_FULL_LOCALEDIR "@CMAKE_INSTALL_FULL_LOCALEDIR@"
 
 /* MS Visual Studio 2008 and newer doesn't know ssize_t */
 #if defined(HAVE_GNUTLS) && defined(WIN32) && !defined(__MINGW32__)
index 57e8e0ae49713cd48661399e59b6e673a9774341..e9bb8e870524dc2ff65d77504b8bfc142adadf6c 100644 (file)
@@ -57,9 +57,8 @@ config-stamp: xorg-source-stamp
        cmake -G"Unix Makefiles" \
                -DBUILD_STATIC=off \
                -DCMAKE_INSTALL_PREFIX:PATH=/usr \
-               -DSYSCONF_DIR:PATH=/etc \
-               -DLIBEXEC_DIR:PATH=/usr/lib/$(DEB_HOST_MULTIARCH) \
-               -DUNIT_DIR:PATH=/lib/systemd/system
+               -DCMAKE_INSTALL_LIBEXECDIR:PATH=lib/$(DEB_HOST_MULTIARCH) \
+               -DCMAKE_INSTALL_UNITDIR:PATH=/lib/systemd/system
        (cd unix/xserver; \
        export PIXMANINCDIR=/usr/include/pixman-1; \
        autoreconf -fiv; \
@@ -211,15 +210,14 @@ install: build
        #(cd java; make install DESTDIR=$(CURDIR)/debian/tigervnc-java/usr/share)
        # install additional license files
        mkdir -p $(CURDIR)/debian/xtigervncviewer/usr/share/doc/xtigervncviewer
-       cp $(CURDIR)/debian/tigervncserver/usr/share/doc/tigervnc-*/* \
+       cp $(CURDIR)/debian/tigervncserver/usr/share/doc/tigervnc/* \
                $(CURDIR)/debian/xtigervncviewer/usr/share/doc/xtigervncviewer/
        #mkdir -p $(CURDIR)/debian/tigervnc-java/usr/share/doc/tigervnc-java
-       #cp $(CURDIR)/debian/tigervncserver/usr/share/doc/tigervnc-*/* \
+       #cp $(CURDIR)/debian/tigervncserver/usr/share/doc/tigervnc/* \
                #$(CURDIR)/debian/tigervnc-java/usr/share/doc/tigervnc-java/
        mkdir -p $(CURDIR)/debian/tigervncserver/usr/share/doc/tigervncserver
-       mv $(CURDIR)/debian/tigervncserver/usr/share/doc/tigervnc-*/* \
-               $(CURDIR)/debian/tigervncserver/usr/share/doc/tigervncserver/
-       rm -rf $(CURDIR)/debian/tigervncserver/usr/share/doc/tigervnc-*/
+       mv $(CURDIR)/debian/tigervncserver/usr/share/doc/tigervnc \
+               $(CURDIR)/debian/tigervncserver/usr/share/doc/tigervncserver
 #      dh_movefiles
        sed 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' \
                debian/tigervncserver.postinst.in > debian/tigervncserver.postinst
index 28af8d1eba3fde4eed3e3c1a68cd979a76cad62a..f61099c074f775b03e4fe3edb0147f31d4eb98e4 100644 (file)
@@ -58,9 +58,8 @@ config-stamp: xorg-source-stamp
        cmake -G"Unix Makefiles" \
                -DBUILD_STATIC=off \
                -DCMAKE_INSTALL_PREFIX:PATH=/usr \
-               -DSYSCONF_DIR:PATH=/etc \
-               -DLIBEXEC_DIR:PATH=/usr/lib/$(DEB_HOST_MULTIARCH) \
-               -DUNIT_DIR:PATH=/lib/systemd/system
+               -DCMAKE_INSTALL_LIBEXECDIR:PATH=lib/$(DEB_HOST_MULTIARCH) \
+               -DCMAKE_INSTALL_UNITDIR:PATH=/lib/systemd/system
        (cd unix/xserver; \
        export PIXMANINCDIR=/usr/include/pixman-1; \
        autoreconf -fiv; \
@@ -212,15 +211,13 @@ install: build
        #(cd java; make install DESTDIR=$(CURDIR)/debian/tigervnc-java/usr/share)
        # install additional license files
        mkdir -p $(CURDIR)/debian/xtigervncviewer/usr/share/doc/xtigervncviewer
-       cp $(CURDIR)/debian/tigervncserver/usr/share/doc/tigervnc-*/* \
+       cp $(CURDIR)/debian/tigervncserver/usr/share/doc/tigervnc/* \
                $(CURDIR)/debian/xtigervncviewer/usr/share/doc/xtigervncviewer/
        #mkdir -p $(CURDIR)/debian/tigervnc-java/usr/share/doc/tigervnc-java
-       #cp $(CURDIR)/debian/tigervncserver/usr/share/doc/tigervnc-*/* \
+       #cp $(CURDIR)/debian/tigervncserver/usr/share/doc/tigervnc/* \
                #$(CURDIR)/debian/tigervnc-java/usr/share/doc/tigervnc-java/
-       mkdir -p $(CURDIR)/debian/tigervncserver/usr/share/doc/tigervncserver
-       mv $(CURDIR)/debian/tigervncserver/usr/share/doc/tigervnc-*/* \
-               $(CURDIR)/debian/tigervncserver/usr/share/doc/tigervncserver/
-       rm -rf $(CURDIR)/debian/tigervncserver/usr/share/doc/tigervnc-*/
+       mv $(CURDIR)/debian/tigervncserver/usr/share/doc/tigervnc \
+               $(CURDIR)/debian/tigervncserver/usr/share/doc/tigervncserver
 #      dh_movefiles
        sed 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' \
                debian/tigervncserver.postinst.in > debian/tigervncserver.postinst
index c6c34d490a53b0ac5f0302444f0a798d6e674629..46081ce045e00534838490b203755c6ddf709479 100644 (file)
@@ -151,10 +151,11 @@ export CPPFLAGS="$CXXFLAGS"
 
 export CMAKE_EXE_LINKER_FLAGS=$LDFLAGS
 
+# The cmake in RHEL is too old and doesn't set up
+# CMAKE_INSTALL_SYSCONFDIR properly
 %{cmake} -G"Unix Makefiles" \
-  -DBUILD_STATIC=off \
-  -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-  -DSYSCONF_DIR=%{_sysconfdir}
+  -DCMAKE_INSTALL_SYSCONFDIR:PATH=%{_sysconfdir} \
+  -DBUILD_STATIC=off
 make %{?_smp_mflags}
 
 pushd unix/xserver
@@ -248,7 +249,7 @@ fi
 
 %files -f %{name}.lang
 %defattr(-,root,root,-)
-%doc %{_docdir}/%{name}-%{version}/README.rst
+%doc %{_docdir}/%{name}/README.rst
 %{_bindir}/vncviewer
 %{_datadir}/applications/*
 %{_mandir}/man1/vncviewer.1*
@@ -285,7 +286,7 @@ fi
 %endif
 
 %files license
-%doc %{_docdir}/%{name}-%{version}/LICENCE.TXT
+%doc %{_docdir}/%{name}/LICENCE.TXT
 
 %files icons
 %defattr(-,root,root,-)
index 00213d5e681b2d8b7d52c070cd50d226e2fc4d84..b124fc5d9b1b0b8bb4de2f91c19113c4cf430e6f 100644 (file)
@@ -7,8 +7,6 @@ endif()
 
 find_package(Java)
 
-set(DATA_DIR "${CMAKE_INSTALL_PREFIX}/share")
-
 set(DEFAULT_JAVACFLAGS "-source 8 -target 8 -encoding UTF-8 -Xlint:all,-serial,-cast,-unchecked,-fallthrough,-dep-ann,-deprecation,-rawtypes")
 set(JAVACFLAGS ${DEFAULT_JAVACFLAGS} CACHE STRING
   "Java compiler flags (Default: ${DEFAULT_JAVACFLAGS})")
index 256d435729a5ff9d5b750198125f478d5543d318..088c72f51fe284572b736ef288e23f47688aa9e7 100644 (file)
@@ -13,11 +13,11 @@ if(CONVERT_EXECUTABLE)
   if(UNIX AND NOT APPLE)
     foreach(SIZE 16 22 24 32 48)
       install(FILES icons/tigervnc_${SIZE}.png
-        DESTINATION ${DATA_DIR}/icons/hicolor/${SIZE}x${SIZE}/apps
+        DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/icons/hicolor/${SIZE}x${SIZE}/apps
         RENAME tigervnc.png)
     endforeach()
     install(FILES icons/tigervnc.svg
-      DESTINATION ${DATA_DIR}/icons/hicolor/scalable/apps)
+      DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/icons/hicolor/scalable/apps)
   endif()
 endif()
 
index 9c8ddef34b73157997b1d82be6161939e4102083..2eb10e7b9ea98662a829735468dfb8df1c832faa 100644 (file)
@@ -46,7 +46,7 @@ foreach(lang ${po_FILES})
   )
 
   install(FILES ${mo}
-    DESTINATION "${LOCALE_DIR}/${lang}/LC_MESSAGES"
+    DESTINATION "${CMAKE_INSTALL_FULL_LOCALEDIR}/${lang}/LC_MESSAGES"
     RENAME tigervnc.mo
   )
 
index 959681f64684d076b4573922e28571b25b2df606..c3823ab0347491b2aca32769a2f5b6055b624ba2 100644 (file)
@@ -11,5 +11,5 @@ add_executable(vncconfig
 
 target_link_libraries(vncconfig tx rfb network rdr ${X11_LIBRARIES})
 
-install(TARGETS vncconfig DESTINATION ${BIN_DIR})
-install(FILES vncconfig.man DESTINATION ${MAN_DIR}/man1 RENAME vncconfig.1)
+install(TARGETS vncconfig DESTINATION ${CMAKE_INSTALL_FULL_BINDIR})
+install(FILES vncconfig.man DESTINATION ${CMAKE_INSTALL_FULL_MANDIR}/man1 RENAME vncconfig.1)
index a04ed0b9c61e57c70476d0fcec20e28e4d0b4396..9f716facaf3bdf98197b0861ecb1995bda290ce2 100644 (file)
@@ -5,5 +5,5 @@ add_executable(vncpasswd
 
 target_link_libraries(vncpasswd tx rfb os)
 
-install(TARGETS vncpasswd DESTINATION ${BIN_DIR})
-install(FILES vncpasswd.man DESTINATION ${MAN_DIR}/man1 RENAME vncpasswd.1)
+install(TARGETS vncpasswd DESTINATION ${CMAKE_INSTALL_FULL_BINDIR})
+install(FILES vncpasswd.man DESTINATION ${CMAKE_INSTALL_FULL_MANDIR}/man1 RENAME vncpasswd.1)
index 127c7a3e30d53d798d2f6bf981b99c1597f7804e..eeb4b7b0defc1c83859b3708a16adb52c49e8e39 100644 (file)
@@ -5,16 +5,16 @@ configure_file(vncserver@.service.in vncserver@.service @ONLY)
 configure_file(vncsession-start.in vncsession-start @ONLY)
 configure_file(vncserver.in vncserver @ONLY)
 
-install(TARGETS vncsession DESTINATION ${SBIN_DIR})
-install(FILES tigervnc.pam DESTINATION ${SYSCONF_DIR}/pam.d RENAME tigervnc)
-install(FILES vncsession.man DESTINATION ${MAN_DIR}/man8 RENAME vncsession.8)
-install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/vncserver DESTINATION ${LIBEXEC_DIR})
-install(FILES vncserver.man DESTINATION ${MAN_DIR}/man8 RENAME vncserver.8)
-install(FILES vncserver-config-defaults vncserver-config-mandatory DESTINATION ${SYSCONF_DIR}/tigervnc)
+install(TARGETS vncsession DESTINATION ${CMAKE_INSTALL_FULL_SBINDIR})
+install(FILES tigervnc.pam DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/pam.d RENAME tigervnc)
+install(FILES vncsession.man DESTINATION ${CMAKE_INSTALL_FULL_MANDIR}/man8 RENAME vncsession.8)
+install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/vncserver DESTINATION ${CMAKE_INSTALL_FULL_LIBEXECDIR})
+install(FILES vncserver.man DESTINATION ${CMAKE_INSTALL_FULL_MANDIR}/man8 RENAME vncserver.8)
+install(FILES vncserver-config-defaults vncserver-config-mandatory DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/tigervnc)
 
-install(FILES vncserver.users DESTINATION ${SYSCONF_DIR}/tigervnc)
+install(FILES vncserver.users DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/tigervnc)
 
 if(INSTALL_SYSTEMD_UNITS)
-  install(FILES ${CMAKE_CURRENT_BINARY_DIR}/vncserver@.service DESTINATION ${UNIT_DIR})
-  install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/vncsession-start DESTINATION ${LIBEXEC_DIR})
+  install(FILES ${CMAKE_CURRENT_BINARY_DIR}/vncserver@.service DESTINATION ${CMAKE_INSTALL_FULL_UNITDIR})
+  install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/vncsession-start DESTINATION ${CMAKE_INSTALL_FULL_LIBEXECDIR})
 endif()
index 68a39af07c0d636851287079a3ceb056e783d59d..9f3a475017a4c334eb20310168c1d6c67fc465f5 100755 (executable)
@@ -238,7 +238,7 @@ push(@cmd, $Xsession, $session{'Exec'});
 push(@cmd, '--');
 
 # We build up our Xvnc command with options
-push(@cmd, "@BIN_DIR@/Xvnc", ":$displayNumber");
+push(@cmd, "@CMAKE_INSTALL_FULL_BINDIR@/Xvnc", ":$displayNumber");
 
 foreach my $k (sort keys %config) {
   push(@cmd, "-$k");
index 51c9a2c9da538e9804f47416ac3a12af151cd185..584ecf4b1c585c4a879554f4a2fc871d823598a0 100644 (file)
@@ -35,7 +35,7 @@ After=syslog.target network.target
 
 [Service]
 Type=forking
-ExecStart=/usr/libexec/vncsession-start %i
+ExecStart=@CMAKE_INSTALL_FULL_LIBEXECDIR@/vncsession-start %i
 PIDFile=/var/run/vncsession-%i.pid
 SELinuxContext=system_u:system_r:vnc_session_t:s0
 
index b4a6e0070af153c1be239dfb3948696cedfa767a..b20fcdd97f6a5701154b81d3459d5030890cbd63 100644 (file)
@@ -18,7 +18,7 @@
 #  USA.
 #
 
-USERSFILE="@SYSCONF_DIR@/tigervnc/vncserver.users"
+USERSFILE="@CMAKE_INSTALL_FULL_SYSCONFDIR@/tigervnc/vncserver.users"
 
 if [ $# -ne 1 ]; then
        echo "Syntax:" >&2
@@ -40,4 +40,4 @@ if [ -z "${USER}" ]; then
        exit 1
 fi
 
-exec "@SBIN_DIR@/vncsession" "${USER}" "${DISPLAY}"
+exec "@CMAKE_INSTALL_FULL_SBINDIR@/vncsession" "${USER}" "${DISPLAY}"
index d2d328e89a45e728d1698bae6c01360f6cdb4040..06c07d48142b33ac77558f4130eff3d7fa050b81 100644 (file)
@@ -461,7 +461,7 @@ run_script(const char *username, const char *display, char **envp)
     setenv("USER", pwent->pw_name, 1);
     setenv("USERNAME", pwent->pw_name, 1);
 
-    child_argv[0] = LIBEXEC_DIR "/vncserver";
+    child_argv[0] = CMAKE_INSTALL_FULL_LIBEXECDIR "/vncserver";
     child_argv[1] = display;
     child_argv[2] = NULL;
 
index 8beade7e4c11ddc76d022f4c8c9fd19996468acf..af8241506aabdcdafd7437f7c2a09ab7ca027646 100644 (file)
@@ -52,5 +52,5 @@ endif()
 
 target_link_libraries(x0vncserver ${X11_LIBRARIES})
 
-install(TARGETS x0vncserver DESTINATION ${BIN_DIR})
-install(FILES x0vncserver.man DESTINATION ${MAN_DIR}/man1 RENAME x0vncserver.1)
+install(TARGETS x0vncserver DESTINATION ${CMAKE_INSTALL_FULL_BINDIR})
+install(FILES x0vncserver.man DESTINATION ${CMAKE_INSTALL_FULL_MANDIR}/man1 RENAME x0vncserver.1)
index caf6d7a82cd48d1f28dc5cae674409541a86d5a8..a2048f29851304586dc62f0ae5727fa7ff074bcb 100644 (file)
@@ -61,9 +61,9 @@ if(APPLE)
   target_link_libraries(vncviewer "-framework IOKit")
 endif()
 
-install(TARGETS vncviewer DESTINATION ${BIN_DIR})
+install(TARGETS vncviewer DESTINATION ${CMAKE_INSTALL_FULL_BINDIR})
 if(UNIX)
-  install(FILES vncviewer.man DESTINATION ${MAN_DIR}/man1 RENAME vncviewer.1)
+  install(FILES vncviewer.man DESTINATION ${CMAKE_INSTALL_FULL_MANDIR}/man1 RENAME vncviewer.1)
 
   configure_file(vncviewer.desktop.in.in vncviewer.desktop.in)
   find_program(INTLTOOL_MERGE_EXECUTABLE intltool-merge)
@@ -92,10 +92,10 @@ if(UNIX)
     )
   endif()
   add_custom_target(desktop ALL DEPENDS vncviewer.desktop)
-  install(FILES ${CMAKE_CURRENT_BINARY_DIR}/vncviewer.desktop DESTINATION ${DATA_DIR}/applications)
+  install(FILES ${CMAKE_CURRENT_BINARY_DIR}/vncviewer.desktop DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/applications)
 
   foreach(res 16 22 24 32 48)
-    install(FILES ../media/icons/tigervnc_${res}.png DESTINATION ${DATA_DIR}/icons/hicolor/${res}x${res}/apps RENAME tigervnc.png)
+    install(FILES ../media/icons/tigervnc_${res}.png DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/icons/hicolor/${res}x${res}/apps RENAME tigervnc.png)
   endforeach()
-  install(FILES ../media/icons/tigervnc.svg DESTINATION ${DATA_DIR}/icons/hicolor/scalable/apps)
+  install(FILES ../media/icons/tigervnc.svg DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/icons/hicolor/scalable/apps)
 endif()
index 32278bc1ad31e5450285b0c0560cc4d59f0e8ce1..39a267c080bdacaa0aeaabc9c93793d0e8f0cc38 100644 (file)
@@ -227,7 +227,7 @@ static void init_fltk()
       bool exists;
 
       sprintf(icon_path, "%s/icons/hicolor/%dx%d/apps/tigervnc.png",
-              DATA_DIR, icon_sizes[i], icon_sizes[i]);
+              CMAKE_INSTALL_FULL_DATADIR, icon_sizes[i], icon_sizes[i]);
 
 #ifndef WIN32
       struct stat st;
@@ -505,7 +505,7 @@ int main(int argc, char** argv)
   argv0 = argv[0];
 
   setlocale(LC_ALL, "");
-  bindtextdomain(PACKAGE_NAME, LOCALE_DIR);
+  bindtextdomain(PACKAGE_NAME, CMAKE_INSTALL_FULL_LOCALEDIR);
   textdomain(PACKAGE_NAME);
 
   rfb::SecurityClient::setDefaults();
index d775ddec2882f79c67b4119ec5166235487190c5..9d658e447ab0ecdf414e3dbee04bce3f50d4c74e 100644 (file)
@@ -2,7 +2,7 @@
 Name=TigerVNC Viewer
 GenericName=Remote Desktop Viewer
 Comment=Connect to VNC server and display remote desktop
-Exec=@BIN_DIR@/vncviewer
+Exec=@CMAKE_INSTALL_FULL_BINDIR@/vncviewer
 Icon=tigervnc
 Terminal=false
 Type=Application
index 6ed22c762405a5909c9f8ac94f24c9733dcb63d9..6b620e5335b343f483c82f04dc0f8f7e3c3f9880 100644 (file)
@@ -9,5 +9,5 @@ add_executable(vncconfig WIN32
 target_link_libraries(vncconfig rfb_win32 rfb network rdr ws2_32.lib)
 
 install(TARGETS vncconfig
-  RUNTIME DESTINATION ${BIN_DIR}
+  RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
 )
index 113796c89cc5c57c920f67307a999ef3f5a0bd80..034211c5ec5d798a8581452693b55ceb3a5a0569 100644 (file)
@@ -14,5 +14,5 @@ add_executable(winvnc4 WIN32
 target_link_libraries(winvnc4 rfb rfb_win32 network rdr ws2_32.lib)
 
 install(TARGETS winvnc4
-  RUNTIME DESTINATION ${BIN_DIR}
+  RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
 )
index 02bdb1f0883ce4bbba8f7ef2747c4d41d816624a..c8888ab747e7305cf25595a782103e49fcea2b4f 100644 (file)
@@ -8,5 +8,5 @@ add_library(wm_hooks SHARED
 set_target_properties(wm_hooks PROPERTIES PREFIX "")
 
 install(TARGETS wm_hooks
-  RUNTIME DESTINATION ${BIN_DIR}
+  RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
 )