If used, then piglit will be installed into a separate
path. For example, if '-DPIGLIT_INSTALL_VERSION=20140430'
was specified with cmake, then piglit would install
to $PREFIX/lib/piglit-20140430.

Signed-off-by: Jordan Justen <jordan.l.jus...@intel.com>
---
 CMakeLists.txt | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0c91705..a9a602c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -377,8 +377,14 @@ check_include_file(sys/stat.h  HAVE_SYS_STAT_H)
 check_include_file(unistd.h    HAVE_UNISTD_H)
 check_include_file(fcntl.h     HAVE_FCNTL_H)
 
+if(DEFINED PIGLIT_INSTALL_VERSION)
+       set(PIGLIT_INSTALL_VERSION_SUFFIX
+           "-${PIGLIT_INSTALL_VERSION}")
+else()
+       set(PIGLIT_INSTALL_VERSION_SUFFIX "")
+endif()
 set(PIGLIT_INSTALL_LIBDIR
-    "${CMAKE_INSTALL_LIBDIR}/piglit")
+    "${CMAKE_INSTALL_LIBDIR}/piglit${PIGLIT_INSTALL_VERSION_SUFFIX}")
 if(NOT IS_ABSOLUTE ${PIGLIT_INSTALL_LIBDIR})
        set(PIGLIT_INSTALL_FULL_LIBDIR 
"${CMAKE_INSTALL_PREFIX}/${PIGLIT_INSTALL_LIBDIR}")
 else()
@@ -409,7 +415,7 @@ install (
                COPYING
                README
                RELEASE
-       DESTINATION share/doc/piglit
+       DESTINATION share/doc/piglit${PIGLIT_INSTALL_VERSION_SUFFIX}
 )
 
 install (
-- 
1.9.2

_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to