summaryrefslogtreecommitdiffstats
path: root/Source/kwsys
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2004-06-04 18:59:05 (GMT)
committerBrad King <brad.king@kitware.com>2004-06-04 18:59:05 (GMT)
commit23b81b7469acd54ae250a19995119142dfd45ce9 (patch)
tree941631c7194dbcdf30c4ffcbaf8650b53072f485 /Source/kwsys
parent30e1007048289ee565f475dcd0dd1a488bc8a665 (diff)
downloadCMake-23b81b7469acd54ae250a19995119142dfd45ce9.zip
CMake-23b81b7469acd54ae250a19995119142dfd45ce9.tar.gz
CMake-23b81b7469acd54ae250a19995119142dfd45ce9.tar.bz2
ERR: Do not add the library if no sources are used.
Diffstat (limited to 'Source/kwsys')
-rw-r--r--Source/kwsys/CMakeLists.txt14
1 files changed, 8 insertions, 6 deletions
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt
index 16c73d5..a5f9719 100644
--- a/Source/kwsys/CMakeLists.txt
+++ b/Source/kwsys/CMakeLists.txt
@@ -329,12 +329,14 @@ ENDFOREACH(h)
#-----------------------------------------------------------------------------
# Add the library with the configured name and list of sources.
-ADD_LIBRARY(${KWSYS_NAMESPACE} ${KWSYS_LIBRARY_TYPE} ${KWSYS_SRCS})
-
-# Create an install target for the library.
-IF(KWSYS_LIBRARY_INSTALL_DIR)
- INSTALL_TARGETS(${KWSYS_LIBRARY_INSTALL_DIR} ${KWSYS_NAMESPACE})
-ENDIF(KWSYS_LIBRARY_INSTALL_DIR)
+IF(KWSYS_SRCS)
+ ADD_LIBRARY(${KWSYS_NAMESPACE} ${KWSYS_LIBRARY_TYPE} ${KWSYS_SRCS})
+
+ # Create an install target for the library.
+ IF(KWSYS_LIBRARY_INSTALL_DIR)
+ INSTALL_TARGETS(${KWSYS_LIBRARY_INSTALL_DIR} ${KWSYS_NAMESPACE})
+ ENDIF(KWSYS_LIBRARY_INSTALL_DIR)
+ENDIF(KWSYS_SRCS)
# For building kwsys itself, we use a macro defined on the command
# line to configure the namespace in the C and C++ source files.