CMakeLists.txt kolab_export.h

Christian Mollekopf mollekopf at kolabsys.com
Thu Jun 28 12:33:27 CEST 2012


 CMakeLists.txt |    8 +++++---
 kolab_export.h |    8 ++++----
 2 files changed, 9 insertions(+), 7 deletions(-)

New commits:
commit cd01aa3d8a946913cd12efb5369eaa03546e210c
Author: Christian Mollekopf <mollekopf at kolabsys.com>
Date:   Thu Jun 28 12:33:23 2012 +0200

    Don't depend on kde macros (for the libcalendaring version)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index af4d2a5..6e254ec 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -45,8 +45,9 @@ set(CMAKECONFIG_INSTALL_DIR ${LIB_INSTALL_DIR}/cmake/Libkolab )
 # Do the building
 find_package(Libkolabxml 0.7 REQUIRED)
 find_package(Qt4 4.6.0 REQUIRED)
-find_package(Libcalendaring)
-if (NOT USE_LIBCALENDARING)
+if (USE_LIBCALENDARING)
+    find_package(Libcalendaring)
+else()
     find_package(KDE4 4.8 REQUIRED)
     find_package(KdepimLibs 4.8 REQUIRED)
 endif()
@@ -59,7 +60,8 @@ if("${KdepimLibs_VERSION}" VERSION_GREATER "4.8.40" )
     add_definitions(-DKDEPIMLIBS_VERSION_DEVEL)
 endif()
 
-set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS} -fPIC -g" )
+set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -DQT_NO_EXCEPTIONS -fno-check-new -fno-common -Woverloaded-virtual -fno-threadsafe-statics -fvisibility=hidden -Werror=return-type -fvisibility-inlines-hidden -fexceptions -UQT_NO_EXCEPTIONS -fPIC -g" )
+# message("${CMAKE_CXX_FLAGS}")
 
 if (USE_LIBCALENDARING)
     set( KDE_INCLUDES ${Libcalendaring_INCLUDE_DIRS} )
diff --git a/kolab_export.h b/kolab_export.h
index 2665619..d242045 100644
--- a/kolab_export.h
+++ b/kolab_export.h
@@ -21,7 +21,7 @@
 #ifndef KOLAB_EXPORT_H
 #define KOLAB_EXPORT_H
 
-#include <kdemacros.h>
+// #include <kdemacros.h>
 
 #ifndef KOLAB_EXPORT
 # if defined(KOLAB_STATIC_LIBS)
@@ -29,15 +29,15 @@
 #  define KOLAB_EXPORT
 # elif defined(MAKE_KOLAB_LIB)
 /* We are building this library */
-#  define KOLAB_EXPORT KDE_EXPORT
+#  define KOLAB_EXPORT __attribute__ ((visibility("default")))
 # else
 /* We are using this library */
-#  define KOLAB_EXPORT KDE_IMPORT
+#  define KOLAB_EXPORT __attribute__ ((visibility("default")))
 # endif
 #endif
 
 # ifndef KOLAB_EXPORT_DEPRECATED
-#  define KOLAB_EXPORT_DEPRECATED KDE_DEPRECATED KOLAB_EXPORT
+#  define KOLAB_EXPORT_DEPRECATED KDE_DEPRECATED __attribute__ ((visibility("default")))
 # endif
 
 /**





More information about the commits mailing list