set(GROUP_CODE flat)
endif(NOT GROUP_CODE)
+# lyx's source files
+set(LYX_CPP_FILES *.C)
+set(LYX_HPP_FILES *.h)
+
include(LyXPaths)
include(LyXMacros)
include(ProjectSourceGroup)
configure_file(${TOP_SRC_DIR}/src/version.C.in ${CMAKE_CURRENT_BINARY_DIR}/version.C)
-file(GLOB lyx_sources ${TOP_SRC_DIR}/src/*.C)
-file(GLOB lyx_headers ${TOP_SRC_DIR}/src/*.h)
+file(GLOB lyx_sources ${TOP_SRC_DIR}/src/${LYX_CPP_FILES})
+file(GLOB lyx_headers ${TOP_SRC_DIR}/src/${LYX_HPP_FILES})
list(REMOVE_ITEM lyx_sources
${TOP_SRC_DIR}/src/aspell.C
add_subdirectory(${qt_postfix})
-file(GLOB frontends_sources ${TOP_SRC_DIR}/src/frontends/*.C)
-file(GLOB frontends_headers ${TOP_SRC_DIR}/src/frontends/*.h)
+file(GLOB frontends_sources ${TOP_SRC_DIR}/src/frontends/${LYX_CPP_FILES})
+file(GLOB frontends_headers ${TOP_SRC_DIR}/src/frontends/${LYX_HPP_FILES})
lyx_add_msvc_pch(frontends)
project(controllers)
-file(GLOB controllers_sources ${TOP_SRC_DIR}/src/frontends/controllers/*.C)
-file(GLOB controllers_headers ${TOP_SRC_DIR}/src/frontends/controllers/*.h)
+file(GLOB controllers_sources ${TOP_SRC_DIR}/src/frontends/controllers/${LYX_CPP_FILES})
+file(GLOB controllers_headers ${TOP_SRC_DIR}/src/frontends/controllers/${LYX_HPP_FILES})
lyx_add_msvc_pch(controllers)
project(frontend_qt4)
-file(GLOB frontends_qt4_sources ${TOP_SRC_DIR}/src/frontends/qt4/*.C)
-file(GLOB frontends_qt4_headers ${TOP_SRC_DIR}/src/frontends/qt4/*.h)
+file(GLOB frontends_qt4_sources ${TOP_SRC_DIR}/src/frontends/qt4/${LYX_CPP_FILES})
+file(GLOB frontends_qt4_headers ${TOP_SRC_DIR}/src/frontends/qt4/${LYX_HPP_FILES})
file(GLOB frontend_qt4_UI ${TOP_SRC_DIR}/src/frontends/qt4/ui/*.ui)
lyx_add_msvc_pch(frontends_qt4)
project(graphics)
-file(GLOB graphics_sources ${TOP_SRC_DIR}/src/graphics/*.C)
-file(GLOB graphics_headers ${TOP_SRC_DIR}/src/graphics/*.h)
+file(GLOB graphics_sources ${TOP_SRC_DIR}/src/graphics/${LYX_CPP_FILES})
+file(GLOB graphics_headers ${TOP_SRC_DIR}/src/graphics/${LYX_HPP_FILES})
lyx_add_msvc_pch(graphics)
project(insets)
-file(GLOB insets_sources ${TOP_SRC_DIR}/src/insets/*.C)
-file(GLOB insets_headers ${TOP_SRC_DIR}/src/insets/*.h)
+file(GLOB insets_sources ${TOP_SRC_DIR}/src/insets/${LYX_CPP_FILES})
+file(GLOB insets_headers ${TOP_SRC_DIR}/src/insets/${LYX_HPP_FILES})
list(REMOVE_ITEM insets_sources ${TOP_SRC_DIR}/src/insets/insettheorem.C)
project(mathed)
-file(GLOB mathed_sources ${TOP_SRC_DIR}/src/mathed/*.C)
-file(GLOB mathed_headers ${TOP_SRC_DIR}/src/mathed/*.h)
+file(GLOB mathed_sources ${TOP_SRC_DIR}/src/mathed/${LYX_CPP_FILES})
+file(GLOB mathed_headers ${TOP_SRC_DIR}/src/mathed/${LYX_CPP_FILES})
list(REMOVE_ITEM mathed_sources
${TOP_SRC_DIR}/src/mathed/InsetMathXYArrow.C
configure_file(${TOP_SRC_DIR}/src/support/package.C.in
${CMAKE_CURRENT_BINARY_DIR}/package.C)
-file(GLOB support_sources ${TOP_SRC_DIR}/src/support/*.C)
-file(GLOB support_headers ${TOP_SRC_DIR}/src/support/*.h)
+file(GLOB support_sources ${TOP_SRC_DIR}/src/support/${LYX_CPP_FILES})
+file(GLOB support_headers ${TOP_SRC_DIR}/src/support/${LYX_HPP_FILES})
list(REMOVE_ITEM support_sources
${TOP_SRC_DIR}/src/support/os_win32.C