From 26d6409f9d8659b92956d3f388e157d3aad457b0 Mon Sep 17 00:00:00 2001
From: Brad King <brad.king@kitware.com>
Date: Thu, 4 Aug 2005 17:12:22 -0400
Subject: ENH: If VTK_LIBRARY_PROPERTIES is set then the properties it lists
 will be added to VTK library targets with SET_TARGET_PROPERTIES.  This will
 be useful to enable shared library versioning.

---
 Source/kwsys/CMakeLists.txt | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt
index 6493bc2..5b55fcd 100644
--- a/Source/kwsys/CMakeLists.txt
+++ b/Source/kwsys/CMakeLists.txt
@@ -496,6 +496,13 @@ IF(KWSYS_C_SRCS OR KWSYS_CXX_SRCS)
   ADD_LIBRARY(${KWSYS_NAMESPACE} ${KWSYS_LIBRARY_TYPE}
     ${KWSYS_C_SRCS} ${KWSYS_CXX_SRCS})
 
+  # Apply user-defined target properties to the library.
+  IF(KWSYS_PROPERTIES_CXX)
+    SET_TARGET_PROPERTIES(${KWSYS_NAMESPACE} PROPERTIES
+      ${KWSYS_PROPERTIES_CXX}
+      )
+  ENDIF(KWSYS_PROPERTIES_CXX)
+
   # Create an install target for the library.
   IF(KWSYS_LIBRARY_INSTALL_DIR)
     INSTALL_TARGETS(${KWSYS_LIBRARY_INSTALL_DIR} ${KWSYS_NAMESPACE})
@@ -506,6 +513,13 @@ ENDIF(KWSYS_C_SRCS OR KWSYS_CXX_SRCS)
 IF(KWSYS_ENABLE_C AND KWSYS_C_SRCS)
   ADD_LIBRARY(${KWSYS_NAMESPACE}_c ${KWSYS_LIBRARY_TYPE} ${KWSYS_C_SRCS})
 
+  # Apply user-defined target properties to the library.
+  IF(KWSYS_PROPERTIES_C)
+    SET_TARGET_PROPERTIES(${KWSYS_NAMESPACE} PROPERTIES
+      ${KWSYS_PROPERTIES_C}
+      )
+  ENDIF(KWSYS_PROPERTIES_C)
+
   # Create an install target for the library.
   IF(KWSYS_LIBRARY_INSTALL_DIR)
     INSTALL_TARGETS(${KWSYS_LIBRARY_INSTALL_DIR} ${KWSYS_NAMESPACE}_c)
-- 
cgit v0.12