diff options
author | Ray Molenkamp <github@lazydodo.com> | 2020-05-09 21:47:59 +0300 |
---|---|---|
committer | Ray Molenkamp <github@lazydodo.com> | 2020-05-09 21:47:59 +0300 |
commit | f2178b7f9740c55caf047e6bd19b9dc73a4837ef (patch) | |
tree | 651b3ea3c19e056c5bb73e9760fd855dbf0268eb /build_files/build_environment | |
parent | 633fee72d5cb4c1f3136781561a72deb301a44d7 (diff) |
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.
Diffstat (limited to 'build_files/build_environment')
-rw-r--r-- | build_files/build_environment/cmake/jpeg.cmake | 2 | ||||
-rw-r--r-- | build_files/build_environment/cmake/pthreads.cmake | 3 | ||||
-rw-r--r-- | build_files/build_environment/patches/pthreads.diff | 23 |
3 files changed, 14 insertions, 14 deletions
diff --git a/build_files/build_environment/cmake/jpeg.cmake b/build_files/build_environment/cmake/jpeg.cmake index 47f526e3d29..0d611219353 100644 --- a/build_files/build_environment/cmake/jpeg.cmake +++ b/build_files/build_environment/cmake/jpeg.cmake @@ -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} diff --git a/build_files/build_environment/cmake/pthreads.cmake b/build_files/build_environment/cmake/pthreads.cmake index c5c331117fc..7ddf6867e2b 100644 --- a/build_files/build_environment/cmake/pthreads.cmake +++ b/build_files/build_environment/cmake/pthreads.cmake @@ -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} && diff --git a/build_files/build_environment/patches/pthreads.diff b/build_files/build_environment/patches/pthreads.diff index bbabfdc8925..4b6c9766e11 100644 --- a/build_files/build_environment/patches/pthreads.diff +++ b/build_files/build_environment/patches/pthreads.diff @@ -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 |