]> git.lyx.org Git - lyx.git/blob - src/tests/CMakeLists.txt
Some more oxygen svg icon fixes
[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        tests/boost.cpp tests/dummy_functions.cpp)
12   list(APPEND check_layout_SOURCES "${TOP_SRC_DIR}/src/${_f}")
13 endforeach()
14
15 include_directories(${TOP_SRC_DIR}/src/support/tests)
16
17 add_executable(check_layout ${check_layout_SOURCES})
18
19 target_link_libraries(check_layout support
20   ${Lyx_Boost_Libraries} ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY}
21   ${ZLIB_LIBRARY} ${ICONV_LIBRARY})
22 if(CYGWIN)
23     target_link_libraries(check_layout shlwapi)
24 endif()
25 lyx_target_link_libraries(check_layout Magic)
26
27 add_dependencies(lyx_run_tests check_layout)
28 set_target_properties(check_layout PROPERTIES FOLDER "tests/src")
29
30 file(GLOB layout_files RELATIVE "${TOP_SRC_DIR}/lib/layouts" "${TOP_SRC_DIR}/lib/layouts/*.layout")
31 list(SORT layout_files)
32 foreach(bns ${layout_files}) 
33   string(REPLACE ".layout" "" bn ${bns})
34
35   add_test(NAME "check_layout/${bns}"
36     COMMAND check_layout "${TOP_SRC_DIR}/lib/layouts/${bn}")
37   settestlabel("check_layout/${bns}" "layout")
38 endforeach()
39
40 set(check_ExternalTransforms_SOURCES)
41 foreach(_f graphics/GraphicsParams.cpp insets/ExternalTransforms.cpp
42         Length.cpp lengthcommon.cpp tests/check_ExternalTransforms.cpp
43         tests/boost.cpp tests/dummy_functions.cpp)
44     list(APPEND check_ExternalTransforms_SOURCES ${TOP_SRC_DIR}/src/${_f})
45 endforeach()
46
47 include_directories(${TOP_SRC_DIR}/src/tests)
48 add_executable(check_ExternalTransforms ${check_ExternalTransforms_SOURCES})
49
50 target_link_libraries(check_ExternalTransforms support
51         ${Lyx_Boost_Libraries} ${QT_QTCORE_LIBRARY})
52
53 add_dependencies(lyx_run_tests check_ExternalTransforms)
54 set_target_properties(check_ExternalTransforms PROPERTIES FOLDER "tests/src")
55 target_link_libraries(check_ExternalTransforms ${ICONV_LIBRARY})
56
57 add_test(NAME "check_ExternalTransforms"
58   COMMAND ${CMAKE_COMMAND} -DCommand=$<TARGET_FILE:check_ExternalTransforms>
59         "-DInput=${TOP_SRC_DIR}/src/tests/regfiles/ExternalTransforms"
60         "-DOutput=${CMAKE_CURRENT_BINARY_DIR}/ExternalTransforms_data"
61         -P "${TOP_SRC_DIR}/src/support/tests/supporttest.cmake")
62 add_dependencies(lyx_run_tests check_ExternalTransforms)
63