BUG: Make sure to use the Win32 interface (HINSTANCE) for handling shared lib on cygwin and mingw system
This commit is contained in:
parent
1dd5db0235
commit
458fa7559b
|
@ -718,7 +718,9 @@ IF(KWSYS_C_SRCS OR KWSYS_CXX_SRCS)
|
|||
${KWSYS_C_SRCS} ${KWSYS_CXX_SRCS})
|
||||
IF(KWSYS_USE_DynamicLoader)
|
||||
IF(UNIX)
|
||||
TARGET_LINK_LIBRARIES(${KWSYS_NAMESPACE} ${CMAKE_DL_LIBS})
|
||||
IF(NOT CYGWIN AND NOT MINGW)
|
||||
TARGET_LINK_LIBRARIES(${KWSYS_NAMESPACE} ${CMAKE_DL_LIBS})
|
||||
ENDIF(NOT CYGWIN AND NOT MINGW)
|
||||
ENDIF(UNIX)
|
||||
ENDIF(KWSYS_USE_DynamicLoader)
|
||||
|
||||
|
|
|
@ -220,7 +220,7 @@ const char* DynamicLoader::LastError()
|
|||
|
||||
// ---------------------------------------------------------------
|
||||
// 3. Implementation for Windows win32 code
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
|
||||
#include <windows.h>
|
||||
#define DYNAMICLOADER_DEFINED 1
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#if defined(__hpux)
|
||||
#include <dl.h>
|
||||
#elif defined(_WIN32)
|
||||
#elif defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
|
||||
#include <windows.h>
|
||||
#elif defined(__APPLE__)
|
||||
#include <AvailabilityMacros.h>
|
||||
|
@ -56,7 +56,7 @@ public:
|
|||
// They are different on several different OS's
|
||||
#if defined(__hpux)
|
||||
typedef shl_t LibraryHandle;
|
||||
#elif defined(_WIN32)
|
||||
#elif defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
|
||||
typedef HMODULE LibraryHandle;
|
||||
#elif defined(__APPLE__)
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1030
|
||||
|
|
Loading…
Reference in New Issue