File tree Expand file tree Collapse file tree 2 files changed +9
-17
lines changed Expand file tree Collapse file tree 2 files changed +9
-17
lines changed Original file line number Diff line number Diff line change 1
1
include (GetPlatformInfo )
2
2
3
- if (OS_IS_WIN )
3
+ if (OS_IS_WIN AND ( NOT MINGW ) )
4
4
find_path (SNDFILE_INCDIR sndfile.h PATHS ${PROJECT_SOURCE_DIR} /dependencies/include; )
5
- if (MINGW )
6
- set (CMAKE_FIND_LIBRARY_SUFFIXES ".dll" )
7
- else (MINGW )
8
- set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" )
9
- endif (MINGW )
5
+ set (CMAKE_FIND_LIBRARY_SUFFIXES ".lib" )
10
6
find_library (SNDFILE_LIB NAMES sndfile libsndfile-1 PATHS ${DEPENDENCIES_DIR} NO_DEFAULT_PATH )
11
- if (MINGW )
12
- set (SNDFILE_DLL ${SNDFILE_LIB} )
13
- else (MINGW )
14
- set (CMAKE_FIND_LIBRARY_SUFFIXES ".dll" )
15
- find_library (SNDFILE_DLL NAMES sndfile libsndfile-1 PATHS ${DEPENDENCIES_DIR} NO_DEFAULT_PATH )
16
- message (STATUS "Found sndfile DLL: ${SNDFILE_DLL} " )
17
- endif (MINGW )
7
+ set (CMAKE_FIND_LIBRARY_SUFFIXES ".dll" )
8
+ find_library (SNDFILE_DLL NAMES sndfile libsndfile-1 PATHS ${DEPENDENCIES_DIR} NO_DEFAULT_PATH )
9
+ message (STATUS "Found sndfile DLL: ${SNDFILE_DLL} " )
18
10
19
11
elseif (OS_IS_WASM )
20
12
set (LIBSND_PATH "" CACHE PATH "Path to libsnd sources" )
Original file line number Diff line number Diff line change 23
23
#ifndef MU_GLOBAL_DLIB_H
24
24
#define MU_GLOBAL_DLIB_H
25
25
26
- #ifdef Q_OS_WIN
26
+ #if defined( Q_OS_WIN) && !defined(__MINGW64__)
27
27
#include < windows.h>
28
28
#else
29
29
#include < dlfcn.h>
34
34
namespace mu {
35
35
inline void * loadLib (const io::path_t & path)
36
36
{
37
- #ifdef Q_OS_WIN
37
+ #if defined( Q_OS_WIN) && !defined(__MINGW64__)
38
38
return LoadLibrary (path.toStdWString ().c_str ());
39
39
#else
40
40
return dlopen (path.c_str (), RTLD_LAZY);
@@ -43,7 +43,7 @@ inline void* loadLib(const io::path_t& path)
43
43
44
44
inline void * getLibFunc (void * libHandle, const char * funcName)
45
45
{
46
- #ifdef Q_OS_WIN
46
+ #if defined( Q_OS_WIN) && !defined(__MINGW64__)
47
47
return GetProcAddress ((HINSTANCE)libHandle, funcName);
48
48
#else
49
49
return dlsym (libHandle, funcName);
@@ -52,7 +52,7 @@ inline void* getLibFunc(void* libHandle, const char* funcName)
52
52
53
53
inline void closeLib (void * libHandle)
54
54
{
55
- #ifdef Q_OS_WIN
55
+ #if defined( Q_OS_WIN) && !defined(__MINGW64__)
56
56
UNUSED (libHandle);
57
57
return ;
58
58
#else
You can’t perform that action at this time.
0 commit comments