]> O.S.I.I.S - jp/vkvg.git/commitdiff
set vkvg version macro in cmake
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Mon, 31 Aug 2020 13:41:32 +0000 (15:41 +0200)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Mon, 31 Aug 2020 13:41:32 +0000 (15:41 +0200)
CMakeLists.txt
include/vkvg.h
tests/CMakeLists.txt

index 9c593d03597a05d6c37949843f8903fad507924c..58cbd1778f99a2b2d863d3e6b613b3e6b8c35a0c 100644 (file)
@@ -5,6 +5,12 @@ SET(LANG "CXX")
 #PROJECT(vkvg VERSION 0.1.1 DESCRIPTION "Vulkan Vector Graphic" LANGUAGES ${LANG})
 PROJECT(vkvg VERSION 0.1.1 DESCRIPTION "Vulkan Vector Graphic")
 
+ADD_COMPILE_DEFINITIONS(
+       "VKVG_VERSION_MAJOR=${vkvg_VERSION_MAJOR}"
+       "VKVG_VERSION_MINOR=${vkvg_VERSION_MINOR}"
+       "VKVG_VERSION_REVISION=${vkvg_VERSION_PATCH}"
+)
+
 INCLUDE(CheckSymbolExists)
 INCLUDE(CheckIncludeFile)
 INCLUDE(GNUInstallDirs)
@@ -206,11 +212,7 @@ IF (VKVG_BUILD_TESTS)
        ADD_SUBDIRECTORY(tests)
 ENDIF (VKVG_BUILD_TESTS)
 
-MESSAGE(STATUS "\n\n--------------------------------------------------------------------------")
-MESSAGE(STATUS "VKVG VERSION ${vkvg_VERSION_MAJOR}.${vkvg_VERSION_MINOR}.${vkvg_VERSION_MAJOR}")
-MESSAGE(STATUS "Build type\t\t= ${CMAKE_BUILD_TYPE}")
-MESSAGE(STATUS "VULKAN_SDK\t\t= $ENV{VULKAN_SDK}")
-MESSAGE(STATUS "VK_LAYER_PATH\t= $ENV{VK_LAYER_PATH}")
+MESSAGE(STATUS "VKVG version\t\t= ${vkvg_VERSION_MAJOR}.${vkvg_VERSION_MINOR}.${vkvg_VERSION_PATCH}")
 IF (VKVG_BUILD_TESTS)
        MESSAGE(STATUS "Build tests\t\t= true.")
 ELSE ()
@@ -239,7 +241,6 @@ IF (VKVG_LCD_FONT_FILTER)
 ELSE ()
        MESSAGE(STATUS "Font filtering\t= Grayscale.")
 ENDIF ()
-MESSAGE(STATUS "---------------------------------------------------------------------------\n\n")
 
 IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
        INCLUDE(InstallRequiredSystemLibraries)
index 015a9168a86cdfd9aec00a48379bb46f0646fe83..73fd32efddcae887c39ad146757c1b6cce309012 100644 (file)
@@ -71,34 +71,6 @@ extern "C" {
 #include <math.h>
 #include <stdbool.h>
 
-/*! @defgroup VKVG version macros
- *     @brief Compile-time and run-time version checks.
- *
- *     vkvg library versioning follows the [Semantic Versioning 2.0.0](https://semver.org/)
- *
- *  @{ */
-/*! @brief Major version number of the VKVG library.
- *
- *  This is incremented when the API is changed in non-compatible ways.
- *  @ingroup init
- */
-#define VKVG_VERSION_MAJOR          0
-/*! @brief The minor version number of the VKVG library.
- *
- *  This is incremented when features are added to the API but it remains
- *  backward-compatible.
- *  @ingroup init
- */
-#define VKVG_VERSION_MINOR          1
-/*! @brief The revision number of the VKVG library.
- *
- *  This is incremented when a bug fix release is made that does not contain any
- *  API changes.
- *  @ingroup init
- */
-#define VKVG_VERSION_REVISION       1
-/*! @} */
-
 #ifndef cairo_public
 # if defined (_MSC_VER)
 #  define vkvg_public __declspec(dllimport)
@@ -694,8 +666,8 @@ void vkvg_multisample_surface_resolve (VkvgSurface surf);
 
 /**
  * @brief compositing operators
- * 
- * define the operation used to draw 
+ *
+ * define the operation used to draw
  */
 typedef enum _vkvg_operator {
        VKVG_OPERATOR_CLEAR,
@@ -1000,22 +972,22 @@ void vkvg_set_source_surface (VkvgContext ctx, VkvgSurface surf, float x, float
  */
 void vkvg_set_source (VkvgContext ctx, VkvgPattern pat);
 /**
- * @brief 
- * 
- * @param ctx 
- * @param op 
+ * @brief
+ *
+ * @param ctx
+ * @param op
  */
 void vkvg_set_operator (VkvgContext ctx, vkvg_operator_t op);
 /**
- * @brief 
- * 
- * @param ctx 
- * @param fr 
+ * @brief
+ *
+ * @param ctx
+ * @param fr
  */
 void vkvg_set_fill_rule (VkvgContext ctx, vkvg_fill_rule_t fr);
 /**
  * @brief set the dash configuration for strokes
- * 
+ *
  * Sets the dash pattern to be used by the next #vkvg_stroke().
  * A dash pattern is specified by dashes, an array of positive values.
  * Each value provides the length of alternate "on" and "off" portions of the stroke.
@@ -1028,7 +1000,7 @@ void vkvg_set_fill_rule (VkvgContext ctx, vkvg_fill_rule_t fr);
 void vkvg_set_dash (VkvgContext ctx, const float* dashes, uint32_t num_dashes, float offset);
 /**
  * @brief get current dash settings.
- * 
+ *
  * Get the current dash configuration for the supplied #context.
  * If dashes pointer is NULL, only count and offset are returned, useful to query dash array dimension first.
  * @param ctx a valid vkvg @ref context
@@ -1041,7 +1013,7 @@ void vkvg_get_dash (VkvgContext ctx, const float *dashes, uint32_t* num_dashes,
 
 /**
  * @brief get current line width
- * 
+ *
  * This function return the current line width to use by vkvg_stroke() as set by #vkvg_set_line_width().
  * @param ctx a valid vkvg @ref context
  * @return current line width.
index 1e50ecefa12fa66eca787a65b3693e40ba54dc17..e028f70e4a0db5cce28897f446750fdc464f0cc3 100644 (file)
@@ -44,7 +44,6 @@ file(GLOB_RECURSE DATAS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "data/*")
 FOREACH(DATA_FILE ${DATAS})
        GET_FILENAME_COMPONENT(copy-dest-dir ${CMAKE_CURRENT_BINARY_DIR}/${DATA_FILE} DIRECTORY)
        SET(copy-output ${CMAKE_CURRENT_BINARY_DIR}/${DATA_FILE})
-       MESSAGE(STATUS "DATA_FILE\t\t= ${DATA_FILE}")
        ADD_CUSTOM_COMMAND(
                OUTPUT  ${copy-output}
                COMMAND ${CMAKE_COMMAND} -E make_directory ${copy-dest-dir}