From 389e39468cf4066e69d61548275abd5f35361a3b Mon Sep 17 00:00:00 2001 From: Mathieu Westphal Date: Wed, 19 Apr 2023 09:05:15 +0200 Subject: [PATCH] Update F3D version to 2.0.0-RC1 (#733) * Update F3D version to 2.0.0-RC1 --- CMakeLists.txt | 4 +++- application/CMakeLists.txt | 6 +++--- application/F3DConfig.h.in | 2 +- library/CMakeLists.txt | 3 +++ library/src/config.cxx.in | 2 +- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3d8efe1326..8c2b9cb6f7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,9 +21,11 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib${output_postfix}") set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib${output_postfix}") project(F3D - VERSION "1.3.1" + VERSION 2.0.0 DESCRIPTION "F3D - A fast and minimalist 3D viewer" LANGUAGES C CXX) +set(F3D_PROJECT_VERSION_SUFFIX "-RC1") +set(F3D_VERSION ${PROJECT_VERSION}${F3D_PROJECT_VERSION_SUFFIX}) string(TIMESTAMP F3D_BUILD_DATE "%Y-%m-%d %H:%M:%S" UTC) diff --git a/application/CMakeLists.txt b/application/CMakeLists.txt index 58550cec7b..200fb6ff1c 100644 --- a/application/CMakeLists.txt +++ b/application/CMakeLists.txt @@ -99,10 +99,10 @@ if(F3D_MACOS_BUNDLE) set(MACOSX_BUNDLE_EXECUTABLE_NAME ${PROJECT_NAME}) set(MACOSX_BUNDLE_INFO_STRING ${PROJECT_DESCRIPTION}) set(MACOSX_BUNDLE_GUI_IDENTIFIER "app.f3d.F3D") - set(MACOSX_BUNDLE_LONG_VERSION_STRING ${PROJECT_VERSION}) + set(MACOSX_BUNDLE_LONG_VERSION_STRING ${F3D_VERSION}) set(MACOSX_BUNDLE_BUNDLE_NAME ${PROJECT_NAME}) - set(MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION}) - set(MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}) + set(MACOSX_BUNDLE_SHORT_VERSION_STRING ${F3D_VERSION}) + set(MACOSX_BUNDLE_BUNDLE_VERSION ${F3D_VERSION}) set(MACOSX_BUNDLE_COPYRIGHT "Michael Migliore, Mathieu Westphal") # Generate MacOS bundle diff --git a/application/F3DConfig.h.in b/application/F3DConfig.h.in index 8ab295cef0..e4ac411997 100644 --- a/application/F3DConfig.h.in +++ b/application/F3DConfig.h.in @@ -5,7 +5,7 @@ namespace F3D { const std::string AppName = "@PROJECT_NAME@"; const std::string AppTitle = "@PROJECT_DESCRIPTION@"; - const std::string AppVersion = "@PROJECT_VERSION@"; + const std::string AppVersion = "@F3D_VERSION@"; } #cmakedefine01 F3D_MACOS_BUNDLE diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index 502bf451f2..ca4096223b 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -188,6 +188,9 @@ if(BUILD_SHARED_LIBS) configure_package_config_file( "${CMAKE_SOURCE_DIR}/cmake/f3dConfig.cmake.in" "${CMAKE_BINARY_DIR}/cmake/f3dConfig.cmake" INSTALL_DESTINATION "lib/cmake/f3d") + + # Write PROJECT_VERSION instead of F3D_VERSION to avoid any potential issues with version comparison + # because of the potential suffix write_basic_package_version_file( "${CMAKE_BINARY_DIR}/cmake/f3dConfigVersion.cmake" VERSION "${PROJECT_VERSION}" diff --git a/library/src/config.cxx.in b/library/src/config.cxx.in index 23c5921cba..d7e2b99790 100644 --- a/library/src/config.cxx.in +++ b/library/src/config.cxx.in @@ -4,7 +4,7 @@ namespace f3d::detail { -const std::string LibVersion = "@PROJECT_VERSION@"; // Version is synchronized with F3D +const std::string LibVersion = "@F3D_VERSION@"; // Version is synchronized with F3D const std::string LibBuildSystem = "@CMAKE_SYSTEM_NAME@ @F3D_SYSTEM_PROCESSOR@"; const std::string LibBuildDate = "@F3D_BUILD_DATE@"; const std::string LibCompiler = "@CMAKE_CXX_COMPILER_ID@ @CMAKE_CXX_COMPILER_VERSION@";