X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=CMakeLists.txt;h=2fca8f5a2854f7e63251f5530f1dc530876928b2;hb=88b1c8d521b0554faa2df5dd22b1709f167685bb;hp=b9397ced0642e864c1766327491bec91def6d624;hpb=c2eb1a1a72a1486f8aaa8a0f6e303780ecb99dab;p=lyx.git diff --git a/CMakeLists.txt b/CMakeLists.txt index b9397ced06..2fca8f5a28 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -136,6 +136,7 @@ LYX_OPTION(ENABLE_URLTESTS "Enable for URL tests" OFF ALL) LYX_OPTION(ENABLE_EXPORT_TESTS "Enable for export tests" OFF ALL) LYX_OPTION(ENABLE_KEYTESTS "Enable for keytests" OFF ALL) LYX_OPTION(ASAN "Use address sanitizer" OFF ALL) +LYX_COMBO(USE_FILEDIALOG "Use native or QT file dialog" QT NATIVE) LYX_COMBO(USE_QT "Use Qt version as frontend" AUTO QT4 QT5) #LYX_OPTION(3RDPARTY_BUILD "Build 3rdparty libs" OFF ALL) LYX_OPTION(EXTERNAL_Z "OFF := Build 3rdparty lib zlib" ON ALL) @@ -354,12 +355,14 @@ endforeach(_c_l) FIND_PROGRAM(LYX_GITVERSION git) #message(STATUS "gitversion = ${LYX_GITVERSION}") set(LYX_REVISION_VERSION ${LYX_PATCH_VERSION}) +set(LYX_PACKAGE_RELEASE "1") if(LYX_GITVERSION) if (LYX_LOCALVERSIONING) # Find the revision number and for later use EXECUTE_PROCESS(COMMAND ${LYX_GITVERSION} describe --match 2.0.0 HEAD - WORKING_DIRECTORY "${TOP_SRC_DIR}" OUTPUT_VARIABLE LYX_PACKAGE_RELEASE OUTPUT_STRIP_TRAILING_WHITESPACE) - if (LYX_PACKAGE_RELEASE MATCHES "^2\\.0\\.0\\-\([0-9]+\)\\-.*$") + WORKING_DIRECTORY "${TOP_SRC_DIR}" OUTPUT_VARIABLE tmp_LYX_PACKAGE_RELEASE OUTPUT_STRIP_TRAILING_WHITESPACE) + if (tmp_LYX_PACKAGE_RELEASE MATCHES "^2\\.0\\.0\\-\([0-9]+\)\\-\(.*\)$") + set(LYX_PACKAGE_RELEASE ${CMAKE_MATCH_2}) # We will add offset of 40000 to get appropriate value to # previous svn. # We use this value than also to set the package-patch-value @@ -412,8 +415,8 @@ if(LYX_BUNDLE) set(OSX_BUNDLE_DIRS "Resources;Resources;Resources") # Process Info.plist and lyxrc.dist + # See development/cmake/Install.cmake configure_file("${CMAKE_CURRENT_SOURCE_DIR}/development/MacOSX/Info.plist.in" "${CMAKE_CURRENT_BINARY_DIR}/Info.plist") - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/development/MacOSX/lyxrc.dist.in" "${CMAKE_CURRENT_BINARY_DIR}/lyxrc.dist") set(LYX_BUILD_BUNDLE MACOSX_BUNDLE) set(LYX_DATA_SUBDIR ${LYX_BUNDLE_NAME}.app/Contents/Resources/ CACHE STRING "Bundle Contents dir" FORCE) @@ -520,13 +523,15 @@ else() endif() mark_as_advanced(LYX_MAN_DIR) -if(LYX_INSTALL AND WIN32) - message(STATUS "Configuring NSIS files") - configure_file(development/Win32/packaging/installer/lyx.nsi.cmake ${CMAKE_BINARY_DIR}/installer/lyx.nsi @ONLY) - configure_file(development/Win32/packaging/installer/settings.nsh.cmake ${CMAKE_BINARY_DIR}/installer/settings-cmake.nsh @ONLY) - configure_file(development/Win32/packaging/installer/include/declarations.nsh.cmake ${CMAKE_BINARY_DIR}/installer/declarations-cmake.nsh @ONLY) - message(STATUS "NSIS files are created in ${CMAKE_BINARY_DIR}/installer") -endif() +# The Win installer cannot be built by CMake because one needs to install plugins for NSIS +# see the Readme.txt of the installer +#if(LYX_INSTALL AND WIN32) +# message(STATUS "Configuring NSIS files") +# configure_file(development/Win32/packaging/installer/lyx.nsi.cmake ${CMAKE_BINARY_DIR}/installer/lyx.nsi @ONLY) +# configure_file(development/Win32/packaging/installer/settings.nsh.cmake ${CMAKE_BINARY_DIR}/installer/settings-cmake.nsh @ONLY) +# configure_file(development/Win32/packaging/installer/include/declarations.nsh.cmake ${CMAKE_BINARY_DIR}/installer/declarations-cmake.nsh @ONLY) +# message(STATUS "NSIS files are created in ${CMAKE_BINARY_DIR}/installer") +#endif() if(NOT GROUP_CODE) #set(GROUP_CODE "The Golden Code") @@ -689,7 +694,8 @@ endif() find_package(Magic) if(Magic_FOUND) - set(HAVE_MAGIC_H 1) + set(HAVE_MAGIC_H 1) + include_directories(${Magic_INCLUDE_DIR}) endif() include_directories(${TOP_BINARY_DIR} ${TOP_SRC_DIR}/src) @@ -1032,15 +1038,18 @@ if(LYX_INSTALL) endif() include(../Install) +# By running the URL tests first, time can be saved when running the ctests in +# parallel since the URL tests take a long time to run (e.g. 10 minutes). +if(LYX_ENABLE_URLTESTS) + add_subdirectory(development/checkurls "${TOP_BINARY_DIR}/checkurls") +endif() add_subdirectory(src "${TOP_BINARY_DIR}/src") add_subdirectory(lib/lyx2lyx "${TOP_BINARY_DIR}/lyx2lyx") add_subdirectory(lib/scripts "${TOP_BINARY_DIR}/scripts") add_subdirectory(lib/examples "${TOP_BINARY_DIR}/lib/examples") add_subdirectory(sourcedoc "${TOP_BINARY_DIR}/sourcedoc") add_subdirectory(development/autotests "${TOP_BINARY_DIR}/autotests") -if(LYX_ENABLE_URLTESTS) - add_subdirectory(development/checkurls "${TOP_BINARY_DIR}/checkurls") -endif() +add_subdirectory(development/batchtests "${TOP_BINARY_DIR}/batchtests") message(STATUS) message(STATUS "Build params, switch LYX_* options by -DLYX_*=ON or OFF, LYX_* combos by -DLYX_*=value:")