From 66aea64a212563d6aa0aca4be6f80c13c9d0bca2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Peter=20K=C3=BCmmel?= Date: Wed, 4 Apr 2007 19:21:16 +0000 Subject: [PATCH] cmake: simplify all-in-one file naming git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17722 a592a061-630c-0410-9148-cb99ea01b6c8 --- development/cmake/boost/libs/filesystem/CMakeLists.txt | 4 ++-- development/cmake/boost/libs/iostreams/CMakeLists.txt | 4 ++-- development/cmake/boost/libs/signals/CMakeLists.txt | 4 ++-- development/cmake/modules/LyXMacros.cmake | 7 ++++--- development/cmake/src/CMakeLists.txt | 4 ++-- development/cmake/src/frontends/CMakeLists.txt | 4 ++-- development/cmake/src/frontends/controllers/CMakeLists.txt | 4 ++-- development/cmake/src/frontends/qt4/CMakeLists.txt | 4 ++-- development/cmake/src/graphics/CMakeLists.txt | 4 ++-- development/cmake/src/insets/CMakeLists.txt | 4 ++-- development/cmake/src/mathed/CMakeLists.txt | 4 ++-- development/cmake/src/support/CMakeLists.txt | 4 ++-- 12 files changed, 26 insertions(+), 25 deletions(-) diff --git a/development/cmake/boost/libs/filesystem/CMakeLists.txt b/development/cmake/boost/libs/filesystem/CMakeLists.txt index 4a7ed857ef..c92b59c4ee 100644 --- a/development/cmake/boost/libs/filesystem/CMakeLists.txt +++ b/development/cmake/boost/libs/filesystem/CMakeLists.txt @@ -19,7 +19,7 @@ if(NOT MERGE_FILES) add_library(boost_filesystem STATIC ${boost_filesystem_sources}) else(NOT MERGE_FILES) add_definitions(-D_WIN32_WINNT=0x500) - lyx_const_touched_files(_allinone const_touched_files boost_filesystem_sources) - add_library(boost_filesystem STATIC ${const_touched_files}) + lyx_const_touched_files(_allinone boost_filesystem_sources) + add_library(boost_filesystem STATIC ${_allinone_files}) endif(NOT MERGE_FILES) diff --git a/development/cmake/boost/libs/iostreams/CMakeLists.txt b/development/cmake/boost/libs/iostreams/CMakeLists.txt index dcd9732890..46c5b9e7c2 100644 --- a/development/cmake/boost/libs/iostreams/CMakeLists.txt +++ b/development/cmake/boost/libs/iostreams/CMakeLists.txt @@ -19,8 +19,8 @@ include_directories(${ZLIB_INCLUDE_DIR}) if(NOT MERGE_FILES) add_library(boost_iostreams STATIC ${boost_iostreams_sources}) else(NOT MERGE_FILES) - lyx_const_touched_files(_allinone const_touched_files boost_iostreams_sources) - add_library(boost_iostreams STATIC ${const_touched_files}) + lyx_const_touched_files(_allinone boost_iostreams_sources) + add_library(boost_iostreams STATIC ${_allinone_files}) endif(NOT MERGE_FILES) diff --git a/development/cmake/boost/libs/signals/CMakeLists.txt b/development/cmake/boost/libs/signals/CMakeLists.txt index f5266d580b..c794d61ebd 100644 --- a/development/cmake/boost/libs/signals/CMakeLists.txt +++ b/development/cmake/boost/libs/signals/CMakeLists.txt @@ -19,7 +19,7 @@ lyx_add_path(boost_signals_sources ${TOP_SRC_DIR}/boost/libs/signals/src) if(NOT MERGE_FILES) add_library(boost_signals STATIC ${boost_signals_sources}) else(NOT MERGE_FILES) - lyx_const_touched_files(_allinone const_touched_files boost_signals_sources) - add_library(boost_signals STATIC ${const_touched_files}) + lyx_const_touched_files(_allinone boost_signals_sources) + add_library(boost_signals STATIC ${_allinone_files}) endif(NOT MERGE_FILES) diff --git a/development/cmake/modules/LyXMacros.cmake b/development/cmake/modules/LyXMacros.cmake index ad80d4c65d..8af9eca67d 100644 --- a/development/cmake/modules/LyXMacros.cmake +++ b/development/cmake/modules/LyXMacros.cmake @@ -126,7 +126,8 @@ MACRO (LYX_AUTOMOC) endmacro (LYX_AUTOMOC) -macro(lyx_const_touched_files _allinone_name _new_list _list) +macro(lyx_const_touched_files _allinone_name _list) + set(_file_list ${_allinone_name}_files) set(_file_const ${CMAKE_CURRENT_BINARY_DIR}/${_allinone_name}_const.C) set(_file_touched ${CMAKE_CURRENT_BINARY_DIR}/${_allinone_name}_touched.C) @@ -138,7 +139,7 @@ macro(lyx_const_touched_files _allinone_name _new_list _list) file(APPEND ${_file_touched} "#define DONT_INCLUDE_CONST_FILES\n") file(APPEND ${_file_touched} "#include \"${_file_const}\"\n\n\n") - set(${_new_list} ${_file_const} ${_file_touched}) + set(${_file_list} ${_file_const} ${_file_touched}) foreach (_current_FILE ${${_list}}) get_filename_component(_abs_FILE ${_current_FILE} ABSOLUTE) @@ -146,7 +147,7 @@ macro(lyx_const_touched_files _allinone_name _new_list _list) # because then cmake will not know the dependencies get_source_file_property(_isGenerated ${_abs_FILE} GENERATED) if (_isGenerated) - list(APPEND ${_new_list} ${_abs_FILE}) + list(APPEND ${_file_list} ${_abs_FILE}) else (_isGenerated) GET_FILENAME_COMPONENT(_file_name ${_abs_FILE} NAME_WE) STRING(REGEX REPLACE "-" "_" _file_name "${_file_name}" ) diff --git a/development/cmake/src/CMakeLists.txt b/development/cmake/src/CMakeLists.txt index 94f424a43b..912eaad962 100644 --- a/development/cmake/src/CMakeLists.txt +++ b/development/cmake/src/CMakeLists.txt @@ -43,8 +43,8 @@ lyx_add_msvc_pch(lyx) if(NOT MERGE_FILES) set(lyx_sources ${lyx_sources} ${CMAKE_CURRENT_BINARY_DIR}/version.C) else(NOT MERGE_FILES) - lyx_const_touched_files(_allinone const_touched_files lyx_sources) - set(lyx_sources ${const_touched_files} ${CMAKE_CURRENT_BINARY_DIR}/version.C + lyx_const_touched_files(_allinone lyx_sources) + set(lyx_sources ${_allinone_files} ${CMAKE_CURRENT_BINARY_DIR}/version.C ) endif(NOT MERGE_FILES) diff --git a/development/cmake/src/frontends/CMakeLists.txt b/development/cmake/src/frontends/CMakeLists.txt index b1b1773f73..00715e013e 100644 --- a/development/cmake/src/frontends/CMakeLists.txt +++ b/development/cmake/src/frontends/CMakeLists.txt @@ -21,8 +21,8 @@ lyx_add_msvc_pch(frontends) if(NOT MERGE_FILES) add_library(frontends ${library_type} ${frontends_sources} ${frontends_headers}) else(NOT MERGE_FILES) - lyx_const_touched_files(_allinone const_touched_files frontends_sources) - add_library(frontends ${library_type} ${const_touched_files}) + lyx_const_touched_files(_allinone frontends_sources) + add_library(frontends ${library_type} ${_allinone_files}) endif(NOT MERGE_FILES) project_source_group("${GROUP_CODE}" frontends_sources frontends_headers) diff --git a/development/cmake/src/frontends/controllers/CMakeLists.txt b/development/cmake/src/frontends/controllers/CMakeLists.txt index 5fea7ac305..08a279d1dd 100644 --- a/development/cmake/src/frontends/controllers/CMakeLists.txt +++ b/development/cmake/src/frontends/controllers/CMakeLists.txt @@ -16,8 +16,8 @@ include_directories(${TOP_SRC_DIR}/src/frontends/controllers) if(NOT MERGE_FILES) add_library(controllers ${library_type} ${controllers_sources} ${controllers_headers}) else(NOT MERGE_FILES) - lyx_const_touched_files(_allinone const_touched_files controllers_sources) - add_library(controllers ${library_type} ${const_touched_files}) + lyx_const_touched_files(_allinone controllers_sources) + add_library(controllers ${library_type} ${_allinone_files}) endif(NOT MERGE_FILES) target_link_libraries(controllers boost_regex boost_filesystem) diff --git a/development/cmake/src/frontends/qt4/CMakeLists.txt b/development/cmake/src/frontends/qt4/CMakeLists.txt index 002436abbc..a4419c3669 100644 --- a/development/cmake/src/frontends/qt4/CMakeLists.txt +++ b/development/cmake/src/frontends/qt4/CMakeLists.txt @@ -37,12 +37,12 @@ if(MERGE_FILES) list(REVERSE frontends_qt4_sources) list(REMOVE_ITEM frontends_qt4_sources ${TOP_SRC_DIR}/src/frontends/qt4/GuiApplication.C) list(APPEND frontends_qt4_sources ${TOP_SRC_DIR}/src/frontends/qt4/GuiApplication.C) - lyx_const_touched_files(_allinone const_touched_files frontends_qt4_sources) + lyx_const_touched_files(_allinone frontends_qt4_sources) set(depends_moc_uic ${frontends_qt4_headers} ${ui_files}) SET_SOURCE_FILES_PROPERTIES(_allinone_const.C PROPERTIES OBJECT_DEPENDS "${depends_moc_uic}") SET_SOURCE_FILES_PROPERTIES(_allinone_touched.C PROPERTIES OBJECT_DEPENDS "${depends_moc_uic}") add_library(frontend_qt4 ${library_type} - ${const_touched_files} + ${_allinone_files} ${frontends_qt4_headers} ${ui_files} ) diff --git a/development/cmake/src/graphics/CMakeLists.txt b/development/cmake/src/graphics/CMakeLists.txt index 61b73a053d..223c63c7f0 100644 --- a/development/cmake/src/graphics/CMakeLists.txt +++ b/development/cmake/src/graphics/CMakeLists.txt @@ -17,8 +17,8 @@ include_directories(${TOP_SRC_DIR}/src/graphics) if(NOT MERGE_FILES) add_library(graphics ${library_type} ${graphics_sources} ${graphics_headers}) else(NOT MERGE_FILES) - lyx_const_touched_files(_allinone const_touched_files graphics_sources) - add_library(graphics ${library_type} ${const_touched_files}) + lyx_const_touched_files(_allinone graphics_sources) + add_library(graphics ${library_type} ${_allinone_files}) endif(NOT MERGE_FILES) project_source_group("${GROUP_CODE}" graphics_sources graphics_headers) diff --git a/development/cmake/src/insets/CMakeLists.txt b/development/cmake/src/insets/CMakeLists.txt index d65ee9f3f6..a442315b49 100644 --- a/development/cmake/src/insets/CMakeLists.txt +++ b/development/cmake/src/insets/CMakeLists.txt @@ -19,8 +19,8 @@ include_directories(${TOP_SRC_DIR}/src/insets) if(NOT MERGE_FILES) add_library(insets ${library_type} ${insets_sources} ${insets_headers}) else(NOT MERGE_FILES) - lyx_const_touched_files(_allinone const_touched_files insets_sources) - add_library(insets ${library_type} ${const_touched_files}) + lyx_const_touched_files(_allinone insets_sources) + add_library(insets ${library_type} ${_allinone_files}) endif(NOT MERGE_FILES) diff --git a/development/cmake/src/mathed/CMakeLists.txt b/development/cmake/src/mathed/CMakeLists.txt index 30475eaa57..c80c14d064 100644 --- a/development/cmake/src/mathed/CMakeLists.txt +++ b/development/cmake/src/mathed/CMakeLists.txt @@ -20,8 +20,8 @@ include_directories(${TOP_SRC_DIR}/src/mathed) if(NOT MERGE_FILES) add_library(mathed ${library_type} ${mathed_sources} ${mathed_headers}) else(NOT MERGE_FILES) - lyx_const_touched_files(_allinone const_touched_files mathed_sources) - add_library(mathed ${library_type} ${const_touched_files}) + lyx_const_touched_files(_allinone mathed_sources) + add_library(mathed ${library_type} ${_allinone_files}) endif(NOT MERGE_FILES) diff --git a/development/cmake/src/support/CMakeLists.txt b/development/cmake/src/support/CMakeLists.txt index 6d1a242988..925a5625e6 100644 --- a/development/cmake/src/support/CMakeLists.txt +++ b/development/cmake/src/support/CMakeLists.txt @@ -35,8 +35,8 @@ else(NOT MERGE_FILES) list(REMOVE_ITEM support_sources ${TOP_SRC_DIR}/src/support/lstrings.C) list(APPEND support_sources ${TOP_SRC_DIR}/src/support/lstrings.C) list(REVERSE support_sources) - lyx_const_touched_files(_allinone const_touched_files support_sources) - add_library(support ${library_type} ${const_touched_files}) + lyx_const_touched_files(_allinone support_sources) + add_library(support ${library_type} ${_allinone_files}) endif(NOT MERGE_FILES) -- 2.39.5