mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
cmake: cleanup
This commit is contained in:
parent
41d19dd4c8
commit
1e196613e6
4 changed files with 1 additions and 79 deletions
|
@ -161,9 +161,6 @@
|
|||
# KDE4_ADD_UI_FILES (SRCS_VAR file1.ui ... fileN.ui)
|
||||
# Use this to add Qt designer ui files to your application/library.
|
||||
#
|
||||
# KDE4_ADD_UI3_FILES (SRCS_VAR file1.ui ... fileN.ui)
|
||||
# Use this to add Qt designer ui files from Qt version 3 to your application/library.
|
||||
#
|
||||
# KDE4_ADD_KCFG_FILES (SRCS_VAR [GENERATE_MOC] [USE_RELATIVE_PATH] file1.kcfgc ... fileN.kcfgc)
|
||||
# Use this to add KDE config compiler files to your application/library.
|
||||
# Use optional GENERATE_MOC to generate moc if you use signals in your kcfg files.
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
# this file contains the following macros (or functions):
|
||||
# KDE4_ADD_UI_FILES
|
||||
# KDE4_ADD_UI3_FILES
|
||||
# KDE4_ADD_KCFG_FILES
|
||||
# _KDE4_SET_CUSTOM_TARGET_PROPERTY
|
||||
# _KDE4_GET_CUSTOM_TARGET_PROPERTY
|
||||
|
@ -184,56 +183,6 @@ macro (_KDE4_GET_MOC_FLAGS _moc_flags)
|
|||
endmacro(_KDE4_GET_MOC_FLAGS)
|
||||
|
||||
|
||||
#create the implementation files from the ui files and add them to the list of sources
|
||||
#usage: KDE4_ADD_UI3_FILES(foo_SRCS ${ui_files})
|
||||
macro (KDE4_ADD_UI3_FILES _sources )
|
||||
|
||||
_kde4_get_moc_flags(_moc_INCS)
|
||||
|
||||
foreach (_current_FILE ${ARGN})
|
||||
|
||||
get_filename_component(_tmp_FILE ${_current_FILE} ABSOLUTE)
|
||||
get_filename_component(_basename ${_tmp_FILE} NAME_WE)
|
||||
set(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h)
|
||||
set(_src ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp)
|
||||
set(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc.cpp)
|
||||
|
||||
add_custom_command(OUTPUT ${_header}
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DKDE_UIC_EXECUTABLE:FILEPATH=${QT_UIC3_EXECUTABLE}
|
||||
-DKDE_UIC_FILE:FILEPATH=${_tmp_FILE}
|
||||
-DKDE_UIC_H_FILE:FILEPATH=${_header}
|
||||
-DKDE_UIC_BASENAME:STRING=${_basename}
|
||||
-DKDE_UIC_PLUGIN_DIR:FILEPATH="."
|
||||
-P ${KDE4_MODULE_DIR}/kde4uic.cmake
|
||||
MAIN_DEPENDENCY ${_tmp_FILE}
|
||||
)
|
||||
|
||||
# we need to run uic3 and replace some things in the generated file
|
||||
# this is done by executing the cmake script kde4uic.cmake
|
||||
add_custom_command(OUTPUT ${_src}
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
ARGS
|
||||
-DKDE_UIC_EXECUTABLE:FILEPATH=${QT_UIC3_EXECUTABLE}
|
||||
-DKDE_UIC_FILE:FILEPATH=${_tmp_FILE}
|
||||
-DKDE_UIC_CPP_FILE:FILEPATH=${_src}
|
||||
-DKDE_UIC_H_FILE:FILEPATH=${_header}
|
||||
-DKDE_UIC_BASENAME:STRING=${_basename}
|
||||
-DKDE_UIC_PLUGIN_DIR:FILEPATH="."
|
||||
-P ${KDE4_MODULE_DIR}/kde4uic.cmake
|
||||
MAIN_DEPENDENCY ${_header}
|
||||
)
|
||||
|
||||
add_custom_command(OUTPUT ${_moc}
|
||||
COMMAND ${QT_MOC_EXECUTABLE}
|
||||
ARGS ${_moc_INCS} ${_header} -o ${_moc}
|
||||
MAIN_DEPENDENCY ${_header}
|
||||
)
|
||||
list(APPEND ${_sources} ${_src} ${_moc} )
|
||||
|
||||
endforeach (_current_FILE)
|
||||
endmacro (KDE4_ADD_UI3_FILES)
|
||||
|
||||
macro (_KDE4_SET_CUSTOM_TARGET_PROPERTY _target_name _property_name _property)
|
||||
string(REGEX REPLACE "[/ ]" "_" _dir "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
set(_kde4_${_dir}_${_target_name}_${_property_name} "${_property}")
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
these are additional cmake modules required for compiling KDE3 or KDE4
|
||||
these are additional cmake modules required for compiling KDE4
|
||||
applications with cmake. Some of them are enhanced versions of the files
|
||||
coming with cmake, some of them are NOT yet part of cmake.
|
||||
To use them, copy them into the cmake Module directory or
|
||||
|
|
|
@ -4,30 +4,6 @@
|
|||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
#using a ui3 file with uic3
|
||||
if (KDE3_IMPL)
|
||||
|
||||
EXECUTE_PROCESS(COMMAND ${KDE_UIC_EXECUTABLE}
|
||||
-nounload -tr tr2i18n
|
||||
-impl ${KDE_UIC_H_FILE}
|
||||
${KDE_UIC_FILE}
|
||||
OUTPUT_VARIABLE _uic_CONTENTS
|
||||
ERROR_QUIET
|
||||
)
|
||||
endif (KDE3_IMPL)
|
||||
|
||||
|
||||
if (KDE3_HEADER)
|
||||
|
||||
EXECUTE_PROCESS(COMMAND ${KDE_UIC_EXECUTABLE}
|
||||
-nounload -tr tr2i18n
|
||||
${KDE_UIC_FILE}
|
||||
OUTPUT_VARIABLE _uic_CONTENTS
|
||||
ERROR_QUIET
|
||||
)
|
||||
set(KDE_UIC_CPP_FILE ${KDE_UIC_H_FILE})
|
||||
endif (KDE3_HEADER)
|
||||
|
||||
# the kde4 branch
|
||||
if (KDE4_HEADER)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue