From: Peter Kümmel Date: Sun, 26 Aug 2007 08:51:47 +0000 (+0000) Subject: fix cmake build for tex2lyx X-Git-Tag: 1.6.10~8701 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=091b334152707f61d24f536fc96b12096c62d557;p=features.git fix cmake build for tex2lyx git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19803 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/development/cmake/CMakeLists.txt b/development/cmake/CMakeLists.txt index 9e1b41fb77..0b8eafe7d8 100644 --- a/development/cmake/CMakeLists.txt +++ b/development/cmake/CMakeLists.txt @@ -40,18 +40,18 @@ include(LyXPaths) include(LyXMacros) include(ProjectSourceGroup) -if(merge) +if(merge OR merge_rebuild) set(merge 1 CACHE TYPE STRING FORCE) set(MERGE_FILES 1 CACHE TYPE STRING FORCE) message(STATUS "") message(STATUS "All *.cpp files of a project are merged into two files, disable with -Dmerge=0") message(STATUS "") set(disable-pch 1) -else(merge) +else(merge OR merge_rebuild) set(merge 0 CACHE TYPE STRING FORCE) set(MERGE_FILES 0 CACHE TYPE STRING FORCE) message(STATUS "Enable merging files with -Dmerge=1") -endif(merge) +endif(merge OR merge_rebuild) set(CMAKE_BUILD_TYPE) diff --git a/development/cmake/src/CMakeLists.txt b/development/cmake/src/CMakeLists.txt index 4a3c671c86..cd5da58bff 100644 --- a/development/cmake/src/CMakeLists.txt +++ b/development/cmake/src/CMakeLists.txt @@ -13,9 +13,8 @@ add_subdirectory(graphics) add_subdirectory(insets) add_subdirectory(mathed) add_subdirectory(support) -if(NOT MERGE_FILES) - add_subdirectory(tex2lyx) -endif(NOT MERGE_FILES) +add_subdirectory(tex2lyx) + file(GLOB lyx_sources ${TOP_SRC_DIR}/src/${LYX_CPP_FILES}) diff --git a/development/cmake/src/tex2lyx/CMakeLists.txt b/development/cmake/src/tex2lyx/CMakeLists.txt index aa56fa52e1..4fd9e7a907 100644 --- a/development/cmake/src/tex2lyx/CMakeLists.txt +++ b/development/cmake/src/tex2lyx/CMakeLists.txt @@ -8,7 +8,7 @@ project(tex2lyx) -set(LINKED_FILES +set(LINKED_sources ${TOP_SRC_DIR}/src/FloatList.cpp ${TOP_SRC_DIR}/src/Floating.cpp ${TOP_SRC_DIR}/src/Counters.cpp @@ -17,12 +17,17 @@ set(LINKED_FILES ${TOP_SRC_DIR}/src/Lexer.cpp ) +set(LINKED_headers + ${TOP_SRC_DIR}/src/Layout.h + ${TOP_SRC_DIR}/src/TextClass.h +) + set(tex2lyx_sources ${TOP_SRC_DIR}/src/tex2lyx/boost.cpp ${TOP_SRC_DIR}/src/tex2lyx/Context.cpp + ${TOP_SRC_DIR}/src/tex2lyx/Font.cpp ${TOP_SRC_DIR}/src/tex2lyx/gettext.cpp ${TOP_SRC_DIR}/src/tex2lyx/lengthcommon.cpp - ${TOP_SRC_DIR}/src/tex2lyx/Font.cpp ${TOP_SRC_DIR}/src/tex2lyx/Parser.cpp ${TOP_SRC_DIR}/src/tex2lyx/tex2lyx.cpp ${TOP_SRC_DIR}/src/tex2lyx/preamble.cpp @@ -32,8 +37,6 @@ set(tex2lyx_sources ) set(tex2lyx_headers - ${TOP_SRC_DIR}/src/Layout.h - ${TOP_SRC_DIR}/src/TextClass.h ${TOP_SRC_DIR}/src/tex2lyx/Spacing.h ${TOP_SRC_DIR}/src/tex2lyx/Context.h ${TOP_SRC_DIR}/src/tex2lyx/Font.h @@ -41,18 +44,17 @@ set(tex2lyx_headers ${TOP_SRC_DIR}/src/tex2lyx/tex2lyx.h ) -include_directories(BEFORE ${TOP_SRC_DIR}/src/tex2lyx) +include_directories(BEFORE ${TOP_SRC_DIR}/src/tex2lyx ${TOP_SRC_DIR}/src/support/minizip ${ZLIB_INCLUDE_DIR}) add_definitions(-DTEX2LYX) -#TODO -#if(NOT MERGE_FILES) - add_executable(tex2lyx ${tex2lyx_sources} ${LINKED_FILES} ${tex2lyx_headers}) -#else(NOT MERGE_FILES) -# set(tex2lyx_sources_all ${tex2lyx_sources} ${LINKED_FILES}) -# lyx_merge_files(${CMAKE_CURRENT_BINARY_DIR}/tex2lyx_allinone.C tex2lyx_sources_all) -# add_executable(tex2lyx ${CMAKE_CURRENT_BINARY_DIR}/tex2lyx_allinone.C) -#endif(NOT MERGE_FILES) +if(NOT MERGE_FILES) + add_executable(tex2lyx ${tex2lyx_sources} ${LINKED_sources} ${tex2lyx_headers} ${LINKED_headers}) +else(NOT MERGE_FILES) + lyx_const_touched_files(_allinone tex2lyx_sources) + lyx_const_touched_files(_allinone_linked LINKED_sources) + add_executable(tex2lyx ${_allinone_files} ${_allinone_linked_files}) +endif(NOT MERGE_FILES) target_link_libraries(tex2lyx