forked from bartvdbraak/blender
deps/windows: Fix wrong crt for libjpeg and pthreads
The msvc linker had been warning about libcmt being dragged in for a bit, finally tracked the issue down to the deps of jpeg and pthreads which both ignored our cflags. this diff changes them both to use the dynamic crt rather than the static one so they'll be in line with all our other libraries.
This commit is contained in:
parent
633fee72d5
commit
f2178b7f97
@ -18,7 +18,7 @@
|
||||
|
||||
if(WIN32)
|
||||
# cmake for windows
|
||||
set(JPEG_EXTRA_ARGS -DNASM=${NASM_PATH} -DWITH_JPEG8=ON -DCMAKE_DEBUG_POSTFIX=d)
|
||||
set(JPEG_EXTRA_ARGS -DNASM=${NASM_PATH} -DWITH_JPEG8=ON -DCMAKE_DEBUG_POSTFIX=d -DWITH_CRT_DLL=On)
|
||||
|
||||
ExternalProject_Add(external_jpeg
|
||||
URL ${JPEG_URI}
|
||||
|
@ -24,7 +24,7 @@ if(WIN32)
|
||||
set(PTHREAD_CPPFLAGS "/I. /DHAVE_CONFIG_H ")
|
||||
endif()
|
||||
|
||||
set(PTHREADS_BUILD cd ${BUILD_DIR}/pthreads/src/external_pthreads/ && cd && nmake VC-static /e CPPFLAGS=${PTHREAD_CPPFLAGS} /e XLIBS=/NODEFAULTLIB:msvcr)
|
||||
set(PTHREADS_BUILD cd ${BUILD_DIR}/pthreads/src/external_pthreads/ && cd && nmake VC-static /e CPPFLAGS=${PTHREAD_CPPFLAGS})
|
||||
|
||||
ExternalProject_Add(external_pthreads
|
||||
URL ${PTHREADS_URI}
|
||||
@ -32,6 +32,7 @@ if(WIN32)
|
||||
URL_HASH MD5=${PTHREADS_HASH}
|
||||
PREFIX ${BUILD_DIR}/pthreads
|
||||
CONFIGURE_COMMAND echo .
|
||||
PATCH_COMMAND COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/pthreads/src/external_pthreads < ${PATCH_DIR}/pthreads.diff
|
||||
BUILD_COMMAND ${PTHREADS_BUILD}
|
||||
INSTALL_COMMAND COMMAND
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/pthreads/src/external_pthreads/libpthreadVC3${LIBEXT} ${LIBDIR}/pthreads/lib/pthreadVC3${LIBEXT} &&
|
||||
|
@ -1,13 +1,12 @@
|
||||
--- pthread.h.orig 2012-05-26 22:16:45 -0600
|
||||
+++ pthread.h 2016-04-01 09:20:36 -0600
|
||||
@@ -109,6 +109,10 @@
|
||||
/* Include everything */
|
||||
#endif
|
||||
diff -Naur orig/Makefile external_pthreads/Makefile
|
||||
--- orig/Makefile 2018-08-08 04:47:40 -0600
|
||||
+++ external_pthreads/Makefile 2020-05-09 11:20:28 -0600
|
||||
@@ -185,7 +185,7 @@
|
||||
@ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VSEFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_SEH pthreadVSE$(PTW32_VER_DEBUG).inlined_static_stamp
|
||||
|
||||
+#if _MSC_VER >= 1900
|
||||
+# define HAVE_STRUCT_TIMESPEC 1
|
||||
+#endif
|
||||
+
|
||||
#if defined(_UWIN)
|
||||
# define HAVE_STRUCT_TIMESPEC 1
|
||||
# define HAVE_SIGNAL_H 1
|
||||
VC-static:
|
||||
- @ $(MAKE) /E /nologo XCFLAGS="/MT" EHFLAGS="$(VCFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER).inlined_static_stamp
|
||||
+ @ $(MAKE) /E /nologo XCFLAGS="/MD" EHFLAGS="$(VCFLAGS) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER).inlined_static_stamp
|
||||
|
||||
VC-static-debug:
|
||||
@ $(MAKE) /E /nologo XCFLAGS="/MTd" EHFLAGS="$(VCFLAGSD) /D__PTW32_STATIC_LIB /D__PTW32_BUILD_INLINED" CLEANUP=__PTW32_CLEANUP_C pthreadVC$(PTW32_VER_DEBUG).inlined_static_stamp
|
||||
|
Loading…
Reference in New Issue
Block a user