mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
fix cmake build for tex2lyx
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19803 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9fe6ea87b2
commit
091b334152
@ -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)
|
||||
|
@ -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})
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user