]> git.lyx.org Git - features.git/commitdiff
Cmake build: cleanup
authorKornel Benko <kornel@lyx.org>
Thu, 25 Oct 2012 09:19:09 +0000 (11:19 +0200)
committerKornel Benko <kornel@lyx.org>
Thu, 25 Oct 2012 09:19:09 +0000 (11:19 +0200)
development/cmake/modules/LyXCreateImagesResource.cmake
development/cmake/modules/LyXMacros.cmake
src/frontends/qt4/CMakeLists.txt

index 3ab94142ccb0fa7546390506a0af99738d2fc69e..42a7f06d2cc50c8b8040a296b8e4161fddb17edc 100644 (file)
 #  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 #  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #
-# To call this script, one has to proved following parameters
+# To call this script, one has to provide following parameters
 # IMAGES_DIR                # root for the directory-tree for .png and .git image files 
 # RESOURCE_NAME             # full path of the resulting resource-file
-# MAPPED_DIR                # Path-prefix to be removed from the file names
-# -P ${TOP_SRC_DIR}/development/cmake/modules/LyXCreateImagesResource.cmake
+# MAPPED_DIR                # Path-prefix to be removed from the file name entries
 
 set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
 
@@ -38,8 +37,6 @@ file(GLOB_RECURSE images_gif      ${IMAGES_DIR}/*.gif)
 set(images ${images_png} ${images_gif})
 set(resource_name ${RESOURCE_NAME})
 
-#lyx_qt_resources_file(${resource_name} "${MAPPED_DIR}" frontend_qt4_images)
-
 message(STATUS "Generating ${resource_name}")
 
 file(WRITE ${resource_name} "<!DOCTYPE RCC><RCC version=\"1.0\">\n")
index 816112eb544f9f54c3ad1dccd7f7ec3007be89f7..266a76f03c990036729d9a3ae038abbf33478398 100644 (file)
@@ -204,41 +204,6 @@ macro(lyx_const_touched_files _allinone_name _list)
        endforeach (_current_FILE)
 endmacro(lyx_const_touched_files)
 
-
-macro(lyx_qt_resources_file _qrc_name _to_dir _list)
-       if (NOT EXISTS ${_qrc_name})
-               set(_rebuild_file 1)
-       else()
-               FILE(READ ${_qrc_name} _file_content)
-               if (NOT _file_content)
-                       set(_rebuild_file 1)
-               endif()
-       endif()
-
-       if (_rebuild_file)
-               message(STATUS "Generating ${_qrc_name}")
-               file(WRITE  ${_qrc_name} "<!DOCTYPE RCC><RCC version=\"1.0\">\n")
-               file(APPEND  ${_qrc_name} "<qresource>\n")
-
-               foreach (_current_FILE ${${_list}})
-                       get_filename_component(_abs_FILE ${_current_FILE} ABSOLUTE)
-                       string(REGEX REPLACE "${_to_dir}" "" _file_name ${_abs_FILE})
-                       file(APPEND  ${_qrc_name} "      <file alias=\"${_file_name}\">${_abs_FILE}</file>\n")
-               endforeach (_current_FILE)
-
-               file(APPEND  ${_qrc_name} "</qresource>\n")
-               file(APPEND  ${_qrc_name} "</RCC>\n")
-       endif()
-       if(NOT WIN32)
-         add_custom_command(
-           OUTPUT ${_qrc_name}
-           COMMAND ${CMAKE_COMMAND} --build "${CMAKE_BINARY_DIR}" --target rebuild_cache
-           )
-       endif()
-
-endmacro(lyx_qt_resources_file)
-
-
 macro(LYX_OPTION_INIT)
        set(LYX_OPTIONS)
 endmacro()
index bf6cff70ceb8301c4dbdb2297fad25aa3628ed08..44ddaad2c98cb1ef2184c7fd976a3b04bfe3e57f 100644 (file)
@@ -22,12 +22,7 @@ lyx_automoc(${frontends_qt4_sources})
 
 lyx_add_ui_files(frontends_qt4_sources ui_files ${frontend_qt4_UI})
 
-file(GLOB_RECURSE frontend_qt4_images_png      ${TOP_SRC_DIR}/lib/images/*.png)
-file(GLOB_RECURSE frontend_qt4_images_gif      ${TOP_SRC_DIR}/lib/images/*.gif)
 set(resource_name ${CMAKE_CURRENT_BINARY_DIR}/Resources.qrc)
-set(frontend_qt4_images ${frontend_qt4_images_png} ${frontend_qt4_images_gif})
-
-#lyx_qt_resources_file(${resource_name} "${TOP_SRC_DIR}/lib/" frontend_qt4_images)
 
 add_custom_command(
        OUTPUT  ${resource_name}
@@ -38,11 +33,8 @@ add_custom_command(
                -P ${TOP_SRC_DIR}/development/cmake/modules/LyXCreateImagesResource.cmake
        )
 
-add_custom_target(Resources.qrc DEPENDS ${resource_name})
-
 qt4_add_resources(resource_files ${resource_name})
 
-
 add_definitions(-DQT_GENUINE_STR -DLYX_BUILD_QT4_FRONTEND)
 
 include_directories(