From 04544f5724f2c44bb25e113f4edfdcf07e4c7edc Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Mon, 24 Feb 2025 16:57:16 +0100 Subject: [PATCH 1/4] Add build arch --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aba0e96..44abd82 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -81,6 +81,7 @@ jobs: conan-libcxx-version: ${{matrix.build-libcxx}} conan-build-type: ${{matrix.build-config}} conan-build-os: ${{matrix.build-os}} + build-arch: ${{matrix.build-arch}} conan-user: ${{secrets.LKEB_UPLOAD_USER}} conan-password: ${{secrets.LKEB_UPLOAD_USER_PASSWORD}} conan-pem: ${{secrets.LKEB_UPLOAD_CERT_CHAIN}} @@ -96,6 +97,7 @@ jobs: conan-libcxx-version: ${{matrix.build-libcxx}} conan-build-type: ${{matrix.build-config}} conan-build-os: ${{matrix.build-os}} + build-arch: ${{matrix.build-arch}} conan-user: ${{secrets.LKEB_UPLOAD_USER}} conan-password: ${{secrets.LKEB_UPLOAD_USER_PASSWORD}} conan-pem: ${{secrets.LKEB_UPLOAD_CERT_CHAIN}} \ No newline at end of file From 9ab8e36898a8496a6bdfeddc4e5a505665bed606 Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Mon, 24 Feb 2025 16:57:23 +0100 Subject: [PATCH 2/4] Update cmake --- CMakeLists.txt | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e9a8a8..37be7b0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.17) +cmake_minimum_required(VERSION 3.22) option(MV_UNITY_BUILD "Combine target source files into batches for faster compilation" OFF) @@ -19,8 +19,7 @@ set(CMAKE_AUTOMOC ON) if(MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3 /DWIN32 /EHsc /MP /permissive- /Zc:__cplusplus") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:LIBCMT") - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") endif(MSVC) # ----------------------------------------------------------------------------- @@ -28,7 +27,7 @@ endif(MSVC) # ----------------------------------------------------------------------------- find_package(Qt6 COMPONENTS Widgets WebEngineWidgets OpenGL OpenGLWidgets REQUIRED) -find_package(ManiVault COMPONENTS Core PointData ClusterData ColorData ImageData CONFIG) +find_package(ManiVault COMPONENTS Core PointData ClusterData ColorData ImageData CONFIG QUIET) # ----------------------------------------------------------------------------- # Source files @@ -114,7 +113,7 @@ target_include_directories(${PROJECT} PRIVATE "${ManiVault_INCLUDE_DIR}") # ----------------------------------------------------------------------------- # Target properties # ----------------------------------------------------------------------------- -target_compile_features(${PROJECT} PRIVATE cxx_std_17) +target_compile_features(${PROJECT} PRIVATE cxx_std_20) if(MV_UNITY_BUILD) set_target_properties(${PROJECT} PROPERTIES UNITY_BUILD ON) @@ -159,6 +158,6 @@ set_target_properties(${PROJECT} # ----------------------------------------------------------------------------- # Automatically set the debug environment (command + working directory) for MSVC if(MSVC) - set_property(TARGET ${PROJECT} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY $,${ManiVault_INSTALL_DIR}/debug,${ManiVault_INSTALL_DIR}/release>) - set_property(TARGET ${PROJECT} PROPERTY VS_DEBUGGER_COMMAND $,"${ManiVault_INSTALL_DIR}/debug/ManiVault Studio.exe","${ManiVault_INSTALL_DIR}/release/ManiVault Studio.exe">) + set_property(TARGET ${PROJECT} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY $,${ManiVault_INSTALL_DIR}/Debug,$,${ManiVault_INSTALL_DIR}/RelWithDebInfo,${ManiVault_INSTALL_DIR}/Release>>) + set_property(TARGET ${PROJECT} PROPERTY VS_DEBUGGER_COMMAND $,"${ManiVault_INSTALL_DIR}/Debug/ManiVault Studio.exe",$,"${ManiVault_INSTALL_DIR}/RelWithDebInfo/ManiVault Studio.exe","${ManiVault_INSTALL_DIR}/Release/ManiVault Studio.exe">>) endif() From ea5255c0381b0d9a21235fc09e08d2ec7e669629 Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Mon, 24 Feb 2025 16:57:29 +0100 Subject: [PATCH 3/4] Update CI (relwithdebinfo) --- conanfile.py | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/conanfile.py b/conanfile.py index f39ce1f..ba6073f 100644 --- a/conanfile.py +++ b/conanfile.py @@ -92,13 +92,8 @@ def generate(self): qt_path = pathlib.Path(self.deps_cpp_info["qt"].rootpath) qt_cfg = list(qt_path.glob("**/Qt6Config.cmake"))[0] qt_dir = qt_cfg.parents[0].as_posix() - qt_root = qt_cfg.parents[3].as_posix() - # for Qt >= 6.4.2 - #tc.variables["Qt6_DIR"] = qt_dir - - # for Qt < 6.4.2 - tc.variables["Qt6_ROOT"] = qt_root + tc.variables["Qt6_DIR"] = qt_dir # Use the ManiVault .cmake file to find ManiVault with find_package mv_core_root = self.deps_cpp_info["hdps-core"].rootpath @@ -121,12 +116,12 @@ def build(self): print("Build OS is: ", self.settings.os) cmake = self._configure_cmake() - cmake.build(build_type="Debug") + cmake.build(build_type="RelWithDebInfo") cmake.build(build_type="Release") def package(self): package_dir = pathlib.Path(self.build_folder, "package") - debug_dir = package_dir / "Debug" + relWithDebInfo_dir = package_dir / "RelWithDebInfo" release_dir = package_dir / "Release" print("Packaging install dir: ", package_dir) subprocess.run( @@ -135,9 +130,9 @@ def package(self): "--install", self.build_folder, "--config", - "Debug", + "RelWithDebInfo", "--prefix", - debug_dir, + relWithDebInfo_dir, ] ) subprocess.run( @@ -152,11 +147,11 @@ def package(self): ] ) self.copy(pattern="*", src=package_dir) - + def package_info(self): - self.cpp_info.debug.libdirs = ["Debug/lib"] - self.cpp_info.debug.bindirs = ["Debug/Plugins", "Debug"] - self.cpp_info.debug.includedirs = ["Debug/include", "Debug"] + self.cpp_info.relwithdebinfo.libdirs = ["RelWithDebInfo/lib"] + self.cpp_info.relwithdebinfo.bindirs = ["RelWithDebInfo/Plugins", "RelWithDebInfo"] + self.cpp_info.relwithdebinfo.includedirs = ["RelWithDebInfo/include", "RelWithDebInfo"] self.cpp_info.release.libdirs = ["Release/lib"] self.cpp_info.release.bindirs = ["Release/Plugins", "Release"] self.cpp_info.release.includedirs = ["Release/include", "Release"] From 69265a3ac714209bbd0f2d1fecd201df2b998917 Mon Sep 17 00:00:00 2001 From: Alexander Vieth Date: Tue, 25 Feb 2025 09:47:05 +0100 Subject: [PATCH 4/4] Fine grained flags --- CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 37be7b0..754613b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,9 +17,10 @@ set(CMAKE_AUTORCC ON) set(CMAKE_AUTOMOC ON) if(MSVC) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3 /DWIN32 /EHsc /MP /permissive- /Zc:__cplusplus") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:LIBCMT") - set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DWIN32 /EHsc /MP /permissive- /Zc:__cplusplus") + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MD") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") endif(MSVC) # -----------------------------------------------------------------------------