Commit c6f1f6aa authored by Alexander Stukowski's avatar Alexander Stukowski

Updated build scripts for Windows to support MSVC 2019

parent 60017c66
......@@ -60,8 +60,8 @@ ELSEIF(WIN32)
SET(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
SET(CPACK_PACKAGE_EXECUTABLES "ovito" "OVITO (The Open Visualization Tool)")
SET(CPACK_NSIS_CREATE_ICONS_EXTRA "
File \\\"C:\\\\Program Files (x86)\\\\Microsoft Visual Studio 14.0\\\\VC\\\\redist\\\\1033\\\\vcredist_x64.exe\\\"
ReadRegStr $1 HKLM \\\"SOFTWARE\\\\Microsoft\\\\DevDiv\\\\vc\\\\Servicing\\\\14.0\\\\RuntimeMinimum\\\" \\\"Install\\\"
File \\\"C:\\\\Program Files (x86)\\\\Microsoft Visual Studio\\\\2019\\\\BuildTools\\\\VC\\\\Redist\\\\MSVC\\\\14.21.27702\\\\vcredist_x64.exe\\\"
ReadRegStr $1 HKLM \\\"SOFTWARE\\\\Microsoft\\\\DevDiv\\\\VC\\\\Servicing\\\\14.0\\\\RuntimeMinimum\\\" \\\"Install\\\"
StrCmp $1 1 vc_runtime_installed
ExecWait '\\\"$INSTDIR\\\\vcredist_x64.exe\\\" /passive /norestart'
vc_runtime_installed:
......
......@@ -272,11 +272,17 @@ IF(WIN32)
OVITO_INSTALL_DLL("${LIBSSH_LIBRARY_DIR}/../bin/${LIBSSH_LIBRARY_NAME}.dll")
# Also install the OpenSSL DLLs needed by libssh.
FIND_FILE(OPENSSL_LIBRARY_DLL libeay32.dll DOC "Location of OpenSSL library (libeay32.dll)")
IF(NOT OPENSSL_LIBRARY_DLL)
MESSAGE(FATAL_ERROR "Please specify the location of the OpenSSL library by setting the OPENSSL_LIBRARY_DLL variable.")
SET(OPENSSL_ROOT_DIR "" CACHE PATH "Location of the OpenSSL library installation")
IF(NOT OPENSSL_ROOT_DIR)
MESSAGE(FATAL_ERROR "Please specify the location of the OpenSSL library by setting the OPENSSL_ROOT_DIR variable.")
ENDIF()
OVITO_INSTALL_DLL("${OPENSSL_LIBRARY_DLL}")
FILE(GLOB openssl_dlls "${OPENSSL_ROOT_DIR}/bin/*.dll")
IF(NOT openssl_dlls)
MESSAGE(FATAL_ERROR "Couldn't not find any OpenSSL DLLs in \"${OPENSSL_ROOT_DIR}/bin/\". Please check value of OPENSSL_ROOT_DIR path variable.")
ENDIF()
FOREACH(openssl_dll ${openssl_dlls})
OVITO_INSTALL_DLL("${openssl_dll}")
ENDFOREACH()
ELSEIF(UNIX AND NOT APPLE AND OVITO_REDISTRIBUTABLE_PACKAGE)
......
......@@ -154,11 +154,13 @@ IF(WIN32)
INSTALL(FILES "${QtBinaryPath}/../plugins/imageformats/qjpegd.dll" DESTINATION "${OVITO_RELATIVE_BINARY_DIRECTORY}/plugins/imageformats/")
INSTALL(FILES "${QtBinaryPath}/../plugins/imageformats/qgifd.dll" DESTINATION "${OVITO_RELATIVE_BINARY_DIRECTORY}/plugins/imageformats/")
INSTALL(FILES "${QtBinaryPath}/../plugins/iconengines/qsvgicond.dll" DESTINATION "${OVITO_RELATIVE_BINARY_DIRECTORY}/plugins/iconengines/")
INSTALL(FILES "${QtBinaryPath}/../plugins/styles/qwindowsvistastyled.dll" DESTINATION "${OVITO_RELATIVE_BINARY_DIRECTORY}/plugins/styles/")
ELSE()
INSTALL(FILES "${QtBinaryPath}/../plugins/platforms/qwindows.dll" DESTINATION "${OVITO_RELATIVE_BINARY_DIRECTORY}/plugins/platforms/")
INSTALL(FILES "${QtBinaryPath}/../plugins/imageformats/qjpeg.dll" DESTINATION "${OVITO_RELATIVE_BINARY_DIRECTORY}/plugins/imageformats/")
INSTALL(FILES "${QtBinaryPath}/../plugins/imageformats/qgif.dll" DESTINATION "${OVITO_RELATIVE_BINARY_DIRECTORY}/plugins/imageformats/")
INSTALL(FILES "${QtBinaryPath}/../plugins/iconengines/qsvgicon.dll" DESTINATION "${OVITO_RELATIVE_BINARY_DIRECTORY}/plugins/iconengines/")
INSTALL(FILES "${QtBinaryPath}/../plugins/styles/qwindowsvistastyle.dll" DESTINATION "${OVITO_RELATIVE_BINARY_DIRECTORY}/plugins/styles/")
ENDIF()
# Create a qt.conf file.
......
......@@ -41,6 +41,11 @@ TARGET_INCLUDE_DIRECTORIES(OSPRayRenderer PRIVATE "${EMBREE_INCLUDE_DIRS}")
TARGET_INCLUDE_DIRECTORIES(OSPRayRenderer PRIVATE "$<TARGET_PROPERTY:TBB::tbb,INTERFACE_INCLUDE_DIRECTORIES>")
SET_TARGET_PROPERTIES(OSPRayRenderer PROPERTIES MACOSX_RPATH TRUE)
# Avoid conflict with Windows system header.
IF(WIN32)
TARGET_COMPILE_DEFINITIONS(OSPRayRenderer PRIVATE "NOMINMAX=")
ENDIF()
# Build our extension module for the OSPRay system.
ADD_SUBDIRECTORY(ospray_module)
ADD_DEPENDENCIES(OSPRayRenderer ospray_module_ovito)
......
......@@ -59,6 +59,10 @@ OSPRAY_ADD_LIBRARY(ospray_module_ovito SHARED
TARGET_LINK_LIBRARIES(ospray_module_ovito PRIVATE "${EMBREE_LIBRARY}")
TARGET_LINK_LIBRARIES(ospray_module_ovito PRIVATE ospray::ospray ospray::ospray_module_ispc)
SET_TARGET_PROPERTIES(ospray_module_ovito PROPERTIES MACOSX_RPATH TRUE)
SET_TARGET_PROPERTIES(ospray_module_ovito PROPERTIES MACOSX_RPATH TRUE)
IF(WIN32)
TARGET_COMPILE_DEFINITIONS(ospray_module_ovito PRIVATE "NOMINMAX=")
ENDIF()
SET_TARGET_PROPERTIES(ospray_module_ovito PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OVITO_RELATIVE_3RDPARTY_LIBRARY_DIRECTORY}")
SET_TARGET_PROPERTIES(ospray_module_ovito PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${OVITO_RELATIVE_3RDPARTY_LIBRARY_DIRECTORY}")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment