mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-23 18:32:55 +00:00
cmake modules review
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
91f34db1cd
commit
adaa6ead51
18 changed files with 33 additions and 26 deletions
|
@ -6,7 +6,7 @@
|
|||
# DBUS_ARCH_INCLUDES - the D-Bus message bus architecture include directory
|
||||
# DBUS_LIBRARIES - The libraries needed to use D-Bus message bus system
|
||||
#
|
||||
# Copyright (c) 2015, Ivailo Monev, <xakepa10@gmail.com>
|
||||
# Copyright (c) 2015-2019, Ivailo Monev, <xakepa10@gmail.com>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# FONTCONFIG_INCLUDES - the Fontconfig include directory
|
||||
# FONTCONFIG_LIBRARIES - The libraries needed to use Fontconfig
|
||||
#
|
||||
# Copyright (c) 2015, Ivailo Monev, <xakepa10@gmail.com>
|
||||
# Copyright (c) 2015-2019, Ivailo Monev, <xakepa10@gmail.com>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
# GLIB2_CONFIG_INCLUDES - the GLib2 config include directory
|
||||
# GLIB2_LIBRARIES - The libraries needed to use GLib2
|
||||
#
|
||||
# Copyright (c) 2015, Ivailo Monev, <xakepa10@gmail.com>
|
||||
# Copyright (c) 2015-2019, Ivailo Monev, <xakepa10@gmail.com>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# HARFBUZZ_INCLUDES - the HarfBuzz include directory
|
||||
# HARFBUZZ_LIBRARIES - The libraries needed to use HarfBuzz
|
||||
#
|
||||
# Copyright (c) 2015, Ivailo Monev, <xakepa10@gmail.com>
|
||||
# Copyright (c) 2015-2019, Ivailo Monev, <xakepa10@gmail.com>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# ICU_INCLUDES - the ICU include directory
|
||||
# ICU_LIBRARIES - The libraries needed to use ICU
|
||||
#
|
||||
# Copyright (c) 2015, Ivailo Monev, <xakepa10@gmail.com>
|
||||
# Copyright (c) 2015-2019, Ivailo Monev, <xakepa10@gmail.com>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# ICONV_INCLUDES - the Iconv include directory
|
||||
# ICONV_LIBRARIES - The libraries needed to use Iconv
|
||||
#
|
||||
# Copyright (c) 2016, Ivailo Monev, <xakepa10@gmail.com>
|
||||
# Copyright (c) 2016-2019, Ivailo Monev, <xakepa10@gmail.com>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# MNG_INCLUDES - the libmng include directory
|
||||
# MNG_LIBRARIES - The libraries needed to use libmng
|
||||
#
|
||||
# Copyright (c) 2015, Ivailo Monev, <xakepa10@gmail.com>
|
||||
# Copyright (c) 2015-2019, Ivailo Monev, <xakepa10@gmail.com>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# MYSQL_INCLUDES - the MySQL include directory
|
||||
# MYSQL_LIBRARIES - The libraries needed to use MySQL
|
||||
#
|
||||
# Copyright (c) 2015, Ivailo Monev, <xakepa10@gmail.com>
|
||||
# Copyright (c) 2015-2019, Ivailo Monev, <xakepa10@gmail.com>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# NIS_INCLUDES - the NIS include directory
|
||||
# NIS_LIBRARIES - The libraries needed to use NIS
|
||||
#
|
||||
# Copyright (c) 2015, Ivailo Monev, <xakepa10@gmail.com>
|
||||
# Copyright (c) 2015-2019, Ivailo Monev, <xakepa10@gmail.com>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# NSL_INCLUDES - the NSL include directory
|
||||
# NSL_LIBRARIES - The libraries needed to use NSL
|
||||
#
|
||||
# Copyright (c) 2016, Ivailo Monev, <xakepa10@gmail.com>
|
||||
# Copyright (c) 2016-2019, Ivailo Monev, <xakepa10@gmail.com>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# ODBC_INCLUDES - the ODBC include directory
|
||||
# ODBC_LIBRARIES - The libraries needed to use ODBC
|
||||
#
|
||||
# Copyright (c) 2015, Ivailo Monev, <xakepa10@gmail.com>
|
||||
# Copyright (c) 2015-2019, Ivailo Monev, <xakepa10@gmail.com>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# PCRE_INCLUDES - the PCRE include directory
|
||||
# PCRE_LIBRARIES - The libraries needed to use PCRE
|
||||
#
|
||||
# Copyright (c) 2016, Ivailo Monev, <xakepa10@gmail.com>
|
||||
# Copyright (c) 2016-2019, Ivailo Monev, <xakepa10@gmail.com>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# RESOLV_INCLUDES - the resolv include directory
|
||||
# RESOLV_LIBRARIES - The libraries needed to use resolv
|
||||
#
|
||||
# Copyright (c) 2016, Ivailo Monev, <xakepa10@gmail.com>
|
||||
# Copyright (c) 2016-2019, Ivailo Monev, <xakepa10@gmail.com>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
|
||||
|
|
|
@ -6,6 +6,10 @@
|
|||
# SHIBOKEN_LIBRARIES - the libraries needed to use Shiboken
|
||||
# SHIBOKEN_BINARY - the binary needed to use Shiboken
|
||||
# SHIBOKEN_VERSION - the Shiboken version
|
||||
#
|
||||
# Copyright (c) 2019, Ivailo Monev, <xakepa10@gmail.com>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
|
||||
if(SHIBOKEN_INCLUDES AND SHIBOKEN_LIBRARIES AND SHIBOKEN_BINARY)
|
||||
set(SHIBOKEN_FIND_QUIETLY TRUE)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# SQLITE_INCLUDES - the SQL database engine include directory
|
||||
# SQLITE_LIBRARIES - The libraries needed to use SQL database engine
|
||||
#
|
||||
# Copyright (c) 2015, Ivailo Monev, <xakepa10@gmail.com>
|
||||
# Copyright (c) 2015-2019, Ivailo Monev, <xakepa10@gmail.com>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2015, Ivailo Monev, <xakepa10@gmail.com>
|
||||
# Copyright (c) 2015-2019, Ivailo Monev, <xakepa10@gmail.com>
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
|
||||
set(KATIE_UIC "uic")
|
||||
|
@ -164,7 +164,7 @@ function(KATIE_SETUP_TARGET FORTARGET)
|
|||
file(READ "${resource}" rsccontent)
|
||||
if("${rsccontent}" MATCHES "(Q_OBJECT|Q_OBJECT_FAKE|Q_GADGET)")
|
||||
set(rscout "${rscpath}/moc_${rscname}${rscext}")
|
||||
set(targetresources ${targetresources} ${rscout})
|
||||
set(targetresources "${targetresources} ${rscout}")
|
||||
get_directory_property(dirdefs COMPILE_DEFINITIONS)
|
||||
get_directory_property(dirincs INCLUDE_DIRECTORIES)
|
||||
set(mocargs)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Copyright (c) 2015, Ivailo Monev, <xakepa10@gmail.com>
|
||||
# Copyright (c) 2015-2019, Ivailo Monev, <xakepa10@gmail.com>
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
|
||||
macro(KATIE_RESOURCES RESOURCES)
|
||||
|
@ -11,7 +11,7 @@ macro(KATIE_RESOURCES RESOURCES)
|
|||
get_filename_component(rscpath ${resource} PATH)
|
||||
string(REPLACE "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" rscpath "${rscpath}")
|
||||
if("${rscext}" STREQUAL ".ui")
|
||||
set(rscout ${rscpath}/ui_${rscname}.h)
|
||||
set(rscout "${rscpath}/ui_${rscname}.h")
|
||||
make_directory(${rscpath})
|
||||
add_custom_command(
|
||||
COMMAND ${KATIE_UIC} "${resource}" -o "${rscout}"
|
||||
|
@ -19,7 +19,7 @@ macro(KATIE_RESOURCES RESOURCES)
|
|||
MAIN_DEPENDENCY ${resource}
|
||||
)
|
||||
elseif("${rscext}" STREQUAL ".qrc")
|
||||
set(rscout ${rscpath}/qrc_${rscname}.cpp)
|
||||
set(rscout "${rscpath}/qrc_${rscname}.cpp")
|
||||
make_directory(${rscpath})
|
||||
add_custom_command(
|
||||
COMMAND ${KATIE_RCC} "${resource}" -o "${rscout}" -name "${rscname}"
|
||||
|
@ -27,11 +27,11 @@ macro(KATIE_RESOURCES RESOURCES)
|
|||
MAIN_DEPENDENCY ${resource}
|
||||
)
|
||||
set_property(SOURCE ${resource} APPEND PROPERTY OBJECT_DEPENDS ${rscout})
|
||||
elseif("${rscext}" MATCHES "(.h|.cpp|.mm)")
|
||||
elseif("${rscext}" MATCHES "(.h|.hpp|.cc|.cpp)")
|
||||
file(READ "${resource}" rsccontent)
|
||||
# this can be simpler if continue() was supported by old CMake versions
|
||||
if("${rsccontent}" MATCHES "(Q_OBJECT|Q_OBJECT_FAKE|Q_GADGET)")
|
||||
set(rscout ${rscpath}/moc_${rscname}${rscext})
|
||||
set(rscout "${rscpath}/moc_${rscname}${rscext}")
|
||||
get_directory_property(dirdefs COMPILE_DEFINITIONS)
|
||||
get_directory_property(dirincs INCLUDE_DIRECTORIES)
|
||||
set(mocargs)
|
||||
|
@ -56,8 +56,8 @@ endmacro()
|
|||
|
||||
macro(KATIE_DBUS_ADAPTOR SRCDEP SRCIN OUTNAME)
|
||||
get_filename_component(resource ${SRCIN} ABSOLUTE)
|
||||
set(rscout ${CMAKE_CURRENT_BINARY_DIR}/${OUTNAME}.h)
|
||||
set(mocout ${CMAKE_CURRENT_BINARY_DIR}/${OUTNAME}.moc)
|
||||
set(rscout "${CMAKE_CURRENT_BINARY_DIR}/${OUTNAME}.h")
|
||||
set(mocout "${CMAKE_CURRENT_BINARY_DIR}/${OUTNAME}.moc")
|
||||
add_custom_command(
|
||||
COMMAND "${KATIE_QDBUSXML2CPP}" -m "${resource}" -a "${rscout}" -p "${OUTNAME}" ${ARGN}
|
||||
COMMAND "${KATIE_MOC}" -nw "${rscout}" -o "${mocout}" -i
|
||||
|
@ -69,9 +69,9 @@ endmacro()
|
|||
macro(KATIE_DBUS_INTERFACE SRCIN)
|
||||
string(REGEX MATCH ".*\\.(.*)\\.xml" ${SRCIN} OUTNAME)
|
||||
string(TOLOWER ${SRCIN} SRCIN)
|
||||
set(rscout ${CMAKE_CURRENT_BINARY_DIR}/${OUTNAME}ineterface.h)
|
||||
set(rscout "${CMAKE_CURRENT_BINARY_DIR}/${OUTNAME}interface.h")
|
||||
add_custom_command(
|
||||
COMMAND "${KATIE_QDBUSXML2CPP}" -m "${SRCIN}" -a "${rscout}" -p "${OUTNAME}ineterface" ${ARGN}
|
||||
COMMAND "${KATIE_QDBUSXML2CPP}" -m "${SRCIN}" -a "${rscout}" -p "${OUTNAME}interface" ${ARGN}
|
||||
OUTPUT "${rscout}"
|
||||
)
|
||||
set_property(SOURCE ${SRCIN} APPEND PROPERTY OBJECT_DEPENDS ${rscout})
|
||||
|
@ -86,7 +86,7 @@ macro(KATIE_TRANSLATIONS TRANSLATIONS)
|
|||
get_filename_component(trdir ${translation} DIRECTORY)
|
||||
string(REPLACE "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" trdir ${trdir})
|
||||
make_directory(${trdir})
|
||||
set(trout ${trdir}/${trname}.qm)
|
||||
set(trout "${trdir}/${trname}.qm")
|
||||
add_custom_target(
|
||||
${trname}_translation ALL
|
||||
COMMAND "${KATIE_LRELEASE}" "${translation}" -qm "${trout}"
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# Copyright (c) 2015-2019, Ivailo Monev, <xakepa10@gmail.com>
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
|
||||
# UNIFDEF_EXECUTABLE, HEADERS_DIRECTORY and HEADERS_DEFINITIONS origin from the macro call
|
||||
|
||||
file(GLOB headers "$ENV{DESTDIR}/${HEADERS_DIRECTORY}/*.h")
|
||||
|
|
Loading…
Add table
Reference in a new issue