OSDN Git Service

knotify: generate export header
authorIvailo Monev <xakepa10@gmail.com>
Tue, 27 Jul 2021 22:23:55 +0000 (01:23 +0300)
committerIvailo Monev <xakepa10@gmail.com>
Tue, 27 Jul 2021 22:23:55 +0000 (01:23 +0300)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
knotify/CMakeLists.txt
knotify/knotify_export.h [deleted file]

index 81a035c..ed00db4 100644 (file)
@@ -22,12 +22,11 @@ set(knotifyplugin_SRCS
 set(knotifyplugin_HEADERS
     knotifyplugin.h
     knotifyconfig.h
-    knotify_export.h
+    ${CMAKE_CURRENT_BINARY_DIR}/knotify_export.h
 )
 
 qt4_add_dbus_interfaces(knotify_SRCS ${KDE4_DBUS_INTERFACES_INSTALL_DIR}/org.kde.KSpeech.xml)
 
-set (knotify_OUTPUT_NAME knotify4)
 add_executable( knotify ${knotify_SRCS})
 
 add_library( knotifyplugin SHARED ${knotifyplugin_SRCS})
@@ -36,6 +35,7 @@ target_link_libraries( knotify ${KDE4_KDEUI_LIBS} ${KDE4_SOLID_LIBS} knotifyplug
 
 target_link_libraries( knotifyplugin ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS})
 
+generate_export_header(knotifyplugin BASE_NAME knotify)
 
 set_target_properties(knotify PROPERTIES OUTPUT_NAME knotify4 )
 install(TARGETS knotify ${INSTALL_TARGETS_DEFAULT_ARGS} )
diff --git a/knotify/knotify_export.h b/knotify/knotify_export.h
deleted file mode 100644 (file)
index 6721d6d..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*  This file is part of the KDE project
-    Copyright (C) 2010 Patrick Spendrin <ps_ml@gmx.de>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Library General Public
-    License as published by the Free Software Foundation; either
-    version 2 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Library General Public License for more details.
-
-    You should have received a copy of the GNU Library General Public License
-    along with this library; see the file COPYING.LIB.  If not, write to
-    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-    Boston, MA 02110-1301, USA.
-*/
-
-#ifndef KNOTIFY_EXPORT_H
-#define KNOTIFY_EXPORT_H
-
-/* needed for KDE_EXPORT and KDE_IMPORT macros */
-#include <kdemacros.h>
-
-#ifndef KNOTIFY_EXPORT
-# if defined(MAKE_KNOTIFYPLUGIN_LIB)
-   /* We are building this library */ 
-#  define KNOTIFY_EXPORT KDE_EXPORT
-# else
-   /* We are using this library */ 
-#  define KNOTIFY_EXPORT KDE_IMPORT
-# endif
-#endif
-
-#endif