Qt5CoreMacros: Sync with CMake project counterpart
Port of CMake commits:
commit 2622bc3f65162bf6d6cb5838da6999f8b5ca75cf
Author: Rolf Eike Beer <eike@sf-mail.de>
Date: Sun Apr 6 21:30:00 2014 +0200
Clean up usage of if(... MATCHES regex) followed string(REGEX REPLACE regex)
commit 7beba98652212c7a44f291b51dd03681e5193c49
Author: Robert Maynard <robert.maynard@kitware.com>
Date: Thu Apr 3 11:27:58 2014 -0400
Qt4Macros: Make QT4_CREATE_MOC_COMMAND a function
Change-Id: I5b928d114adb393ed9370163609311b7486e4a36
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
bb10
parent
b17e71dd08
commit
feea236d92
|
|
@ -53,8 +53,8 @@ macro(QT5_MAKE_OUTPUT_FILE infile prefix ext outfile )
|
|||
else()
|
||||
file(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile})
|
||||
endif()
|
||||
if(WIN32 AND rel MATCHES "^[a-zA-Z]:") # absolute path
|
||||
string(REGEX REPLACE "^([a-zA-Z]):(.*)$" "\\1_\\2" rel "${rel}")
|
||||
if(WIN32 AND rel MATCHES "^([a-zA-Z]):(.*)$") # absolute path
|
||||
set(rel "${CMAKE_MATCH_1}_${CMAKE_MATCH_2}")
|
||||
endif()
|
||||
set(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}")
|
||||
string(REPLACE ".." "__" _outfile ${_outfile})
|
||||
|
|
@ -94,7 +94,7 @@ endmacro()
|
|||
|
||||
|
||||
# helper macro to set up a moc rule
|
||||
macro(QT5_CREATE_MOC_COMMAND infile outfile moc_flags moc_options moc_target)
|
||||
function(QT5_CREATE_MOC_COMMAND infile outfile moc_flags moc_options moc_target)
|
||||
# Pass the parameters in a file. Set the working directory to
|
||||
# be that containing the parameters file and reference it by
|
||||
# just the file name. This is necessary because the moc tool on
|
||||
|
|
@ -134,7 +134,7 @@ macro(QT5_CREATE_MOC_COMMAND infile outfile moc_flags moc_options moc_target)
|
|||
DEPENDS ${infile}
|
||||
${_moc_working_dir}
|
||||
VERBATIM)
|
||||
endmacro()
|
||||
endfunction()
|
||||
|
||||
|
||||
function(QT5_GENERATE_MOC infile outfile )
|
||||
|
|
|
|||
Loading…
Reference in New Issue