+
# This file is part of LyX, the document processor.
# Licence details can be found in the file COPYING.
#
# is checked
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/modules")
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
+set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
option(lyxinstall "Build install projects/rules" ON)
+
# Supress regeneration
set(CMAKE_SUPPRESS_REGENERATION TRUE)
# lyx's source files
set(LYX_CPP_FILES *.cpp)
set(LYX_HPP_FILES *.h)
+set(LYX_MOC_FILES moc_*.cpp)
include(LyXMacros)
include(ProjectSourceGroup)
message(STATUS "")
message(STATUS "All *.cpp files of a project are merged into two files, disable with -Dmerge=0")
message(STATUS "")
+ add_definitions(-DLYX_MERGED_BUILD)
else()
set(merge 0 CACHE TYPE STRING FORCE)
set(MERGE_FILES 0 CACHE TYPE STRING FORCE)
message(STATUS "----- Hunspell not found, building without hunspell support")
endif()
+if(WIN32)
+ find_library(ENCHANT_LIBRARY "libenchant")
+ find_path(ENCHANT_INCLUDE_DIR "enchant++.h")
+else()
+ find_library(ENCHANT_LIBRARY "enchant" "/usr/local/lib" "/usr/lib" "/usr/local/lib" "/opt/local/lib")
+ find_path(ENCHANT_INCLUDE_DIR "enchant++.h" PATHS /usr/local/include /usr/local/include/enchant /usr/include /usr/include/enchant /opt/local/include/enchant)
+endif()
+if (ENCHANT_LIBRARY AND ENCHANT_INCLUDE_DIR)
+ set(ENCHANT_FOUND TRUE)
+ add_definitions(-DUSE_ENCHANT=1)
+ message(STATUS "----- Building with USE_ENCHANT")
+else()
+ message(STATUS "----- Enchant not found, building without enchant support")
+endif()
+
message(STATUS "")
if(nls OR all)
set(nls TRUE CACHE TYPE STRING)
# Not sure if it works for all non-msvc compilers
include(PCHSupport_26)
if (MSVC)
- option(disable-pch "Disable precompiled headers" OFF)
+ option(disable-pch "Disable precompiled headers" ON)
else()
option(disable-pch "Disable precompiled headers" ON)
endif()
"${CMAKE_CXX_FLAGS_MINSIZEREL} ${MSVC_W_ERROR} ${MSVC_W_DISABLE}")
endif()
+ set(CMAKE_CXX_FLAGS_DEBUG
+ "${CMAKE_CXX_FLAGS_DEBUG} /Zc:wchar_t-")
+ set(CMAKE_CXX_FLAGS_RELEASE
+ "${CMAKE_CXX_FLAGS_RELEASE} /Zc:wchar_t-")
+ set(CMAKE_CXX_FLAGS_MINSIZEREL
+ "${CMAKE_CXX_FLAGS_MINSIZEREL} /Zc:wchar_t-")
message(STATUS "----- Warning level : ${CMAKE_CXX_WARNING_LEVEL} ${WARNING_LEVEL_MESSAGE}")
message(STATUS "----- Warnings as errors : ${MSVC_W_ERROR}")
endif()
endif()
+option(debug_glibc "Enable libstdc++ debug mode" OFF)
+option(debug_glibc_pedantic "Enable libstdc++pedantic debug mode" OFF)
+
+if(debug_glibc)
+ set(_GLIBCXX_DEBUG 1)
+endif()
+
+if(debug_glibc_pedantic)
+ set(_GLIBCXX_DEBUG_PEDANTIC 1)
+endif()
+
# compiler tests, config.h generation
if(MSVC AND NOT CONFIGURECHECKS)
configure_file(configCompiler.h.msvc ${CMAKE_BINARY_DIR}/configCompiler.h)