From: Jean-Philippe Bruyère Date: Mon, 31 Aug 2020 13:41:32 +0000 (+0200) Subject: set vkvg version macro in cmake X-Git-Tag: v0.2.0~91 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=851aaafb05bc89484be790496a8d14a8ca0d5b78;p=jp%2Fvkvg.git set vkvg version macro in cmake --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 9c593d0..58cbd17 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/include/vkvg.h b/include/vkvg.h index 015a916..73fd32e 100644 --- a/include/vkvg.h +++ b/include/vkvg.h @@ -71,34 +71,6 @@ extern "C" { #include #include -/*! @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. diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 1e50ece..e028f70 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -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}