Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Advanced Docking System #423

Merged
merged 4 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 25 additions & 13 deletions HDPS/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -99,17 +99,21 @@ endif(MSVC)
# Dependencies
# -----------------------------------------------------------------------------

# Qt
find_package(Qt6 6.3 COMPONENTS Core Widgets OpenGL OpenGLWidgets WebEngineWidgets REQUIRED)

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)

# 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")
Expand All @@ -125,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
# -----------------------------------------------------------------------------
Expand Down Expand Up @@ -182,14 +194,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
Expand All @@ -215,7 +227,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})
Expand All @@ -224,7 +236,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
Expand Down Expand Up @@ -254,7 +266,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}/$<CONFIGURATION>/lib/libqtadvanceddocking.${ADS_VERSION}.dylib\"
\"${MV_INSTALL_DIR}/$<CONFIGURATION>/lib/libqt6advanceddocking.${ADS_VERSION}.dylib\"
\"${BUNDLE_DIR}/Contents/Frameworks/\"
COMMAND ${CMAKE_COMMAND} -E copy_if_different
\"$<TARGET_FILE:${MV_PUBLIC_LIB}>\"
Expand Down Expand Up @@ -448,7 +460,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 $<TARGET_FILE:qtadvanceddocking> ${MV_INSTALL_DIR}/$<CONFIGURATION>$<IF:$<CXX_COMPILER_ID:MSVC>,,/lib/>
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:qt6advanceddocking> ${MV_INSTALL_DIR}/$<CONFIGURATION>$<IF:$<CXX_COMPILER_ID:MSVC>,,/lib/>
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:QuaZip> ${MV_INSTALL_DIR}/$<CONFIGURATION>$<IF:$<CXX_COMPILER_ID:MSVC>,,/lib/>
)

Expand Down
2 changes: 1 addition & 1 deletion HDPS/external/advanced_docking
Submodule advanced_docking updated 119 files
Loading