mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
Cmake build:
Creating LYX_DATE dynamically at configure-time caused unwanted recompilation of the whole directories (src + src/tex2lyx) because all the relevant objects were dependent of a common file (flags.make in case of "Unix makefiles") which changed accordingly. There is now a new include (lyx_date.h, with only one definition) Nothing changes for automake, since in this case LYX_DATE is defined in config.h
This commit is contained in:
parent
4f20946258
commit
419f32df91
@ -673,6 +673,7 @@ else()
|
||||
endif()
|
||||
|
||||
configure_file(${LYX_CMAKE_DIR}/config.h.cmake ${TOP_BINARY_DIR}/config.h)
|
||||
configure_file(${LYX_CMAKE_DIR}/lyx_date.h.cmake ${TOP_BINARY_DIR}/lyx_date.h)
|
||||
|
||||
# Compute qt4-version from ${QTVERSION}
|
||||
if(QTVERSION MATCHES "^([0-9]+)\\.([0-9]+)\\.([0-9]+).*")
|
||||
|
18
development/cmake/lyx_date.h.cmake
Normal file
18
development/cmake/lyx_date.h.cmake
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
* \file config.h
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* This is the compilation configuration file for LyX.
|
||||
* It was generated by cmake.
|
||||
* You might want to change some of the defaults if something goes wrong
|
||||
* during the compilation.
|
||||
*/
|
||||
|
||||
#ifndef _LYX_DATE_H
|
||||
#define _LYX_DATE_H
|
||||
|
||||
#cmakedefine LYX_DATE "${LYX_DATE}"
|
||||
|
||||
#endif
|
||||
|
@ -31,8 +31,6 @@ list(REMOVE_ITEM lyx_sources
|
||||
${TOP_SRC_DIR}/src/lyxinsets.cpp
|
||||
${TOP_SRC_DIR}/src/lyxmathed.cpp)
|
||||
|
||||
set_property(SOURCE "${TOP_SRC_DIR}/src/version.cpp" APPEND PROPERTY COMPILE_DEFINITIONS LYX_DATE="${LYX_DATE}")
|
||||
|
||||
list(REMOVE_ITEM lyx_headers
|
||||
${TOP_SRC_DIR}/src/Variables.h
|
||||
${TOP_SRC_DIR}/src/Section.h)
|
||||
|
@ -21,8 +21,6 @@ foreach(_src graphics/GraphicsParams insets/ExternalTemplate
|
||||
list(APPEND LINKED_headers ${TOP_SRC_DIR}/src/${_src}.h)
|
||||
endforeach(_src)
|
||||
|
||||
set_property(SOURCE "${TOP_SRC_DIR}/src/version.cpp" APPEND PROPERTY COMPILE_DEFINITIONS LYX_DATE="${LYX_DATE}")
|
||||
|
||||
file(GLOB tex2lyx_sources ${TOP_SRC_DIR}/src/tex2lyx/${LYX_CPP_FILES})
|
||||
|
||||
file(GLOB tex2lyx_headers ${TOP_SRC_DIR}/src/tex2lyx/${LYX_HPP_FILES})
|
||||
|
@ -10,6 +10,9 @@
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#if ! defined(LYX_DATE)
|
||||
#include <lyx_date.h>
|
||||
#endif
|
||||
|
||||
///
|
||||
extern char const * const lyx_version = PACKAGE_VERSION;
|
||||
|
Loading…
Reference in New Issue
Block a user