]> git.lyx.org Git - lyx.git/blob - src/tests/CMakeLists.txt
Remove dependency on NO_LAYOUT_CSS #define in Layout.cpp
[lyx.git] / src / tests / CMakeLists.txt
1 # This file is part of LyX, the document processor.
2 # Licence details can be found in the file COPYING.
3 #
4 # Copyright (c) 2013 Kornel Benko kornel@lyx.org
5 #
6
7 set(check_layout_SOURCES)
8 foreach(_f insets/InsetLayout.cpp Color.cpp Counters.cpp Floating.cpp
9        FloatList.cpp FontInfo.cpp Layout.cpp LayoutFile.cpp Lexer.cpp
10        ModuleList.cpp Spacing.cpp TextClass.cpp tests/check_layout.cpp
11        support/tests/boost.cpp support/tests/dummy_functions.cpp)
12   list(APPEND check_layout_SOURCES "${TOP_SRC_DIR}/src/${_f}")
13 endforeach()
14
15 add_executable(check_layout ${check_layout_SOURCES})
16
17 target_link_libraries(check_layout support
18   ${Lyx_Boost_Libraries} ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY}
19   ${ZLIB_LIBRARY} ${ICONV_LIBRARY})
20
21 add_dependencies(lyx_run_tests check_layout)
22 set_target_properties(check_layout PROPERTIES FOLDER "tests/src")
23
24 file(GLOB layout_files RELATIVE "${TOP_SRC_DIR}/lib/layouts" "${TOP_SRC_DIR}/lib/layouts/*.layout")
25 list(SORT layout_files)
26 foreach(bns ${layout_files}) 
27   string(REPLACE ".layout" "" bn ${bns})
28
29   add_test(NAME "check_layout/${bns}"
30     COMMAND check_layout "${TOP_SRC_DIR}/lib/layouts/${bn}")
31   settestlabel("check_layout/${bns}" "layout")
32 endforeach()