diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2011-01-04 18:23:24 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2011-01-04 18:23:24 (GMT) |
commit | 3771df0757094854a676be888e777e1d4c690aa7 (patch) | |
tree | 82f56039821bb1468c3d7d92badb01b4418d59d1 /config | |
parent | dfd0f597b1eda415d4f0db04d9717ec479b2c89f (diff) | |
download | hdf5-3771df0757094854a676be888e777e1d4c690aa7.zip hdf5-3771df0757094854a676be888e777e1d4c690aa7.tar.gz hdf5-3771df0757094854a676be888e777e1d4c690aa7.tar.bz2 |
[svn-r19906] Windows: Correct how fortran links in CRT library. Also correct macro use for checking libtype.
Tested: Windows
Diffstat (limited to 'config')
-rw-r--r-- | config/cmake/HDF5Macros.cmake | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/config/cmake/HDF5Macros.cmake b/config/cmake/HDF5Macros.cmake index 5e41f35..808f7c4 100644 --- a/config/cmake/HDF5Macros.cmake +++ b/config/cmake/HDF5Macros.cmake @@ -34,16 +34,16 @@ MACRO (IDE_SOURCE_PROPERTIES SOURCE_PATH HEADERS SOURCES) ENDMACRO (IDE_SOURCE_PROPERTIES) #------------------------------------------------------------------------------- -MACRO (H5_NAMING target) +MACRO (H5_NAMING target libtype) IF (WIN32 AND NOT MINGW) - IF (BUILD_SHARED_LIBS) + IF (${libtype} MATCHES "SHARED") IF (H5_LEGACY_NAMING) SET_TARGET_PROPERTIES (${target} PROPERTIES OUTPUT_NAME "dll") SET_TARGET_PROPERTIES (${target} PROPERTIES PREFIX "${target}") ELSE (H5_LEGACY_NAMING) SET_TARGET_PROPERTIES (${target} PROPERTIES OUTPUT_NAME "${target}dll") ENDIF (H5_LEGACY_NAMING) - ENDIF (BUILD_SHARED_LIBS) + ENDIF (${libtype} MATCHES "SHARED") ENDIF (WIN32 AND NOT MINGW) ENDMACRO (H5_NAMING) @@ -93,16 +93,16 @@ MACRO (H5_SET_LIB_OPTIONS libtarget libname libtype) ) #----- Use MSVC Naming conventions for Shared Libraries - IF (MINGW AND BUILD_SHARED_LIBS) + IF (MINGW AND ${libtype} MATCHES "SHARED") SET_TARGET_PROPERTIES (${libtarget} PROPERTIES IMPORT_SUFFIX ".lib" IMPORT_PREFIX "" PREFIX "" ) - ENDIF (MINGW AND BUILD_SHARED_LIBS) + ENDIF (MINGW AND ${libtype} MATCHES "SHARED") - IF (BUILD_SHARED_LIBS) + IF (${libtype} MATCHES "SHARED") IF (WIN32) SET (LIBHDF_VERSION ${HDF5_PACKAGE_VERSION_MAJOR}) ELSE (WIN32) @@ -110,7 +110,7 @@ MACRO (H5_SET_LIB_OPTIONS libtarget libname libtype) ENDIF (WIN32) SET_TARGET_PROPERTIES (${libtarget} PROPERTIES VERSION ${LIBHDF_VERSION}) SET_TARGET_PROPERTIES (${libtarget} PROPERTIES SOVERSION ${LIBHDF_VERSION}) - ENDIF (BUILD_SHARED_LIBS) + ENDIF (${libtype} MATCHES "SHARED") #-- Apple Specific install_name for libraries IF (APPLE) @@ -129,15 +129,13 @@ ENDMACRO (H5_SET_LIB_OPTIONS) #------------------------------------------------------------------------------- MACRO (TARGET_FORTRAN_WIN_PROPERTIES target) IF (WIN32) - IF (BUILD_SHARED_LIBS) - IF (MSVC) - SET_TARGET_PROPERTIES (${target} - PROPERTIES - COMPILE_FLAGS "/dll" - LINK_FLAGS "/SUBSYSTEM:CONSOLE" - ) - ENDIF (MSVC) - ENDIF (BUILD_SHARED_LIBS) + IF (MSVC) + SET_TARGET_PROPERTIES (${target} + PROPERTIES + COMPILE_FLAGS "/dll" + LINK_FLAGS "/SUBSYSTEM:CONSOLE" + ) + ENDIF (MSVC) ENDIF (WIN32) ENDMACRO (TARGET_FORTRAN_WIN_PROPERTIES) |