build_environment: fix building openvdb on win32
authorRay Molenkamp <github@lazydodo.com>
Sun, 26 Aug 2018 01:40:44 +0000 (19:40 -0600)
committerRay Molenkamp <github@lazydodo.com>
Sun, 26 Aug 2018 01:40:44 +0000 (19:40 -0600)
build_files/build_environment/cmake/openvdb.cmake

index a9533a89b1b48ebd856b7bf07d2c6184151feaae..a550ed5decbc92178ff9481246c91ea2dd4c073e 100644 (file)
@@ -60,6 +60,12 @@ if(WIN32)
                -DOPENEXR_NAMESPACE_VERSIONING=OFF
                -DEXTRA_LIBS:FILEPATH=${LIBDIR}/pthreads/lib/pthreadVC2.lib
        )
+       if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
+               set(OPENVDB_EXTRA_ARGS ${OPENVDB_EXTRA_ARGS}
+                       -DCMAKE_SHARED_LINKER_FLAGS="/safeseh:no"
+                       -DCMAKE_EXE_LINKER_FLAGS="/safeseh:no"
+               )
+       endif()
 endif()
 
 ExternalProject_Add(openvdb