]> git.lyx.org Git - lyx.git/blobdiff - CMakeLists.txt
Cmake export tests: Handle default output format 'pdf2' in manuals like 'default'
[lyx.git] / CMakeLists.txt
index e1376a45b7ad9c58641b3da3b1f4bdb6dfe93100..a5b85132b21481c2cc8d233cc418854ce9402d24 100644 (file)
@@ -10,8 +10,9 @@ set(LYX_PROJECT LyX)
 
 enable_testing()
 
-get_filename_component(lyx_dir_readme ${CMAKE_SOURCE_DIR}/README ABSOLUTE)
+get_filename_component(lyx_dir_readme ${CMAKE_SOURCE_DIR}/README REALPATH) # Resolve symlinks
 get_filename_component(TOP_SRC_DIR ${lyx_dir_readme} PATH)
+message(STATUS "TOP_SRC_DIR = ${TOP_SRC_DIR}")
 
 set(LYX_CMAKE_DIR "development/cmake")
 set(TOP_CMAKE_PATH "${TOP_SRC_DIR}/${LYX_CMAKE_DIR}")
@@ -208,10 +209,18 @@ 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)
-       set(deps_server http://downloads.sourceforge.net/project/lyx/Win_installers/Dependencies)
+    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()
+    message(STATUS "Using downloaded dependencies in ${LYX_DEPENDENCIES_DIR}")
        foreach(it ${deps_files})
                set(already_downloaded already_downloaded-NOTFOUND CACHE PATH "downloaded" FORCE)
                find_file(already_downloaded ${it} "${LYX_DEPENDENCIES_DIR}/download")
@@ -228,11 +237,6 @@ if(LYX_DEPENDENCIES_DOWNLOAD)
                                      WORKING_DIRECTORY ${LYX_DEPENDENCIES_DIR})
                endif()
        endforeach()
-       set(GNUWIN32_DIR ${LYX_DEPENDENCIES_DIR}/deps20)
-    if(MSVC12)
-        # handle error in msvc12 when linking against msvc10 libs
-        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /vd2")
-    endif()
 endif()
 
 
@@ -572,9 +576,9 @@ if(LYX_USE_QT MATCHES "QT5")
                        qt5_wrap_ui(${ARGN})
                endmacro()
                message(STATUS "Found Qt-Version ${QTVERSION}")
-        if(WIN32)
-            set(LYX_QTMAIN_LIBRARY ${Qt5Core_QTMAIN_LIBRARIES})
-        endif()
+               if(WIN32)
+                       set(LYX_QTMAIN_LIBRARY ${Qt5Core_QTMAIN_LIBRARIES})
+               endif()
        endif()
 elseif(LYX_USE_QT MATCHES "QT4")
        if(LYX_XMINGW)
@@ -590,9 +594,9 @@ elseif(LYX_USE_QT MATCHES "QT4")
        macro (qt_wrap_uifiles)
                qt4_wrap_ui(${ARGN})
        endmacro()
-    if(WIN32)
-        set(LYX_QTMAIN_LIBRARY ${QT_QTMAIN_LIBRARIES})
-    endif()
+       if(WIN32)
+               set(LYX_QTMAIN_LIBRARY ${QT_QTMAIN_LIBRARIES})
+       endif()
 else()
   message(FATAL_ERROR "Unhandled value for LYX_USE_QT (${LYX_USE_QT})")
 endif()
@@ -698,8 +702,8 @@ endif()
 
 if(WIN32)
        if(LYX_CONSOLE)
-        set(LYX_QTMAIN_LIBRARY)
-    else()
+               set(LYX_QTMAIN_LIBRARY)
+       else()
                set(WIN32_CONSOLE WIN32)
        endif()
        if(MSVC)