]> Creatis software - cpPlugins.git/blobdiff - lib/cpExtensions/Config.h.in
...
[cpPlugins.git] / lib / cpExtensions / Config.h.in
index dbf80e9212ab06ff53f385dab133ad2ebb3ee29e..45852444da47885d9dbde814fcee8851242005e2 100644 (file)
@@ -1,20 +1,70 @@
-#ifndef __CPEXTENSIONS__CONFIG__H__
-#define __CPEXTENSIONS__CONFIG__H__
+#ifndef __cpExtensions__Config__h__
+#define __cpExtensions__Config__h__
 
-#include <cpExtensions/cpExtensions_Export.h>
+#include <cpExtensions_Export.h>
 
-#define cpExtensions_MAJ_VER @prj_MAJ_VER@
-#define cpExtensions_MIN_VER @prj_MIN_VER@
-#define cpExtensions_REL_VER @prj_VER@
-#define cpExtensions_VER     "@prj_sVER@"
+/*
+ * =========================================================================
+ * Identify OS
+ * =========================================================================
+ */
+#define cpExtensions_OS_@CMAKE_SYSTEM_NAME@
 
-#define cpExtensions_QT4_USED @QT4_FOUND@
-#if cpExtensions_QT4_USED == 1
-#  define cpExtensions_QT4
-#else // cpExtensions_QT4_USED == 1
+/*
+ * =========================================================================
+ * Some global values
+ * =========================================================================
+ */
+#define cpExtensions_QT4_@QT4_FOUND@
+#ifdef cpExtensions_QT4_TRUE
+#  ifndef cpExtensions_QT4
+#    define cpExtensions_QT4
+#  endif // cpExtensions_QT4
+#  define cpExtensions_QVTKWidget @cpPlugins_Qt4_VTKWidget@
+#  include <@cpPlugins_Qt4_VTKWidget@.h>
+#else // cpExtensions_QT4_TRUE
 #  undef cpExtensions_QT4
-#endif // cpExtensions_QT4_USED == 1
+#endif // cpExtensions_QT4_TRUE
 
-#endif // __CPEXTENSIONS__CONFIG__H__
+/*
+ * =========================================================================
+ * Version numbers and strings
+ * =========================================================================
+ */
+
+#define cpExtensions_MAJOR_VERSION   @prj_MAJOR_VERSION@
+#define cpExtensions_MINOR_VERSION   @prj_MINOR_VERSION@
+#define cpExtensions_RELEASE_VERSION @prj_RELEASE_VERSION@
+#define cpExtensions_VERSION         "@prj_VERSION@"
+#define cpExtensions_SHORT_VERSION   "@prj_SHORT_VERSION@"
+
+/*
+ * =========================================================================
+ * Language related macros
+ * =========================================================================
+ */
+
+#if __cplusplus >= 201103L
+#  define cpExtensions_OVERRIDE override
+#  define cpExtensions_DELETE_FUNCTION =delete
+#  define cpExtensions_NULLPTR  nullptr
+#  define cpExtensions_NOEXCEPT noexcept
+#  define cpExtensions_HAS_CXX11_STATIC_ASSERT
+#  define cpExtensions_HAS_CXX11_RVREF
+#else
+#  define cpExtensions_OVERRIDE
+#  define cpExtensions_DELETE_FUNCTION
+#  define cpExtensions_NULLPTR  NULL
+#  define cpExtensions_NOEXCEPT throw()
+#endif
+
+// -------------------------------------------------------------------------
+#ifdef cpExtensions_OS_Windows
+#  define cpExtensions_SPRINTF( B, S, O ) sprintf_s( B, S, "%s", O );
+#else // cpExtensions_OS_Windows
+#  define cpExtensions_SPRINTF( B, S, O ) std::sprintf( B, "%s", O );
+#endif // cpExtensions_OS_Windows
+
+#endif // __cpExtensions__Config__h__
 
 // eof - $RCSfile$