mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Cmake build: cleanup
This commit is contained in:
parent
d1ca207e94
commit
1b65a03c13
@ -24,11 +24,10 @@
|
||||
# (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")
|
||||
|
@ -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()
|
||||
|
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user