summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin T. H. Sandsmark <martin.sandsmark@kde.org>2016-06-18 16:58:01 (GMT)
committerMartin T. H. Sandsmark <martin.sandsmark@kde.org>2016-06-18 16:58:01 (GMT)
commitda07949b7f65f05e89a924b0a6768b4b1b914b57 (patch)
tree20d84aa2d5ad63f562dace445885e29b4113222c
parent9cbec5550954f67d86dcf77fe25c6f318798928e (diff)
let cmake generate export header
-rw-r--r--CMakeLists.txt1
-rw-r--r--lib/CMakeLists.txt1
-rw-r--r--lib/qmobipocket_export.h37
3 files changed, 2 insertions, 37 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 65f0a0d..acfb740 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,6 +6,7 @@ find_package(ECM 1.3.0 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
include(FeatureSummary)
+include(GenerateExportHeader)
include(ECMOptionalAddSubdirectory)
include(KDEInstallDirs)
include(KDECMakeSettings)
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index f88d0b0..d835e2e 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -6,6 +6,7 @@ set (QMOBIPOCKET_SRCS
)
add_library(qmobipocket SHARED ${QMOBIPOCKET_SRCS})
+generate_export_header(qmobipocket)
target_link_libraries (qmobipocket
Qt5::Core
diff --git a/lib/qmobipocket_export.h b/lib/qmobipocket_export.h
deleted file mode 100644
index 923134a..0000000
--- a/lib/qmobipocket_export.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* This file is part of the KDE project
- Copyright (C) 2007 David Faure <faure@kde.org>
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of
- the License, or (at your option) any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef _QMOBIPOCKET_EXPORT_H
-#define _QMOBIPOCKET_EXPORT_H
-
-/* needed for KDE_EXPORT and KDE_IMPORT macros */
-#include <kdemacros.h>
-
-#ifndef QMOBIPOCKET_EXPORT
-# if defined(KDELIBS_STATIC_LIBS)
- /* No export/import for static libraries */
-# define QMOBIPOCKET_EXPORT
-# elif defined(MAKE_QMOBIPOCKET_LIB)
- /* We are building this library */
-# define QMOBIPOCKET_EXPORT KDE_EXPORT
-# else
- /* We are using this library */
-# define QMOBIPOCKET_EXPORT KDE_IMPORT
-# endif
-#endif
-
-#endif