LYX_OPTION(CONSOLE "Show console on Windows, enforce with =FORCE" ON MSVC)
LYX_OPTION(VLD "Use VLD with MSVC" OFF MSVC)
LYX_OPTION(WALL "Enable all warnings" OFF MSVC)
-LYX_OPTION(CONFIGURE_CHECKS "Also run configure checks for MSVC" OFF MSVC)
LYX_OPTION(DEPENDENCIES_DOWNLOAD "Download dependencies for MSVC 10" OFF MSVC)
# APPLE specific
if(LYX_DEPENDENCIES_DOWNLOAD)
message(STATUS)
- if(MSVC12)
- set(LYX_DEPENDENCIES_DIR ${TOP_BINARY_DIR}/msvc2013-deps)
- set(deps_files lyx-windows-deps-msvc2013.zip)
- set(deps_server http://ftp.lyx.de/LyX-Windows-Deps)
- set(GNUWIN32_DIR ${LYX_DEPENDENCIES_DIR}/lyx-windows-deps-msvc2013)
- else()
- set(LYX_DEPENDENCIES_DIR ${TOP_BINARY_DIR}/msvc2010-deps)
- set(deps_files lyx20-deps-msvc2010-x86.zip)
- set(deps_server http://downloads.sourceforge.net/project/lyx/Win_installers/Dependencies)
- set(GNUWIN32_DIR ${LYX_DEPENDENCIES_DIR}/deps20)
- endif()
+ if(MSVC14)
+ set(LYX_DEPENDENCIES_DIR ${TOP_BINARY_DIR}/msvc2015-deps)
+ set(deps_files lyx-windows-deps-msvc2015.zip)
+ set(deps_server http://ftp.lyx.de/LyX-Windows-Deps)
+ set(GNUWIN32_DIR ${LYX_DEPENDENCIES_DIR}/lyx-windows-deps-msvc2015)
+ elseif(MSVC10)
+ set(LYX_DEPENDENCIES_DIR ${TOP_BINARY_DIR}/msvc2010-deps)
+ set(deps_files lyx-windows-deps-msvc2010.zip)
+ set(deps_server http://ftp.lyx.de/LyX-Windows-Deps)
+ set(GNUWIN32_DIR ${LYX_DEPENDENCIES_DIR}/lyx-windows-deps-msvc2010)
+ else()
+ message(FATAL_ERROR "error: no dependency package known for the selected MSVC version.")
+ endif()
message(STATUS "Using downloaded dependencies in ${LYX_DEPENDENCIES_DIR}")
foreach(it ${deps_files})
set(already_downloaded already_downloaded-NOTFOUND CACHE PATH "downloaded" FORCE)
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
message(STATUS "Using GCC version ${GCC_VERSION}")
if(GCC_VERSION VERSION_LESS 4.9)
- if(GCC_VERSION VERSION_LESS 4.3)
- message(FATAL_ERROR "gcc >= 4.3 is required.")
+ if(GCC_VERSION VERSION_LESS 4.6)
+ message(FATAL_ERROR "gcc >= 4.6 is required.")
endif()
# <regex> in gcc is unusable in versions less than 4.9.0
# see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53631
set(Z_PREFIX 1)
endif()
-# compiler tests, config.h generation
-if(MSVC AND NOT LYX_CONFIGURE_CHECKS)
- configure_file(${LYX_CMAKE_DIR}/configCompiler.h.msvc ${TOP_BINARY_DIR}/configCompiler.h)
-else()
- include(${LYX_CMAKE_DIR}/ConfigureChecks.cmake)
- configure_file(${LYX_CMAKE_DIR}/configCompiler.h.cmake ${TOP_BINARY_DIR}/configCompiler.h)
-endif()
+# compiler tests, config.h generation LYX_CONFIGURE_CHECKS
+include(${LYX_CMAKE_DIR}/ConfigureChecks.cmake)
+configure_file(${LYX_CMAKE_DIR}/configCompiler.h.cmake ${TOP_BINARY_DIR}/configCompiler.h)
set(QPA_XCB)
if(Qt5X11Extras_FOUND AND QT_USES_X11)