summaryrefslogtreecommitdiffstats
path: root/config/cmake
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2010-11-16 15:26:41 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2010-11-16 15:26:41 (GMT)
commit7fd26f00b7826d36d8ec5681a17849bb17fd2cee (patch)
tree844b7ae92f767ddf74a86d734c8b9a4f7ba39425 /config/cmake
parentd9adf2d78d3374d0cf56019f8fec243dc531f4fb (diff)
downloadhdf5-7fd26f00b7826d36d8ec5681a17849bb17fd2cee.zip
hdf5-7fd26f00b7826d36d8ec5681a17849bb17fd2cee.tar.gz
hdf5-7fd26f00b7826d36d8ec5681a17849bb17fd2cee.tar.bz2
[svn-r19787] Check for CMAKE_BUILD_TYPE set if not WIN32 in library prefix naming. Unset needs prefix to be lib.
Diffstat (limited to 'config/cmake')
-rw-r--r--config/cmake/HDF5Macros.cmake10
1 files changed, 8 insertions, 2 deletions
diff --git a/config/cmake/HDF5Macros.cmake b/config/cmake/HDF5Macros.cmake
index a20e3b5..6146e66 100644
--- a/config/cmake/HDF5Macros.cmake
+++ b/config/cmake/HDF5Macros.cmake
@@ -73,8 +73,14 @@ MACRO (H5_SET_LIB_OPTIONS libtarget libname libtype)
SET (LIB_DEBUG_NAME "lib${libname}_D")
ENDIF (H5_LEGACY_NAMING)
ELSE (WIN32 AND NOT MINGW)
- SET (LIB_RELEASE_NAME "lib${libname}")
- SET (LIB_DEBUG_NAME "lib${libname}_debug")
+ # if the generator supports configuration types or if the CMAKE_BUILD_TYPE has a value
+ IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
+ SET (LIB_RELEASE_NAME "${libname}")
+ SET (LIB_DEBUG_NAME "${libname}_debug")
+ ELSE (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
+ SET (LIB_RELEASE_NAME "lib${libname}")
+ SET (LIB_DEBUG_NAME "lib${libname}_debug")
+ ENDIF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
ENDIF (WIN32 AND NOT MINGW)
ENDIF (${libtype} MATCHES "SHARED")