Cmake build:

Partially revert 75d63ad1f2
It caused recompiling everything at each commit.
Now use definition of LYX_DATE only when compiling version.cpp
This commit is contained in:
Kornel Benko 2012-10-15 13:16:08 +02:00
parent 1406b0e638
commit 24206e2c67
3 changed files with 5 additions and 2 deletions

View File

@ -34,7 +34,6 @@
#cmakedefine PACKAGE_VERSION "${PACKAGE_VERSION}"
#define PACKAGE_STRING "LyX ${PACKAGE_VERSION}"
#cmakedefine PACKAGE_BUGREPORT "${PACKAGE_BUGREPORT}"
#cmakedefine LYX_DATE "${LYX_DATE}"
#cmakedefine VERSION_INFO "${VERSION_INFO}"
#cmakedefine LYX_DIR_VER "${LYX_DIR_VER}"
#cmakedefine LYX_USERDIR_VER "${LYX_USERDIR_VER}"

View File

@ -31,13 +31,15 @@ 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)
if(NOT APPLE)
list(REMOVE_ITEM lyx_sources ${TOP_SRC_DIR}/src/AppleSpellChecker.cpp)
list(REMOVE_ITEM lyx_headers ${TOP_SRC_DIR}/src/AppleSpellChecker.h)
endif()
if(NOT ASPELL_FOUND)

View File

@ -21,6 +21,8 @@ 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})