On Windows install the supplementary modules:
* Visual Studio 2008: ftp://ftp.lyx.org/pub/lyx/contrib/lyx-windows-deps-msvc2008.zip
- * Visual Studio 2010: ftp://ftp.devel.lyx.org/pub/contrib/windows/bin/
+ * Visual Studio 2010: ftp://ftp.devel.lyx.org/pub/contrib/windows/bin
+ or use the option LYX_3RDPARTY_DOWNLOAD
If cmake couldn't find these modules set GNUWIN32_DIR, eg.
-DGNUWIN32_DIR=c:\gnuwin32. By default cmake searches in your
-- LYX_CONSOLE = ON : Show console on Windows
-- LYX_VLD = OFF : Use VLD with MSVC
-- LYX_WALL = OFF : Enable all warnings
- -- LYX_LYX_CONFIGURE_CHECKS = OFF : Also run configure checks for MSVC
+ -- LYX_CONFIGURE_CHECKS = OFF : Also run configure checks for MSVC
+ -- LYX_3RDPARTY_DOWNLOAD = OFF : Download precompiled 3rd party libraries for MSVC 10
LYX_OPTION(CONSOLE "Show console on Windows" ON MSVC)
LYX_OPTION(VLD "Use VLD with MSVC" OFF MSVC)
LYX_OPTION(WALL "Enable all warnings" OFF MSVC)
-LYX_OPTION(LYX_CONFIGURE_CHECKS "Also run configure checks for MSVC" OFF MSVC)
-
+LYX_OPTION(CONFIGURE_CHECKS "Also run configure checks for MSVC" OFF MSVC)
+LYX_OPTION(3RDPARTY_DOWNLOAD "Download precompiled 3rd party libraries for MSVC 10" OFF MSVC)
# Check option dependencies
if(LYX_CPACK)
if(LYX_INSTALL)
set(LYX_NLS ON)
- set(LYX_ASPELL ON)
+ if(NOT LYX_3RDPARTY_DOWNLOAD)
+ set(LYX_ASPELL ON)
+ endif()
if (WIN32)
set(LYX_HUNSPELL ON)
endif()
set(LYX_MERGE_REBUILD OFF)
endif()
+if(LYX_3RDPARTY_DOWNLOAD)
+ message(STATUS)
+ set(LYX_3RDPARTY_DIR ${CMAKE_BINARY_DIR}/msvc10-deps)
+ message(STATUS "Using downloaded 3rd party libraries in ${LYX_3RDPARTY_DIR}")
+ set(3rdparty_files
+ crt-msvc2010-x86.zip
+ dict-hunspell-all.zip
+ dtl-modified-msvc2010-x86.zip
+ dvipost-1.1-modified-msvc2010-x86.zip
+ gettext-tools-0.18.1-x86.zip
+ ghostscript-8.71-msvc2010-x86.zip
+ hunspell-1.2.11-msvc2010-x86.zip
+ iconv-1.13.1-msvc2010-x86.zip
+ imagemagick-6.6.3-0-modified-msvc2010-x86.zip
+ libintl-0.18.1-msvc2010-x86.zip
+ netpbm-pnmcrop-10.27-x86.zip
+ pdftools-msvc2010-x86.zip
+ pdfview-x86.zip
+ python-2.6.5-msvc2010-x86.zip
+ thes-mythes-all.zip
+ zlib-1.2.5-msvc2010-x86.zip)
+ foreach(it ${3rdparty_files})
+ set(already_downloaded already_downloaded-NOTFOUND CACHE PATH "downloaded" FORCE)
+ find_file(already_downloaded ${it} "${LYX_3RDPARTY_DIR}/downloads")
+ if(NOT already_downloaded)
+ message(STATUS "Downloading ${it} ...")
+ file(DOWNLOAD ftp://ftp.devel.lyx.org/pub/contrib/windows/bin/${it} ${LYX_3RDPARTY_DIR}/downloads/${it} SHOW_PROGRESS)
+ execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf ${LYX_3RDPARTY_DIR}/downloads/${it}
+ WORKING_DIRECTORY ${LYX_3RDPARTY_DIR})
+ endif()
+ endforeach()
+ set(GNUWIN32_DIR ${LYX_3RDPARTY_DIR})
+endif()
message(STATUS)