+if(LYX_INSTALL)
+ set(LYX_NLS ON)
+ if (WIN32)
+ set(LYX_HUNSPELL ON)
+ endif()
+ set(LYX_CONSOLE OFF)
+ set(LYX_PACKAGE_SUFFIX ON)
+ set(LYX_RELEASE ON)
+ set(LYX_PROFILE OFF)
+endif()
+
+if(LYX_MERGE_FILES)
+ set(LYX_PCH OFF)
+else()
+ set(LYX_MERGE_REBUILD OFF)
+endif()
+
+if(LYX_DEPENDENCIES_DOWNLOAD)
+ message(STATUS)
+ set(LYX_DEPENDENCIES_DIR ${TOP_BINARY_DIR}/msvc2010-deps)
+ message(STATUS "Using downloaded dependencies in ${LYX_DEPENDENCIES_DIR}")
+ set(deps_files lyx20-deps-msvc2010-x86.zip)
+ foreach(it ${deps_files})
+ set(already_downloaded already_downloaded-NOTFOUND CACHE PATH "downloaded" FORCE)
+ find_file(already_downloaded ${it} "${LYX_DEPENDENCIES_DIR}/download")
+ if(NOT already_downloaded)
+ message(STATUS "Downloading ${it} ...")
+ file(DOWNLOAD ftp://ftp.devel.lyx.org/pub/contrib/windows/${it} ${LYX_DEPENDENCIES_DIR}/download/${it} SHOW_PROGRESS)
+ execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf ${LYX_DEPENDENCIES_DIR}/download/${it}
+ WORKING_DIRECTORY ${LYX_DEPENDENCIES_DIR})
+ endif()
+ endforeach()
+ set(GNUWIN32_DIR ${LYX_DEPENDENCIES_DIR}/deps20)
+endif()