[Piglit] [PATCH 2/4] cmake: Add version suffix for install paths
Dylan Baker
baker.dylan.c at gmail.com
Fri May 2 18:31:29 PDT 2014
From: Jordan Justen <jordan.l.justen at intel.com>
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.justen at intel.com>
Reviewed-by: Dylan Baker <baker.dylan.c at gmail.com>
---
CMakeLists.txt | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c2203d0..e3eddba 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -384,8 +384,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()
@@ -416,7 +422,7 @@ install (
COPYING
README
RELEASE
- DESTINATION share/doc/piglit
+ DESTINATION share/doc/piglit${PIGLIT_INSTALL_VERSION_SUFFIX}
)
install (
--
2.0.0.rc0
More information about the Piglit
mailing list