~ubuntu-branches/ubuntu/natty/kde4libs/natty-proposed

« back to all changes in this revision

Viewing changes to .pc/10_make_libkdeinit4_private.diff/cmake/modules/KDE4Macros.cmake

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell, Scott Kitterman, Jonathan Riddell
  • Date: 2010-11-22 17:59:02 UTC
  • mfrom: (1.6.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20101122175902-yubxubd0pg6hn11z
Tags: 4:4.5.80a-0ubuntu1
[ Scott Kitterman ]
* New upstream beta release
  - Refreshed all patches
  - Updated debian/patches/10_make_libkdeinit4_private.diff to use Qfile
    instead of Qstring in kdecore/kernel/kstandarddirs_unix.cpp
  - Updated debian/patches/kubuntu_01_kubuntu_useragent.diff to provide
    Kubuntu in the Konqueror user agen string with the changes in
    kio/kio/kprotocolmanager.cpp
  - Partially updated debian/patches/kubuntu_05_langpack_desktop_files.diff
    and left the balance in kdecore/localization/klocale.cpp.rej for later
    revision
  - Update debian/patches/kubuntu_06_user_disk_mounting.diff for changes in
    solid/solid/backends/hal/halstorageaccess.cpp
  - Remove debian/patches/kubuntu_71_backport_plasma_webview_changes.diff
    (backported from upstream, so already present now)
  - Add minimum version for libattica-dev of 0.1.90 to build-depends
  - Bump minimum version for libsoprano-dev build-depend to 2.5.60
  - Add minimum version for shared-desktop-ontologies of 0.5 in build-dep

[ Jonathan Riddell ]
* Add build-depends on grantlee, libudev-dev, hupnp (FIXME needs packaging fixes)
* Update kubuntu_04_add_langpack_path.diff 28_find_old_kde4_html_documentation.diff
  22_hack_in_etc_kde4_in_kstandarddirs.diff for QT_NO_CAST_FROM_ASCII
* Update kubuntu_05_langpack_desktop_files.diff for new upstream code
* Add kubuntu_78_solid_trunk.diff to fix solid linking
* Add libnepomukutils4 package for new library
* Don't install kcm_ssl for now, e-mailed upstream to suggest moving to kdebase
* Add kubuntu_79_knewstuff_fix.diff to fix compile broken by non-trunk commit
  http://websvn.kde.org/?view=revision&revision=1199825
* kdelibs5-data replaces old kdebase-runtime-data due to moved file
* Add kubuntu_80_find_hupnp.diff to find hupnp include files, committed upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
281
281
 
282
282
   #Bootstrap
283
283
   if (_kdeBootStrapping)
284
 
      set(_ssheet ${CMAKE_SOURCE_DIR}/kdoctools/customization/kde-chunk.xsl)
 
284
      set(_ssheet "${CMAKE_BINARY_DIR}/kdoctools/customization/kde-chunk.xsl")
285
285
      set(_bootstrapOption "--srcdir=${CMAKE_BINARY_DIR}/kdoctools/")
286
286
   else (_kdeBootStrapping)
287
 
      set(_ssheet ${KDE4_DATA_INSTALL_DIR}/ksgmltools2/customization/kde-chunk.xsl)
 
287
      set(_ssheet "${KDE4_DATA_INSTALL_DIR}/ksgmltools2/customization/kde-chunk.xsl")
288
288
      set(_bootstrapOption)
289
289
   endif (_kdeBootStrapping)
290
290
 
360
360
 
361
361
   #Bootstrap
362
362
   if (_kdeBootStrapping)
363
 
      set(_ssheet "${CMAKE_SOURCE_DIR}/kdoctools/docbook/xsl/manpages/docbook.xsl")
 
363
      set(_ssheet "${CMAKE_BINARY_DIR}/kdoctools/customization/kde-include-man.xsl")
364
364
      set(_bootstrapOption "--srcdir=${CMAKE_BINARY_DIR}/kdoctools/")
365
365
   else (_kdeBootStrapping)
366
 
      set(_ssheet "${KDE4_DATA_INSTALL_DIR}/ksgmltools2/docbook/xsl/manpages/docbook.xsl")
 
366
      set(_ssheet "${KDE4_DATA_INSTALL_DIR}/ksgmltools2/customization/kde-include-man.xsl")
367
367
      set(_bootstrapOption)
368
368
   endif (_kdeBootStrapping)
369
369
 
626
626
endmacro (KDE4_HANDLE_RPATH_FOR_EXECUTABLE)
627
627
 
628
628
 
629
 
macro (KDE4_ADD_PLUGIN _target_NAME _with_PREFIX)
630
 
#is the first argument is "WITH_PREFIX" then keep the standard "lib" prefix, otherwise set the prefix empty
631
 
   if (${_with_PREFIX} STREQUAL "WITH_PREFIX")
632
 
      set(_first_SRC)
633
 
   else (${_with_PREFIX} STREQUAL "WITH_PREFIX")
634
 
      set(_first_SRC ${_with_PREFIX})
635
 
   endif (${_with_PREFIX} STREQUAL "WITH_PREFIX")
636
 
 
637
 
   set(_SRCS ${_first_SRC} ${ARGN})
 
629
macro (KDE4_ADD_PLUGIN _target_NAME )
 
630
#if the first argument is "WITH_PREFIX" then keep the standard "lib" prefix,
 
631
#otherwise set the prefix empty
 
632
 
 
633
   set(_args ${ARGN})
 
634
   # default to module
 
635
   set(_add_lib_param "MODULE")
 
636
   set(_with_pre FALSE)
 
637
   
 
638
   foreach(arg ${_args})
 
639
      if (arg STREQUAL "WITH_PREFIX")
 
640
         set(_with_pre TRUE)
 
641
      endif (arg STREQUAL "WITH_PREFIX")
 
642
      if (arg STREQUAL "STATIC")
 
643
         set(_add_lib_param STATIC)
 
644
      endif (arg STREQUAL "STATIC")
 
645
      if (arg STREQUAL "SHARED")
 
646
         set(_add_lib_param SHARED)
 
647
      endif (arg STREQUAL "SHARED")
 
648
      if (arg STREQUAL "MODULE")
 
649
         set(_add_lib_param MODULE)
 
650
      endif (arg STREQUAL "MODULE")
 
651
   endforeach(arg)
 
652
 
 
653
   if(_with_pre)
 
654
      list(REMOVE_ITEM _args "WITH_PREFIX")
 
655
   endif(_with_pre)
 
656
   if(_add_lib_param STREQUAL "STATIC")
 
657
      list(REMOVE_ITEM _args "STATIC")
 
658
   endif(_add_lib_param STREQUAL "STATIC")
 
659
   if (_add_lib_param STREQUAL "SHARED")
 
660
      list(REMOVE_ITEM _args "SHARED")
 
661
   endif (_add_lib_param STREQUAL "SHARED")
 
662
   if (_add_lib_param STREQUAL "MODULE")
 
663
       list(REMOVE_ITEM _args "MODULE")
 
664
   endif (_add_lib_param STREQUAL "MODULE")
 
665
 
 
666
   set(_SRCS ${_args})
638
667
 
639
668
   _automoc4_kde4_pre_target_handling(${_target_NAME} _SRCS)
640
669
 
 
670
   if("${_add_lib_param}" STREQUAL "STATIC")
 
671
      add_definitions(-DQT_STATICPLUGIN)
 
672
   endif("${_add_lib_param}" STREQUAL "STATIC")
 
673
 
641
674
   if (KDE4_ENABLE_FINAL)
642
675
      kde4_create_final_files(${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp _separate_files ${_SRCS})
643
 
      add_library(${_target_NAME} MODULE  ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp ${_separate_files})
 
676
      add_library(${_target_NAME} ${_add_lib_param}   ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp ${_separate_files})
644
677
   else (KDE4_ENABLE_FINAL)
645
 
      add_library(${_target_NAME} MODULE ${_SRCS})
 
678
      add_library(${_target_NAME} ${_add_lib_param}  ${_SRCS})
646
679
   endif (KDE4_ENABLE_FINAL)
647
680
 
648
681
   _automoc4_kde4_post_target_handling(${_target_NAME})
649
682
 
650
 
   if (_first_SRC)
 
683
   if (NOT _with_pre)
651
684
      set_target_properties(${_target_NAME} PROPERTIES PREFIX "")
652
 
   endif (_first_SRC)
 
685
   endif (NOT _with_pre)
653
686
 
654
687
   # for shared libraries/plugins a -DMAKE_target_LIB is required
655
688
   string(TOUPPER ${_target_NAME} _symbol)
971
1004
 
972
1005
 
973
1006
macro (KDE4_ADD_LIBRARY _target_NAME _lib_TYPE)
974
 
#is the first argument is "WITH_PREFIX" then keep the standard "lib" prefix, otherwise set the prefix empty
975
1007
 
976
1008
   set(_first_SRC ${_lib_TYPE})
977
1009
   set(_add_lib_param)
1094
1126
macro (KDE4_ADD_WIN32_APP_ICON appsources)
1095
1127
    message(STATUS "KDE4_ADD_WIN32_APP_ICON() is deprecated, use KDE4_ADD_APP_ICON() instead")
1096
1128
    if (WIN32)
 
1129
        if(NOT WINCE)
1097
1130
        find_program(PNG2ICO_EXECUTABLE NAMES png2ico)
 
1131
        else(NOT WINCE)
 
1132
        find_program(PNG2ICO_EXECUTABLE NAMES png2ico PATHS ${HOST_BINDIR} NO_DEFAULT_PATH )
 
1133
        endif(NOT WINCE)
1098
1134
        find_program(WINDRES_EXECUTABLE NAMES windres)
1099
1135
        if(MSVC)
1100
1136
            set(WINDRES_EXECUTABLE TRUE)
1121
1157
endmacro (KDE4_ADD_WIN32_APP_ICON)
1122
1158
 
1123
1159
# adds application icon to target source list 
1124
 
# for detailled documentation see the top of FindKDE4Internal.cmake
 
1160
# for detailed documentation see the top of FindKDE4Internal.cmake
1125
1161
macro (KDE4_ADD_APP_ICON appsources pattern)
1126
 
    string(REPLACE _KDEINIT_SRCS "" target ${appsources})
1127
 
    if(${appsources} STREQUAL ${target})
1128
 
        string(REPLACE _SRCS "" target ${appsources})
1129
 
    endif(${appsources} STREQUAL ${target})
1130
 
    
 
1162
    set (_outfilename ${CMAKE_CURRENT_BINARY_DIR}/${appsources})
 
1163
 
1131
1164
    if (WIN32)
 
1165
        if(NOT WINCE)
1132
1166
        find_program(PNG2ICO_EXECUTABLE NAMES png2ico)
 
1167
        else(NOT WINCE)
 
1168
        find_program(PNG2ICO_EXECUTABLE NAMES png2ico PATHS ${HOST_BINDIR} NO_DEFAULT_PATH )
 
1169
        endif(NOT WINCE)
1133
1170
        find_program(WINDRES_EXECUTABLE NAMES windres)
1134
1171
        if(MSVC)
1135
1172
            set(WINDRES_EXECUTABLE TRUE)
1156
1193
                endif (fn MATCHES ".*128.*")
1157
1194
            endforeach (it)
1158
1195
            if (_icons)
1159
 
                set (_outfilename ${CMAKE_CURRENT_BINARY_DIR}/${target})
1160
1196
                add_custom_command(OUTPUT ${_outfilename}.ico ${_outfilename}.rc
1161
1197
                                   COMMAND ${PNG2ICO_EXECUTABLE} ARGS --rcfile ${_outfilename}.rc ${_outfilename}.ico ${_icons}
1162
1198
                                   DEPENDS ${PNG2ICO_EXECUTABLE} ${_icons}
1173
1209
                    list(APPEND ${appsources} ${_outfilename}.rc)
1174
1210
                endif(MINGW)
1175
1211
            else(_icons)
1176
 
                message(STATUS "Unable to find a related icon for target ${target} - application will not have an application icon!")
 
1212
                message(STATUS "Unable to find a related icon that matches pattern ${pattern} for variable ${appsources} - application will not have an application icon!")
1177
1213
            endif(_icons)
1178
1214
        else(PNG2ICO_EXECUTABLE AND WINDRES_EXECUTABLE)
1179
1215
            message(STATUS "Unable to find the png2ico or windres utilities - application will not have an application icon!")
1192
1228
                    set (_icon ${it})
1193
1229
                endif (it MATCHES ".*128.*")
1194
1230
            endforeach (it)
1195
 
            set (_outfilename ${CMAKE_CURRENT_BINARY_DIR}/${target})
1196
1231
 
1197
1232
            if (_icon)
1198
1233
                
1204
1239
                                   )
1205
1240
 
1206
1241
                # This will register the icon into the bundle
1207
 
                set(MACOSX_BUNDLE_ICON_FILE ${target}.icns)
 
1242
                set(MACOSX_BUNDLE_ICON_FILE ${appsources}.icns)
1208
1243
 
1209
1244
                # Append the icns file to the sources list so it will be a dependency to the
1210
1245
                # main target
1211
1246
                list(APPEND ${appsources} ${_outfilename}.icns)
1212
1247
 
1213
 
                #            this doesn't seem to work for me - Use manual "install" instead
1214
 
                # TODO: test again with cmake 2.6 ?
1215
 
                #           SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/${target}.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
1216
 
 
1217
 
                install(FILES ${_outfilename}.icns DESTINATION ${BIN_INSTALL_DIR}/${target}.app/Contents/Resources/)
 
1248
                # Install the icon into the Resources dir in the bundle
 
1249
                set_source_files_properties(${_outfilename}.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
1218
1250
 
1219
1251
            else(_icon)
1220
1252
                # TODO - try to scale a non-128 icon...? Try to convert an SVG on the fly?
1221
 
                message(STATUS "Unable to find an 128x128 icon for target ${target} - application will not have an application icon!")
 
1253
                message(STATUS "Unable to find an 128x128 icon that matches pattern ${pattern} for variable ${appsources} - application will not have an application icon!")
1222
1254
            endif(_icon)
1223
1255
 
1224
1256
        else(SIPS_EXECUTABLE AND TIFF2ICNS_EXECUTABLE)
1225
1257
            message(STATUS "Unable to find the sips and tiff2icns utilities - application will not have an application icon!")
1226
1258
        endif(SIPS_EXECUTABLE AND TIFF2ICNS_EXECUTABLE)
1227
 
    endif(Q_WS_MAC)    
 
1259
    endif(Q_WS_MAC)
1228
1260
endmacro (KDE4_ADD_APP_ICON)
1229
1261
 
1230
1262