File cmake3.4.patch of Package kwave

From: Thomas Eschenbacher <Thomas.Eschenbacher@gmx.de>
Date: Tue, 13 Oct 2015 09:46:27 +0000
Subject: support for cmake > 3.3, fix for policy CMP0063
X-Git-Url: http://quickgit.kde.org/?p=kwave.git&a=commitdiff&h=ae547ea0be7f23b3897325c5813819e9b7f779f6
---
support for cmake > 3.3, fix for policy CMP0063
---
From: Thomas Eschenbacher <Thomas.Eschenbacher@gmx.de>
Date: Tue, 13 Oct 2015 10:30:34 +0000
Subject: fix for cmake issues with l10n, fix for policy CMP0059
X-Git-Url: http://quickgit.kde.org/?p=kwave.git&a=commitdiff&h=210ea799eb59efcfda21c677995a53042d34054a
---
fix for cmake issues with l10n, fix for policy CMP0059
---


--- a/CHANGES
+++ b/CHANGES
@@ -1,2 +1,6 @@
+
+ * fixed memory leak in FileContext
+ * support for cmake > 3.3, fix for policy CMP0063 and CMP0059
+
 0.9.0 [2015-05-25]
 

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -58,6 +58,15 @@
 ### check for the proper cmake version                                    ###
 
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0 FATAL_ERROR)
+
+# Honor visibility properties for all target types (since cmake 3.3)
+IF (POLICY CMP0063)
+    CMAKE_POLICY(SET CMP0063 NEW)
+ENDIF (POLICY CMP0063)
+
+IF (POLICY CMP0059)
+    CMAKE_POLICY(SET CMP0059 NEW)
+ENDIF (POLICY CMP0059)
 
 #############################################################################
 ### path to additional cmake modules and includes                         ###

--- a/cmake/KwaveHandbook.cmake
+++ b/cmake/KwaveHandbook.cmake
@@ -39,7 +39,7 @@
 FILE(GLOB _docbook_files "${CMAKE_CURRENT_SOURCE_DIR}/*.docbook")
 FILE(GLOB _png_files "${CMAKE_SOURCE_DIR}/doc/${_lang}/*.png")
 
-ADD_CUSTOM_TARGET(html_doc
+ADD_CUSTOM_TARGET(html_doc_${_lang}
     COMMENT "Generating HTML documentation for ${_lang}"
     DEPENDS ${_toolbar_pngs}
     DEPENDS ${_docbook_files}
@@ -57,10 +57,12 @@
     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
 
+ADD_DEPENDENCIES(html_doc html_doc_${_lang})
+
 #############################################################################
 ### generate and install the icons                                        ###
 
-ADD_CUSTOM_TARGET(generate_icons
+ADD_CUSTOM_TARGET(generate_icons_${_lang}
     ALL
     DEPENDS ${_toolbar_pngs}
     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}

--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -133,6 +133,9 @@
 #############################################################################
 ### handle the various languages                                          ###
 
+# collects all "html_doc_${_lang}" sub targets
+ADD_CUSTOM_TARGET(html_doc)
+
 FILE(GLOB _files "${CMAKE_SOURCE_DIR}/doc/*/index.docbook")
 FOREACH(_file ${_files})
     # TODO: use DIRECTORY instead of PATH as soon as cmake <= 0.8.1 is no longer used
--- a/kwave/CMakeLists.txt
+++ b/kwave/CMakeLists.txt
@@ -87,7 +87,10 @@
 
 ADD_DEPENDENCIES(kwave_core libkwavegui libkwave)
 
-SET_TARGET_PROPERTIES(kwave_core PROPERTIES OUTPUT_NAME "kwave")
+SET_TARGET_PROPERTIES(kwave_core PROPERTIES
+    OUTPUT_NAME "kwave"
+    ENABLE_EXPORTS TRUE
+)
 
 #############################################################################
 ### install files                                                         ###

--- a/plugins/CMakeLists.txt
+++ b/plugins/CMakeLists.txt
@@ -40,11 +40,13 @@
         ${QT_AND_KDECORE_LIBS}
     )
 
-    SET_TARGET_PROPERTIES(plugin_${_plugin} PROPERTIES PREFIX "")
-    SET_TARGET_PROPERTIES(plugin_${_plugin} PROPERTIES SUFFIX "")
-    SET_TARGET_PROPERTIES(plugin_${_plugin} PROPERTIES OUTPUT_NAME "${_plugin}")
-    SET_TARGET_PROPERTIES(plugin_${_plugin} PROPERTIES LINK_FLAGS
-        "-Wl,--export-dynamic")
+    SET_TARGET_PROPERTIES(plugin_${_plugin} PROPERTIES
+        PREFIX ""
+        SUFFIX ""
+        OUTPUT_NAME "${_plugin}"
+        LINK_FLAGS "-Wl,--export-dynamic"
+        ENABLE_EXPORTS TRUE
+    )
     SET(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
 
     #########################################################################

--- a/plugins/goto/CMakeLists.txt
+++ b/plugins/goto/CMakeLists.txt
@@ -27,6 +27,7 @@
 KDE4_ADD_UI_FILES(plugin_goto_common_LIB_SRCS ${plugin_goto_common_LIB_UI})
 QT4_AUTOMOC(${plugin_goto_common_LIB_SRCS})
 KDE4_ADD_LIBRARY(plugin_goto_common STATIC ${plugin_goto_common_LIB_SRCS})
+SET_TARGET_PROPERTIES(plugin_goto_common PROPERTIES ENABLE_EXPORTS ON)
 ADD_DEPENDENCIES(plugin_goto_common libkwave libkwavegui)
 TARGET_LINK_LIBRARIES(plugin_goto_common kwavegui kwave)