diff options
author | Brad King <brad.king@kitware.com> | 2003-06-30 14:30:38 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2003-06-30 14:30:38 (GMT) |
commit | ef76ed76f8a31f706ee675160e5c57c34b608516 (patch) | |
tree | b0bad156b6f2fb3b4bfdb57a13a55a0b2d45f0bb /Source/kwsys/CMakeLists.txt | |
parent | ac2de4f5defce85b7980d70656668d8aebc62079 (diff) | |
download | CMake-ef76ed76f8a31f706ee675160e5c57c34b608516.zip CMake-ef76ed76f8a31f706ee675160e5c57c34b608516.tar.gz CMake-ef76ed76f8a31f706ee675160e5c57c34b608516.tar.bz2 |
ENH: Added DLL support.
Diffstat (limited to 'Source/kwsys/CMakeLists.txt')
-rw-r--r-- | Source/kwsys/CMakeLists.txt | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt index dfb9828..eb80660 100644 --- a/Source/kwsys/CMakeLists.txt +++ b/Source/kwsys/CMakeLists.txt @@ -147,6 +147,19 @@ SET(KWSYS_NO_STD_NAMESPACE ${CMAKE_NO_STD_NAMESPACE}) SET(KWSYS_NO_ANSI_STREAM_HEADERS ${CMAKE_NO_ANSI_STREAM_HEADERS}) SET(KWSYS_NO_ANSI_STRING_STREAM ${CMAKE_NO_ANSI_STRING_STREAM}) +# Choose default shared/static build if not specified. +IF(KWSYS_BUILD_SHARED MATCHES "^KWSYS_BUILD_SHARED$") + SET(KWSYS_BUILD_SHARED ${BUILD_SHARED_LIBS}) +ENDIF(KWSYS_BUILD_SHARED MATCHES "^KWSYS_BUILD_SHARED$") + +IF(KWSYS_BUILD_SHARED) + SET(KWSYS_BUILD_SHARED 1) + SET(KWSYS_LIBRARY_TYPE SHARED) +ELSE(KWSYS_BUILD_SHARED) + SET(KWSYS_BUILD_SHARED 0) + SET(KWSYS_LIBRARY_TYPE STATIC) +ENDIF(KWSYS_BUILD_SHARED) + #----------------------------------------------------------------------------- # Choose a directory for the generated headers. IF(NOT KWSYS_HEADER_ROOT) @@ -192,7 +205,7 @@ ENDFOREACH(header) # Build a list of classes and headers we need to implement the # selected components. Initialize with required components. SET(KWSYS_CLASSES) -SET(KWSYS_H_FILES) +SET(KWSYS_H_FILES Configure) SET(KWSYS_HXX_FILES Configure) # Enforce component dependencies (none currently exists). @@ -283,7 +296,7 @@ ENDFOREACH(h) #----------------------------------------------------------------------------- # Add the library with the configured name and list of sources. -ADD_LIBRARY(${KWSYS_NAMESPACE} ${KWSYS_SRCS}) +ADD_LIBRARY(${KWSYS_NAMESPACE} ${KWSYS_LIBRARY_TYPE} ${KWSYS_SRCS}) # Create an install target for the library. IF(KWSYS_LIBRARY_INSTALL_DIR) |