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}")
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")
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()
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)
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()
if(WIN32)
if(LYX_CONSOLE)
- set(LYX_QTMAIN_LIBRARY)
- else()
+ set(LYX_QTMAIN_LIBRARY)
+ else()
set(WIN32_CONSOLE WIN32)
endif()
if(MSVC)