Browse Source

cmake: Use set_property( SOURCE ... COMPILE_DEFINITIONS )

instead of set_source_files_properties( ... COMPILE_FLAGS )
to avoid the problem of double escaping quotation marks.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 967cf90889)
pull/182/head
Michele Calgaro 4 years ago committed by Slávek Banko
parent
commit
93c1526bae
  1. 2
      kcontrol/displayconfig/CMakeLists.txt
  2. 2
      kcontrol/dnssd/CMakeLists.txt
  3. 2
      kcontrol/hwmanager/CMakeLists.txt
  4. 2
      kcontrol/iccconfig/CMakeLists.txt
  5. 3
      kcontrol/tdm/CMakeLists.txt
  6. 2
      kcontrol/usbview/CMakeLists.txt
  7. 3
      kdesktop/CMakeLists.txt

2
kcontrol/displayconfig/CMakeLists.txt

@ -31,7 +31,7 @@ install( FILES displayconfig.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
##### kcm_displayconfig (module) ####################
set_source_files_properties( displayconfig.cpp PROPERTIES COMPILE_FLAGS -DKDE_CONFDIR=\\"${TDE_CONFIG_DIR}\\" )
set_property( SOURCE displayconfig.cpp APPEND PROPERTY COMPILE_DEFINITIONS KDE_CONFDIR="${TDE_CONFIG_DIR}" )
tde_add_kpart( kcm_displayconfig AUTOMOC
SOURCES

2
kcontrol/dnssd/CMakeLists.txt

@ -27,7 +27,7 @@ install( FILES kcm_tdednssd.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
##### kcm_tdednssd (module) #######################
set_source_files_properties( kcmdnssd.cpp PROPERTIES COMPILE_FLAGS -DKDE_CONFDIR=\\"${TDE_CONFIG_DIR}\\" )
set_property( SOURCE kcmdnssd.cpp APPEND PROPERTY COMPILE_DEFINITIONS KDE_CONFDIR="${TDE_CONFIG_DIR}" )
tde_add_kpart( kcm_tdednssd AUTOMOC
SOURCES configdialog.ui kcmdnssd.cpp

2
kcontrol/hwmanager/CMakeLists.txt

@ -29,7 +29,7 @@ install( FILES hwmanager.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
##### kcm_iccconfig (module) ####################
set_source_files_properties( hwmanager.cpp PROPERTIES COMPILE_FLAGS -DKDE_CONFDIR=\\"${TDE_CONFIG_DIR}\\" )
set_property( SOURCE hwmanager.cpp APPEND PROPERTY COMPILE_DEFINITIONS KDE_CONFDIR="${TDE_CONFIG_DIR}" )
tde_add_kpart( kcm_hwmanager AUTOMOC
SOURCES

2
kcontrol/iccconfig/CMakeLists.txt

@ -28,7 +28,7 @@ install( FILES iccconfig.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
##### kcm_iccconfig (module) ####################
set_source_files_properties( iccconfig.cpp PROPERTIES COMPILE_FLAGS -DKDE_CONFDIR=\\"${TDE_CONFIG_DIR}\\" )
set_property( SOURCE iccconfig.cpp APPEND PROPERTY COMPILE_DEFINITIONS KDE_CONFDIR="${TDE_CONFIG_DIR}" )
tde_add_kpart( kcm_iccconfig AUTOMOC
SOURCES

3
kcontrol/tdm/CMakeLists.txt

@ -29,8 +29,7 @@ install( FILES tdm.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
##### kcm_tdm (module) ##########################
set_source_files_properties( background.cpp PROPERTIES COMPILE_FLAGS -DKDE_CONFDIR=\\"${TDE_CONFIG_DIR}\\" )
set_source_files_properties( main.cpp PROPERTIES COMPILE_FLAGS -DKDE_CONFDIR=\\"${TDE_CONFIG_DIR}\\" )
set_property( SOURCE background.cpp main.cpp APPEND PROPERTY COMPILE_DEFINITIONS KDE_CONFDIR="${TDE_CONFIG_DIR}" )
tde_add_kpart( kcm_tdm AUTOMOC
SOURCES

2
kcontrol/usbview/CMakeLists.txt

@ -26,7 +26,7 @@ link_directories(
install( FILES kcmusb.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
if( WITH_USBIDS )
set_source_files_properties( usbdb.cpp PROPERTIES COMPILE_FLAGS -DUSBIDS_FILE=\\"${WITH_USBIDS}\\" )
set_property( SOURCE usbdb.cpp APPEND PROPERTY COMPILE_DEFINITIONS USBIDS_FILE="${WITH_USBIDS}" )
else( )
install( FILES usb.ids DESTINATION ${DATA_INSTALL_DIR} )
endif( )

3
kdesktop/CMakeLists.txt

@ -81,8 +81,7 @@ tde_add_executable( kxdglauncher
##### kdesktop (tdeinit) ########################
set( target kdesktop )
set_source_files_properties( lockeng.cc PROPERTIES COMPILE_FLAGS -DKDE_CONFDIR=\\"${TDE_CONFIG_DIR}\\" )
set_property( SOURCE lockeng.cc APPEND PROPERTY COMPILE_DEFINITIONS KDE_CONFDIR="${TDE_CONFIG_DIR}" )
set( ${target}_SRCS
main.cc krootwm.cc xautolock.cc kdiconview.cc init.cc

Loading…
Cancel
Save