]> git.lyx.org Git - lyx.git/blobdiff - CMakeLists.txt
Update acmart.layout following tickets #10722 & #10723
[lyx.git] / CMakeLists.txt
index 6975751221dc50b38056358d271196e7f394373a..302ac19366e3fcd1fcae06d7f3afc8d5272f4c46 100644 (file)
@@ -153,7 +153,7 @@ LYX_OPTION(STDLIB_DEBUG         "Use debug stdlib" OFF GCC)
 LYX_OPTION(PROFILE              "Build with options for gprof" OFF GCC)
 
 # MSVC specific
-LYX_OPTION(CONSOLE               "Show console on Windows, enforce with =FORCE" ON MSVC)
+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(DEPENDENCIES_DOWNLOAD "Download dependencies for MSVC 10" OFF MSVC)
@@ -188,11 +188,6 @@ if(LYX_INSTALL)
         if(WIN32 AND NOT MINGW)
                set(LYX_HUNSPELL ON)
        endif()
-       if(LYX_CONSOLE MATCHES "FORCE")
-               set(LYX_CONSOLE ON)
-       else()
-               set(LYX_CONSOLE OFF)
-       endif()
        set(LYX_PACKAGE_SUFFIX ON)
        if(NOT LYX_DEBUG)
                set(LYX_RELEASE ON)
@@ -794,37 +789,41 @@ else()
   add_subdirectory(3rdparty/zlib)
 endif()
 
-if(LYX_EXTERNAL_BOOST)
-       message(STATUS "Searching for boost")
-       if(NOT LYX_USE_STD_REGEX)
-               find_package(Boost COMPONENTS regex)
-       endif()
-       if(Boost_FOUND)
-               message(STATUS "Boost found")
-               message(STATUS "Boost-libs = ${Boost_LIBRARIES}")
-               set(Lyx_Boost_Libraries ${Boost_LIBRARIES})
-               if (LYX_STDLIB_DEBUG)
-                       # Comment from  Jean-Marc Lasgouttes:
-                       # In general, system boost libraries are incompatible with
-                       # the use of stdlib-debug in libstdc++. See ticket #9736 for
-                       # details.
-                       message(WARNING "Compiling LyX with stdlib-debug and system boost libraries may lead to crashes. Consider using '-DLYX_STDLIB_DEBUG=OFF' or using '-DLYX_EXTERNAL_BOOST=OFF'")
-               endif()
-       else()
-               message(FATAL_ERROR "Boost not found" ${Boost_ERROR_REASON})
-       endif()
+if(LYX_USE_STD_REGEX)
+  # Set only include path.
+  # Use internal boost, which is known to exist
+  # we don't need any libraries
+  set(Lyx_Boost_Libraries)
+  add_definitions(-DBOOST_USER_CONFIG=<config.h>)
+  include_directories(${TOP_SRC_DIR}/3rdparty/boost)
 else()
-       if(NOT LYX_USE_STD_REGEX)
-               set(Lyx_Boost_Libraries boost_regex)
-       endif()
-       add_definitions(-DBOOST_USER_CONFIG=<config.h>)
-       include_directories(${TOP_SRC_DIR}/3rdparty/boost)
-       add_subdirectory(3rdparty/boost "${TOP_BINARY_DIR}/3rdparty/boost")
+  # Using boost-regex
+  if(LYX_EXTERNAL_BOOST)
+    message(STATUS "Searching for external boost")
+    find_package(Boost COMPONENTS regex)
+    if(Boost_FOUND)
+      message(STATUS "Boost found")
+      message(STATUS "Boost-libs = ${Boost_LIBRARIES}")
+      set(Lyx_Boost_Libraries ${Boost_LIBRARIES})
+      if (LYX_STDLIB_DEBUG)
+       # Comment from  Jean-Marc Lasgouttes:
+       # In general, system boost libraries are incompatible with
+       # the use of stdlib-debug in libstdc++. See ticket #9736 for
+       # details.
+       message(WARNING "Compiling LyX with stdlib-debug and system boost libraries may lead to crashes. Consider using '-DLYX_STDLIB_DEBUG=OFF' or using '-DLYX_EXTERNAL_BOOST=OFF'")
+      endif()
+    else()
+      message(FATAL_ERROR "Boost not found" ${Boost_ERROR_REASON})
+    endif()
+  else()
+    # Using included boost
+    set(Lyx_Boost_Libraries boost_regex)
+    add_definitions(-DBOOST_USER_CONFIG=<config.h>)
+    include_directories(${TOP_SRC_DIR}/3rdparty/boost)
+    add_subdirectory(3rdparty/boost "${TOP_BINARY_DIR}/3rdparty/boost")
+  endif()
 endif()
 
-
-
-
 if(WIN32)
        if(LYX_CONSOLE)
                set(LYX_QTMAIN_LIBRARY)
@@ -839,7 +838,7 @@ if(WIN32)
        else()
                # -DPSAPI_VERSION=1 is not needed for mingw, since the mingw psapi.h
                # does not use it and always declares the vista compatible API.
-               # If this ever changes then -DPSAPI_VERSION might be needed here as well. 
+               # If this ever changes then -DPSAPI_VERSION might be needed here as well.
                add_definitions(-DWINVER=0x0500)
        endif()
 endif()