diff --git a/CMakeLists.txt b/CMakeLists.txt index d981e9d89e905d8d4e6cde5288579ddf2d9c7761..a70b7e1ae787c2069a00bc76c1943f0c49dc1db8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -254,6 +254,13 @@ if (WIN32 ) list(REMOVE_DUPLICATES WINDOWS_COPY_LIBDIRS) endif() + + # workaround for VS2018 where the OpenMP vcomp90.dll seems to be missing from the path + if ( CMAKE_GENERATOR MATCHES "^Visual Studio 9.*" ) + INCLUDE(InstallRequiredSystemLibraries) + set ( OMP_PATH "${MSVC90_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC90.OPENMP/" ) + endif() + # prepare bundle generation cmake file and add a build target for it configure_file ("${CMAKE_SOURCE_DIR}/OpenFlipper/cmake/fixbundle.cmake.win.in" "${CMAKE_BINARY_DIR}/fixbundle.win.cmake" @ONLY IMMEDIATE) diff --git a/OpenFlipper/cmake/fixbundle.cmake.win.in b/OpenFlipper/cmake/fixbundle.cmake.win.in index 78ef04e7f9f0aa73700806d35480be6b342db0f6..aab6e3420a4822b11f04ce8fd10329ad982c0a53 100644 --- a/OpenFlipper/cmake/fixbundle.cmake.win.in +++ b/OpenFlipper/cmake/fixbundle.cmake.win.in @@ -31,5 +31,5 @@ get_filename_component(_GlutDir "@GLUT_glut_LIBRARY@" PATH) file (GLOB _plugins "@CMAKE_BINARY_DIR@/Build/Plugins/*.dll") # fix all dependencies -fixup_bundle ("@CMAKE_BINARY_DIR@/Build/@OPENFLIPPER_PRODUCT_STRING@.exe" "${_plugins}" "${_GlutDir};@GLUT_LIBRARY_DIR@;@Qwt5_Qt4_LIBRARY_DIR@;@GLEW_LIBRARY_DIR@;@QT_BINARY_DIR@;@FTGL_LIBRARY_DIRS@;@FREETYPE_LIBRARY_DIR@;@NITE2_LIBRARY_DIR@;@OPENNI2_LIBRARY_DIR@;@QWT6_LIBRARY_DIR@;@ASSIMP_LIBRARY_DIR@;@WINDOWS_COPY_LIBDIRS@") +fixup_bundle ("@CMAKE_BINARY_DIR@/Build/@OPENFLIPPER_PRODUCT_STRING@.exe" "${_plugins}" "${_GlutDir};@OMP_PATH@;@GLUT_LIBRARY_DIR@;@Qwt5_Qt4_LIBRARY_DIR@;@GLEW_LIBRARY_DIR@;@QT_BINARY_DIR@;@FTGL_LIBRARY_DIRS@;@FREETYPE_LIBRARY_DIR@;@NITE2_LIBRARY_DIR@;@OPENNI2_LIBRARY_DIR@;@QWT6_LIBRARY_DIR@;@ASSIMP_LIBRARY_DIR@;@WINDOWS_COPY_LIBDIRS@")