]> git.lyx.org Git - lyx.git/blobdiff - development/cmake/modules/LyXMacros.cmake
Merge branch 'master' of git.lyx.org:lyx
[lyx.git] / development / cmake / modules / LyXMacros.cmake
index bb26e6687b11ac88615d5bc0050d3bee1b112255..266a76f03c990036729d9a3ae038abbf33478398 100644 (file)
@@ -204,34 +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()
-endmacro(lyx_qt_resources_file)
-
-
 macro(LYX_OPTION_INIT)
        set(LYX_OPTIONS)
 endmacro()
@@ -264,10 +236,16 @@ endmacro()
 macro(LYX_OPTION_LIST_ALL)
        if(UNIX)
                set(run_cmake ${CMAKE_BINARY_DIR}/run_cmake.sh)
-               file(WRITE ${run_cmake} "#!/bin/bash\n")
-               file(APPEND ${run_cmake} "cmake ${CMAKE_SOURCE_DIR} \\\n")
+               file(WRITE ${run_cmake} "#!/bin/bash \n")
                execute_process(COMMAND chmod 755 ${run_cmake})
+               set(cont "\\\n")
+       elseif(WIN32)
+               set(run_cmake ${CMAKE_BINARY_DIR}/run_cmake.bat)
+               file(WRITE ${run_cmake} "")
+               set(cont "<nul ^\n")
        endif()
+       file(APPEND ${run_cmake} "cmake ${CMAKE_SOURCE_DIR}  ${cont}")
+       file(APPEND ${run_cmake} " -G\"${CMAKE_GENERATOR}\"  ${cont}")
        foreach(_option ${LYX_OPTIONS})
                if(${_option}_show_message OR ${ARGV0} STREQUAL "help")
                        string(SUBSTRING "${_option}                            " 0 25 _var)
@@ -278,17 +256,13 @@ macro(LYX_OPTION_LIST_ALL)
                        endif()
                        string(SUBSTRING "${_isset}     " 0 4 _val)
                        message(STATUS "${_var}= ${_val}   : ${${_option}_description}")
-               endif()
-               if(UNIX)
-                       file(APPEND ${run_cmake} "    -D${_option}=${${_option}}             \\\n")
+                       file(APPEND ${run_cmake} " -D${_option}=${${_option}}  ${cont}")
                endif()
        endforeach()
-       if(UNIX)
-               file(APPEND ${run_cmake} "\n")
-               message(STATUS)
-               message(STATUS "CMake command with options is available in shell script")
-               message(STATUS "    '${run_cmake}'")
-       endif()
+       file(APPEND ${run_cmake} "\n")
+       message(STATUS)
+       message(STATUS "CMake command with options is available in shell script")
+       message(STATUS "    '${run_cmake}'")
 endmacro()
 
 macro(lyx_add_info_files group)