From afd35119824638eeefc90c07286e49a45746e186 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 20 Oct 2010 11:43:37 -0500 Subject: [svn-r19653] Put back deleted library check in configure. Remove shared library check around ws2_32.lib linking in test library. Issue on windows static builds. Tested: windows --- config/cmake/ConfigureChecks.cmake | 1 + test/CMakeLists.txt | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index 3e2bad9..fc479d7 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -206,6 +206,7 @@ IF (NOT WINDOWS) ENDIF (NOT WINDOWS) CHECK_LIBRARY_EXISTS_CONCAT ("ws2_32" WSAStartup H5_HAVE_LIBWS2_32) +CHECK_LIBRARY_EXISTS_CONCAT ("wsock32" gethostbyname H5_HAVE_LIBWSOCK32) #CHECK_LIBRARY_EXISTS_CONCAT ("dl" dlopen H5_HAVE_LIBDL) CHECK_LIBRARY_EXISTS_CONCAT ("ucb" gethostname H5_HAVE_LIBUCB) CHECK_LIBRARY_EXISTS_CONCAT ("socket" connect H5_HAVE_LIBSOCKET) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 2d53499..48c0396 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -22,11 +22,9 @@ CONFIGURE_FILE (${HDF5_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY) INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR}) ADD_LIBRARY (${HDF5_TEST_LIB_TARGET} ${LIB_TYPE} ${TEST_LIB_SRCS} ${TEST_LIB_HEADERS}) -IF (BUILD_SHARED_LIBS) - IF (MSVC) - TARGET_LINK_LIBRARIES (${HDF5_TEST_LIB_TARGET} "ws2_32.lib") - ENDIF (MSVC) -ENDIF (BUILD_SHARED_LIBS) +IF (MSVC) + TARGET_LINK_LIBRARIES (${HDF5_TEST_LIB_TARGET} "ws2_32.lib") +ENDIF (MSVC) TARGET_LINK_LIBRARIES (${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET}) SET_GLOBAL_VARIABLE (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_TEST_LIB_TARGET}") H5_SET_LIB_OPTIONS (${HDF5_TEST_LIB_TARGET} ${HDF5_TEST_LIB_NAME} ${LIB_TYPE}) -- cgit v0.12