customthirdparty.cmake: Optionally install libwinpthread
Some flavours of MinGW are built with the `posix` thread model, which require to copy libwinpthread-1.dll to the `bin/` directory, as opposed to those configured with the `win32` thread model. git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9612 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: d1c08685c33951fb150b94a0343e0d46d001ce4e Former-commit-id: c146217ce9bef791e0cfb41a8ac2bea4e4a07346
This commit is contained in:
parent
f38b49394a
commit
f996217509
2 changed files with 18 additions and 0 deletions
|
@ -269,6 +269,14 @@ MACRO(SD_INSTALL_CUSTOM_3RDPARTY TARGET_NAME)
|
|||
"${_MINGW_BINDIR}/*/lib"
|
||||
NO_CMAKE_FIND_ROOT_PATH
|
||||
NO_DEFAULT_PATH)
|
||||
FIND_FILE(libwinpthread_path "libwinpthread-1.dll"
|
||||
HINTS
|
||||
"${_MINGW_BINDIR}/bin"
|
||||
"${_MINGW_BINDIR}/lib"
|
||||
"${_MINGW_BINDIR}/*/bin"
|
||||
"${_MINGW_BINDIR}/*/lib"
|
||||
NO_CMAKE_FIND_ROOT_PATH
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
IF(libstdcxx_path STREQUAL "libstdcxx_path-NOTFOUND")
|
||||
MESSAGE(FATAL_ERROR "Could not find libstdc++")
|
||||
|
@ -284,6 +292,12 @@ MACRO(SD_INSTALL_CUSTOM_3RDPARTY TARGET_NAME)
|
|||
SET(_COMPILER_DLL_PATHNAMES "${libssp_path}")
|
||||
ENDIF()
|
||||
|
||||
IF(libwinpthread_path STREQUAL "libwinpthread_path-NOTFOUND")
|
||||
MESSAGE(STATUS "Could not find libwinpthread. win32 thread model assumed.")
|
||||
ELSE()
|
||||
SET(_COMPILER_DLL_PATHNAMES "${libwinpthread_path}")
|
||||
ENDIF()
|
||||
|
||||
SET(_COMPILER_DLL_PATHNAMES
|
||||
${_COMPILER_DLL_PATHNAMES}
|
||||
"${libstdcxx_path}"
|
||||
|
|
|
@ -122,6 +122,10 @@ MACRO(SD_UPDATE_SETTINGS_VERSION)
|
|||
LIST(APPEND _DLLS_TO_INSTALL "${libssp_path}")
|
||||
ENDIF()
|
||||
|
||||
IF(NOT libwinpthread_path STREQUAL "libwinpthread_path-NOTFOUND")
|
||||
LIST(APPEND _DLLS_TO_INSTALL "${libwinpthread_path}")
|
||||
ENDIF()
|
||||
|
||||
ENDIF(MINGW AND NOT CMAKE_GENERATOR STREQUAL "MSYS Makefiles")
|
||||
|
||||
# Copy the dependency DLLs found above.
|
||||
|
|
Loading…
Reference in a new issue