From 8f53671f63ece01d62d997b3893e53654a91cc6a Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Thu, 7 Dec 2023 10:35:11 +0100 Subject: [PATCH 1/4] Update ADS to 4.2.1 from 4.0.1 --- HDPS/CMakeLists.txt | 19 +++++++++++-------- HDPS/external/advanced_docking | 2 +- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/HDPS/CMakeLists.txt b/HDPS/CMakeLists.txt index bc54009eb..1e149a2a6 100644 --- a/HDPS/CMakeLists.txt +++ b/HDPS/CMakeLists.txt @@ -104,8 +104,11 @@ find_package(Qt6 6.3 COMPONENTS Core Widgets OpenGL OpenGLWidgets WebEngineWidge add_definitions(-DQT_MESSAGELOGCONTEXT) add_compile_definitions(QT_DISABLE_DEPRECATED_BEFORE=0x050F00) -# Qt Advanced docking system, set version manually -set(ADS_VERSION 4.0.1) +message(STATUS "Using Qt version ${Qt6Widgets_VERSION}") + +# Qt Advanced docking system +set(ADS_VERSION 4.2.1) +message(STATUS "Using Qt Advanced Docking System version ${ADS_VERSION}") set(BUILD_EXAMPLES OFF CACHE BOOL "Qt-ads examples") add_subdirectory(external/advanced_docking) @@ -182,14 +185,14 @@ target_link_libraries(${MV_PRIVATE_LIB} PRIVATE Qt6::Widgets) target_link_libraries(${MV_PRIVATE_LIB} PRIVATE Qt6::WebEngineWidgets) target_link_libraries(${MV_PRIVATE_LIB} PRIVATE Qt6::OpenGL) target_link_libraries(${MV_PRIVATE_LIB} PRIVATE Qt6::OpenGLWidgets) -target_link_libraries(${MV_PRIVATE_LIB} PRIVATE qtadvanceddocking) +target_link_libraries(${MV_PRIVATE_LIB} PRIVATE qt6advanceddocking) target_link_libraries(${MV_PRIVATE_LIB} PRIVATE QuaZip) target_link_libraries(${MV_PRIVATE_LIB} PRIVATE ${MV_PUBLIC_LIB}) # Use avx if enabled and available check_and_set_AVX(${MV_PRIVATE_LIB} ${MV_USE_AVX}) -add_dependencies(${MV_PRIVATE_LIB} ${MV_PUBLIC_LIB} QuaZip qtadvanceddocking) +add_dependencies(${MV_PRIVATE_LIB} ${MV_PUBLIC_LIB} QuaZip qt6advanceddocking) # ----------------------------------------------------------------------------- # Target MV_EXE @@ -215,7 +218,7 @@ target_link_libraries(${MV_EXE} PRIVATE Qt6::Widgets) target_link_libraries(${MV_EXE} PRIVATE Qt6::WebEngineWidgets) target_link_libraries(${MV_EXE} PRIVATE Qt6::OpenGL) target_link_libraries(${MV_EXE} PRIVATE Qt6::OpenGLWidgets) -target_link_libraries(${MV_EXE} PRIVATE qtadvanceddocking) +target_link_libraries(${MV_EXE} PRIVATE qt6advanceddocking) target_link_libraries(${MV_EXE} PRIVATE QuaZip) target_link_libraries(${MV_EXE} PRIVATE ${MV_PUBLIC_LIB}) @@ -224,7 +227,7 @@ target_link_libraries(${MV_EXE} PRIVATE ${MV_PRIVATE_LIB}) # Use avx if enabled and available check_and_set_AVX(${MV_EXE} ${MV_USE_AVX}) -add_dependencies(${MV_EXE} ${MV_PUBLIC_LIB} ${MV_PRIVATE_LIB} QuaZip qtadvanceddocking) +add_dependencies(${MV_EXE} ${MV_PUBLIC_LIB} ${MV_PRIVATE_LIB} QuaZip qt6advanceddocking) if(MSVC) set_target_properties(${MV_EXE} PROPERTIES @@ -254,7 +257,7 @@ if(APPLE) # RESULT_VARIABLE retval COMMAND ${CMAKE_COMMAND} -E make_directory \"${BUNDLE_DIR}/Contents/Frameworks\" COMMAND ${CMAKE_COMMAND} -E copy_if_different - \"${MV_INSTALL_DIR}/$/lib/libqtadvanceddocking.${ADS_VERSION}.dylib\" + \"${MV_INSTALL_DIR}/$/lib/libqt6advanceddocking.${ADS_VERSION}.dylib\" \"${BUNDLE_DIR}/Contents/Frameworks/\" COMMAND ${CMAKE_COMMAND} -E copy_if_different \"$\" @@ -448,7 +451,7 @@ add_custom_command(TARGET ${MV_EXE} POST_BUILD # on windows, the DLLs should be placed in the same directory as the executable add_custom_command(TARGET ${MV_EXE} POST_BUILD COMMAND ${CMAKE_COMMAND} -E echo "Installing: dependency runtime libraries" - COMMAND ${CMAKE_COMMAND} -E copy_if_different $ ${MV_INSTALL_DIR}/$$,,/lib/> + COMMAND ${CMAKE_COMMAND} -E copy_if_different $ ${MV_INSTALL_DIR}/$$,,/lib/> COMMAND ${CMAKE_COMMAND} -E copy_if_different $ ${MV_INSTALL_DIR}/$$,,/lib/> ) diff --git a/HDPS/external/advanced_docking b/HDPS/external/advanced_docking index 2cd451c53..ec018a4c7 160000 --- a/HDPS/external/advanced_docking +++ b/HDPS/external/advanced_docking @@ -1 +1 @@ -Subproject commit 2cd451c53c2f45159f9108d988e5bec1dc9de4d1 +Subproject commit ec018a4c7063b3f9d7a24f32d73b1428c450851e From d810906b3bd23a78efd23ccdb03013c08e842075 Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Thu, 7 Dec 2023 10:36:06 +0100 Subject: [PATCH 2/4] More verbose version messages --- HDPS/CMakeLists.txt | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/HDPS/CMakeLists.txt b/HDPS/CMakeLists.txt index 1e149a2a6..c1625f69e 100644 --- a/HDPS/CMakeLists.txt +++ b/HDPS/CMakeLists.txt @@ -99,6 +99,7 @@ endif(MSVC) # Dependencies # ----------------------------------------------------------------------------- +# Qt find_package(Qt6 6.3 COMPONENTS Core Widgets OpenGL OpenGLWidgets WebEngineWidgets REQUIRED) add_definitions(-DQT_MESSAGELOGCONTEXT) @@ -112,7 +113,7 @@ message(STATUS "Using Qt Advanced Docking System version ${ADS_VERSION}") set(BUILD_EXAMPLES OFF CACHE BOOL "Qt-ads examples") add_subdirectory(external/advanced_docking) -# File compression LIBRARY +# File compression: ZLib if (WIN32) if(NOT DEFINED ZLIB_ROOT) message(FATAL_ERROR "You need to define ZLIB_ROOT, pointing to a zlib installation") @@ -128,14 +129,22 @@ elseif (APPLE) else() find_package(ZLIB REQUIRED) - message(STATUS "Using zlib at ${ZLIB_INCLUDE_DIRS}") + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.26") + message(STATUS "Using zlib version ${ZLIB_VERSION}") + else() + message(STATUS "Using zlib version ${ZLIB_VERSION_STRING}") + endif() endif() +# File compression: QuaZip set(QUAZIP_QT_MAJOR_VERSION 6) set(QUAZIP_BZIP2 OFF CACHE BOOL "Enables BZIP2 compression") # we use ZLIB, not BZIP +set(CMAKE_MESSAGE_LOG_LEVEL "WARNING") # prevent some status messages from quazip add_subdirectory(external/quazip) - - +set(CMAKE_MESSAGE_LOG_LEVEL "STATUS") +get_target_property(QuaZip_VERSION QuaZip VERSION) +message(STATUS "Using QuaZip version ${QuaZip_VERSION}") + # ----------------------------------------------------------------------------- # Source files # ----------------------------------------------------------------------------- From 504d37c4fb334c783805bd0388d0fa46883e0eb5 Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Thu, 7 Dec 2023 10:36:21 +0100 Subject: [PATCH 3/4] We're not quite at 1.0 --- HDPS/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HDPS/CMakeLists.txt b/HDPS/CMakeLists.txt index c1625f69e..705cb2c7e 100644 --- a/HDPS/CMakeLists.txt +++ b/HDPS/CMakeLists.txt @@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.17) # ----------------------------------------------------------------------------- set(MV_CORE "mv-core") project(${MV_CORE}) -set(version 1.0.0) +set(version 0.9.0) # These three targets defined in this CMakeLists.txt set(MV_APPLICATION_NAME "ManiVault Studio") # Name of the executable From 76cdc5fff755f7b19cd1373eadb0038d895c8d44 Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Thu, 7 Dec 2023 13:39:59 +0100 Subject: [PATCH 4/4] Set ManiVault version in cmake --- .gitignore | 5 ++++- HDPS/CMakeLists.txt | 18 ++++++++++++++++-- HDPS/cmake/ManiVaultVersion.h.in | 12 ++++++++++++ HDPS/src/Application.cpp | 3 ++- 4 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 HDPS/cmake/ManiVaultVersion.h.in diff --git a/.gitignore b/.gitignore index d9c1ea490..ca2cb3782 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,7 @@ install/ .DS_Store -*.aps \ No newline at end of file +*.aps + +# This file is automatically generated from ManiVaultVersion.h.in +HDPS/src/ManiVaultVersion.h diff --git a/HDPS/CMakeLists.txt b/HDPS/CMakeLists.txt index 705cb2c7e..16856eb03 100644 --- a/HDPS/CMakeLists.txt +++ b/HDPS/CMakeLists.txt @@ -4,8 +4,13 @@ cmake_minimum_required(VERSION 3.17) # Project: ManiVault-core # ----------------------------------------------------------------------------- set(MV_CORE "mv-core") -project(${MV_CORE}) -set(version 0.9.0) + +set(MV_VERSION_MAJOR 0) +set(MV_VERSION_MINOR 9) +set(MV_VERSION_PATCH 0) +set(MV_VERSION "${MV_VERSION_MAJOR}.${MV_VERSION_MINOR}.${MV_VERSION_PATCH}") + +project(${MV_CORE} VERSION ${MV_VERSION}) # These three targets defined in this CMakeLists.txt set(MV_APPLICATION_NAME "ManiVault Studio") # Name of the executable @@ -18,6 +23,7 @@ if(MSVC) set(LINK_TYPE STATIC) endif(MSVC) +message(STATUS "ManiVault version ${MV_VERSION}") message(STATUS "ManiVault Install dir: ${MV_INSTALL_DIR}") # ----------------------------------------------------------------------------- @@ -38,6 +44,9 @@ include(CMakePackageConfigHelpers) # Test hardware avx capabilities include(CMakeCheckSetAVX) +# create a file that defines MV_VERSION_MAJOR, etc +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/ManiVaultVersion.h.in" "${CMAKE_CURRENT_SOURCE_DIR}/src/ManiVaultVersion.h" @ONLY) + # ----------------------------------------------------------------------------- # Apple settings # ----------------------------------------------------------------------------- @@ -167,6 +176,8 @@ set_target_properties(${MV_PUBLIC_LIB} PROPERTIES PROJECT_LABEL "MV_Public") # Set the library output name different to the target name set_target_properties(${MV_PUBLIC_LIB} PROPERTIES OUTPUT_NAME "MV_Public") +set_target_properties(${MV_PUBLIC_LIB} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR}) + target_include_directories(${MV_PUBLIC_LIB} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src) target_compile_features(${MV_PUBLIC_LIB} PRIVATE cxx_std_17) @@ -214,6 +225,9 @@ add_executable(${MV_EXE} MACOSX_BUNDLE WIN32 ) set_target_properties(${MV_EXE} PROPERTIES OUTPUT_NAME ${MV_APPLICATION_NAME}) + +set_target_properties(${MV_EXE} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR}) + target_compile_features(${MV_EXE} PRIVATE cxx_std_17) # find libraries relative to the executable in the macOS .app tree diff --git a/HDPS/cmake/ManiVaultVersion.h.in b/HDPS/cmake/ManiVaultVersion.h.in new file mode 100644 index 000000000..481dfe2e5 --- /dev/null +++ b/HDPS/cmake/ManiVaultVersion.h.in @@ -0,0 +1,12 @@ +#ifndef MANIVAULTVERSION_H_IN_H +#define MANIVAULTVERSION_H_IN_H + +#include + +// Set ManiVault versions as defined in core/HDPS/CMakeList.txt + +constexpr std::int32_t MV_VERSION_MAJOR = @PROJECT_VERSION_MAJOR@; +constexpr std::int32_t MV_VERSION_MINOR = @PROJECT_VERSION_MINOR@; +constexpr std::int32_t MV_VERSION_PATCH = @PROJECT_VERSION_PATCH@; + +#endif //MANIVAULTVERSION_H_IN_H diff --git a/HDPS/src/Application.cpp b/HDPS/src/Application.cpp index 540cadd76..cf975cd44 100644 --- a/HDPS/src/Application.cpp +++ b/HDPS/src/Application.cpp @@ -7,6 +7,7 @@ #include "BackgroundTask.h" #include "ForegroundTask.h" #include "AbstractManager.h" +#include "ManiVaultVersion.h" #include "util/IconFonts.h" #include "util/FontAwesome.h" @@ -28,7 +29,7 @@ namespace mv { Application::Application(int& argc, char** argv) : QApplication(argc, argv), _core(nullptr), - _version({ 0, 9 }), + _version({ MV_VERSION_MAJOR, MV_VERSION_MINOR }), _iconFonts(), _settings(), _serializationTemporaryDirectory(),