summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Caulier <[email protected]>2014-11-19 09:25:43 -0500
committerGilles Caulier <[email protected]>2014-11-19 09:25:43 -0500
commitaa285f0c52a5e9edf5aa7e71facb572f2df50088 (patch)
treeb128cb5502a30a27f42f5496b40e2cbfaeadc4a3
parentbb9111ea0576ff111379782422fc90fbebff1503 (diff)
move libkipi/version.h to libkipi_config.h to hos SO version ID shared with kipi plugins
-rw-r--r--CMakeLists.txt7
-rw-r--r--src/CMakeLists.txt7
-rw-r--r--src/libkipi_config.h.cmake.in (renamed from src/version.h.cmake.in)10
-rw-r--r--src/pluginloader.cpp1
-rw-r--r--tests/CMakeLists.txt7
-rw-r--r--tests/kipiimagecollectionselector.cpp2
-rw-r--r--tests/kipiinterface.cpp4
-rw-r--r--tests/kipisetup.cpp3
-rw-r--r--tests/kipitestmainwindow.cpp5
-rw-r--r--tests/kipitestpluginloader.cpp3
-rw-r--r--tests/kipiuploadwidget.cpp2
-rw-r--r--tests/main.cpp4
12 files changed, 28 insertions, 27 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dacc7d8..93540dc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -99,9 +99,7 @@ add_definitions(-DTRANSLATION_DOMAIN=\"libkipi\")
add_subdirectory(pics)
add_subdirectory(src)
-
-# TODO
-#add_subdirectory(tests)
+add_subdirectory(tests)
############## CMake Config Files ##############
@@ -134,6 +132,3 @@ install(FILES
)
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
-
-#set(LIBKIPI_AREA_CODE_GENERAL 51000)
-#add_definitions(-DKDE_DEFAULT_DEBUG_AREA=${LIBKIPI_AREA_CODE_GENERAL})
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index f988837..91a8c30 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -4,6 +4,8 @@
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libkipi_config.h.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/libkipi_config.h)
+
include_directories(${CMAKE_CURRENT_BINARY_DIR}/..)
set(kipi_LIB_SRCS interface.cpp
@@ -16,7 +18,7 @@ set(kipi_LIB_SRCS interface.cpp
imagecollectionselector.cpp
configwidget.cpp
configwidget_p.cpp
- pluginloader.cpp
+ pluginloader.cpp
)
ecm_generate_headers(kipi_CamelCase_HEADERS
@@ -52,6 +54,7 @@ add_library(KF5Kipi SHARED ${kipi_LIB_SRCS})
generate_export_header(KF5Kipi BASE_NAME kipi EXPORT_MACRO_NAME LIBKIPI_EXPORT)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kipi_export.h
+ ${CMAKE_CURRENT_BINARY_DIR}/libkipi_config.h
DESTINATION ${KF5_INCLUDE_INSTALL_DIR}/KIPI
COMPONENT Devel
)
@@ -66,7 +69,7 @@ target_link_libraries(KF5Kipi
PUBLIC
KF5::Parts
KF5::KDELibs4Support
- Qt5::Gui
+ Qt5::Gui
)
install(TARGETS KF5Kipi
diff --git a/src/version.h.cmake.in b/src/libkipi_config.h.cmake.in
index 651944b..989020e 100644
--- a/src/version.h.cmake.in
+++ b/src/libkipi_config.h.cmake.in
@@ -22,12 +22,10 @@
*
* ============================================================ */
-#ifndef KIPI_VERSION_H
-#define KIPI_VERSION_H
+#ifndef KIPI_CONFIG_H
+#define KIPI_CONFIG_H
-static const char kipi_version[] = "${KIPI_LIB_VERSION_STRING}";
-static const int kipi_binary_version = ${KIPI_LIB_SO_CUR_VERSION};
-#define KIPI_VERSION ${KIPI_LIB_VERSION_ID}
+static const int kipi_binary_version = ${KIPI_LIB_SO_CUR_VERSION};
-#endif // KIPI_VERSION_H
+#endif // KIPI_CONFIG_H
diff --git a/src/pluginloader.cpp b/src/pluginloader.cpp
index 764ab5c..e100aa7 100644
--- a/src/pluginloader.cpp
+++ b/src/pluginloader.cpp
@@ -63,6 +63,7 @@
#include "plugin.h"
#include "interface.h"
#include "libkipi_version.h"
+#include "libkipi_config.h"
#include "configwidget.h"
static const KCatalogLoader loader("libkipi");
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 3330fe2..8ded765 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -4,7 +4,8 @@
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-include_directories(${CMAKE_CURRENT_BINARY_DIR}/../src
+include_directories(${CMAKE_CURRENT_BINARY_DIR}/..
+ ${CMAKE_CURRENT_BINARY_DIR}/../src
${CMAKE_CURRENT_SOURCE_DIR}/../src
)
@@ -14,9 +15,9 @@ set(kxmlkipicmd_SRCS
kipiimageinfoshared.cpp
kipiimagecollectionselector.cpp
kipiuploadwidget.cpp
- kipisetup.cpp
- kipitestpluginloader.cpp
kipitestmainwindow.cpp
+ kipitestpluginloader.cpp
+ kipisetup.cpp
main.cpp
)
diff --git a/tests/kipiimagecollectionselector.cpp b/tests/kipiimagecollectionselector.cpp
index b81bf47..e1db473 100644
--- a/tests/kipiimagecollectionselector.cpp
+++ b/tests/kipiimagecollectionselector.cpp
@@ -22,7 +22,7 @@
*
* ============================================================ */
-
+#include "kipiimagecollectionselector.h"
// Qt includes:
diff --git a/tests/kipiinterface.cpp b/tests/kipiinterface.cpp
index 6eef923..3ef4cfc 100644
--- a/tests/kipiinterface.cpp
+++ b/tests/kipiinterface.cpp
@@ -24,7 +24,7 @@
*
* ============================================================ */
-
+#include "kipiinterface.h"
// Qt includes
@@ -40,7 +40,7 @@
// LibKIPI includes
-#include "version.h"
+#include "libkipi_version.h"
#include "imagecollection.h"
// local includes
diff --git a/tests/kipisetup.cpp b/tests/kipisetup.cpp
index dddb81a..7fbe7fa 100644
--- a/tests/kipisetup.cpp
+++ b/tests/kipisetup.cpp
@@ -22,7 +22,7 @@
*
* ============================================================ */
-
+#include "kipisetup.h"
// Qt includes
@@ -37,6 +37,7 @@
#include <kpagewidget.h>
#include <kapplication.h>
#include <kstandarddirs.h>
+#include <klocale.h>
#include <kdebug.h>
#include <kcomponentdata.h>
#include <kcombobox.h>
diff --git a/tests/kipitestmainwindow.cpp b/tests/kipitestmainwindow.cpp
index c5c9939..80172f9 100644
--- a/tests/kipitestmainwindow.cpp
+++ b/tests/kipitestmainwindow.cpp
@@ -22,7 +22,7 @@
*
* ============================================================ */
-
+#include "kipitestmainwindow.h"
// Qt includes
@@ -32,6 +32,7 @@
#include <kdialog.h>
#include <kconfig.h>
+#include <kglobal.h>
#include <ksharedconfig.h>
#include <kaction.h>
#include <ktoggleaction.h>
@@ -47,7 +48,7 @@
// LibKIPI includes
#include "pluginloader.h"
-#include "version.h"
+#include "libkipi_version.h"
// Local includes
diff --git a/tests/kipitestpluginloader.cpp b/tests/kipitestpluginloader.cpp
index be35fff..8026fb9 100644
--- a/tests/kipitestpluginloader.cpp
+++ b/tests/kipitestpluginloader.cpp
@@ -22,7 +22,7 @@
*
* ============================================================ */
-
+#include "kipitestpluginloader.h"
// Qt includes
@@ -38,6 +38,7 @@
#include <kdebug.h>
#include <kxmlguiclient.h>
#include <kxmlguifactory.h>
+#include <kglobal.h>
// Local includes
diff --git a/tests/kipiuploadwidget.cpp b/tests/kipiuploadwidget.cpp
index 27c8265..cc69a5c 100644
--- a/tests/kipiuploadwidget.cpp
+++ b/tests/kipiuploadwidget.cpp
@@ -22,7 +22,7 @@
*
* ============================================================ */
-
+#include "kipiuploadwidget.h"
// Qt includes:
diff --git a/tests/main.cpp b/tests/main.cpp
index 1f21de9..e9fae5d 100644
--- a/tests/main.cpp
+++ b/tests/main.cpp
@@ -38,7 +38,7 @@
// LibKipi includes
-#include "version.h"
+#include "libkipi_version.h"
// local includes:
@@ -51,7 +51,7 @@ int main(int argc, char* argv[])
const KAboutData aboutData("kxmlkipicmd",
"kipi",
ki18n("kxmlkipicmd"),
- kipi_version, // libkipi version
+ KIPI_VERSION_STRING, // libkipi version
ki18n("Kipi host test application using KDE XML-GUI"),
KAboutData::License_GPL,
ki18n("(c) 2009-2010 Michael G. Hansen\n"