Skip to content

Commit 2236414

Browse files
authored
Update to Qt 6.8 (#164)
* Add build arch * Update cmake * Update CI (relwithdebinfo) * Fine grained flags
1 parent 8419099 commit 2236414

3 files changed

Lines changed: 18 additions & 21 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ jobs:
8181
conan-libcxx-version: ${{matrix.build-libcxx}}
8282
conan-build-type: ${{matrix.build-config}}
8383
conan-build-os: ${{matrix.build-os}}
84+
build-arch: ${{matrix.build-arch}}
8485
conan-user: ${{secrets.LKEB_UPLOAD_USER}}
8586
conan-password: ${{secrets.LKEB_UPLOAD_USER_PASSWORD}}
8687
conan-pem: ${{secrets.LKEB_UPLOAD_CERT_CHAIN}}
@@ -96,6 +97,7 @@ jobs:
9697
conan-libcxx-version: ${{matrix.build-libcxx}}
9798
conan-build-type: ${{matrix.build-config}}
9899
conan-build-os: ${{matrix.build-os}}
100+
build-arch: ${{matrix.build-arch}}
99101
conan-user: ${{secrets.LKEB_UPLOAD_USER}}
100102
conan-password: ${{secrets.LKEB_UPLOAD_USER_PASSWORD}}
101103
conan-pem: ${{secrets.LKEB_UPLOAD_CERT_CHAIN}}

CMakeLists.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.17)
1+
cmake_minimum_required(VERSION 3.22)
22

33
option(MV_UNITY_BUILD "Combine target source files into batches for faster compilation" OFF)
44

@@ -17,9 +17,9 @@ set(CMAKE_AUTORCC ON)
1717
set(CMAKE_AUTOMOC ON)
1818

1919
if(MSVC)
20-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3 /DWIN32 /EHsc /MP /permissive- /Zc:__cplusplus")
21-
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:LIBCMT")
20+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DWIN32 /EHsc /MP /permissive- /Zc:__cplusplus")
2221
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd")
22+
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MD")
2323
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD")
2424
endif(MSVC)
2525

@@ -28,7 +28,7 @@ endif(MSVC)
2828
# -----------------------------------------------------------------------------
2929
find_package(Qt6 COMPONENTS Widgets WebEngineWidgets OpenGL OpenGLWidgets REQUIRED)
3030

31-
find_package(ManiVault COMPONENTS Core PointData ClusterData ColorData ImageData CONFIG)
31+
find_package(ManiVault COMPONENTS Core PointData ClusterData ColorData ImageData CONFIG QUIET)
3232

3333
# -----------------------------------------------------------------------------
3434
# Source files
@@ -114,7 +114,7 @@ target_include_directories(${PROJECT} PRIVATE "${ManiVault_INCLUDE_DIR}")
114114
# -----------------------------------------------------------------------------
115115
# Target properties
116116
# -----------------------------------------------------------------------------
117-
target_compile_features(${PROJECT} PRIVATE cxx_std_17)
117+
target_compile_features(${PROJECT} PRIVATE cxx_std_20)
118118

119119
if(MV_UNITY_BUILD)
120120
set_target_properties(${PROJECT} PROPERTIES UNITY_BUILD ON)
@@ -159,6 +159,6 @@ set_target_properties(${PROJECT}
159159
# -----------------------------------------------------------------------------
160160
# Automatically set the debug environment (command + working directory) for MSVC
161161
if(MSVC)
162-
set_property(TARGET ${PROJECT} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY $<IF:$<CONFIG:DEBUG>,${ManiVault_INSTALL_DIR}/debug,${ManiVault_INSTALL_DIR}/release>)
163-
set_property(TARGET ${PROJECT} PROPERTY VS_DEBUGGER_COMMAND $<IF:$<CONFIG:DEBUG>,"${ManiVault_INSTALL_DIR}/debug/ManiVault Studio.exe","${ManiVault_INSTALL_DIR}/release/ManiVault Studio.exe">)
162+
set_property(TARGET ${PROJECT} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY $<IF:$<CONFIG:DEBUG>,${ManiVault_INSTALL_DIR}/Debug,$<IF:$<CONFIG:RELWITHDEBINFO>,${ManiVault_INSTALL_DIR}/RelWithDebInfo,${ManiVault_INSTALL_DIR}/Release>>)
163+
set_property(TARGET ${PROJECT} PROPERTY VS_DEBUGGER_COMMAND $<IF:$<CONFIG:DEBUG>,"${ManiVault_INSTALL_DIR}/Debug/ManiVault Studio.exe",$<IF:$<CONFIG:RELWITHDEBINFO>,"${ManiVault_INSTALL_DIR}/RelWithDebInfo/ManiVault Studio.exe","${ManiVault_INSTALL_DIR}/Release/ManiVault Studio.exe">>)
164164
endif()

conanfile.py

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,8 @@ def generate(self):
9292
qt_path = pathlib.Path(self.deps_cpp_info["qt"].rootpath)
9393
qt_cfg = list(qt_path.glob("**/Qt6Config.cmake"))[0]
9494
qt_dir = qt_cfg.parents[0].as_posix()
95-
qt_root = qt_cfg.parents[3].as_posix()
9695

97-
# for Qt >= 6.4.2
98-
#tc.variables["Qt6_DIR"] = qt_dir
99-
100-
# for Qt < 6.4.2
101-
tc.variables["Qt6_ROOT"] = qt_root
96+
tc.variables["Qt6_DIR"] = qt_dir
10297

10398
# Use the ManiVault .cmake file to find ManiVault with find_package
10499
mv_core_root = self.deps_cpp_info["hdps-core"].rootpath
@@ -121,12 +116,12 @@ def build(self):
121116
print("Build OS is: ", self.settings.os)
122117

123118
cmake = self._configure_cmake()
124-
cmake.build(build_type="Debug")
119+
cmake.build(build_type="RelWithDebInfo")
125120
cmake.build(build_type="Release")
126121

127122
def package(self):
128123
package_dir = pathlib.Path(self.build_folder, "package")
129-
debug_dir = package_dir / "Debug"
124+
relWithDebInfo_dir = package_dir / "RelWithDebInfo"
130125
release_dir = package_dir / "Release"
131126
print("Packaging install dir: ", package_dir)
132127
subprocess.run(
@@ -135,9 +130,9 @@ def package(self):
135130
"--install",
136131
self.build_folder,
137132
"--config",
138-
"Debug",
133+
"RelWithDebInfo",
139134
"--prefix",
140-
debug_dir,
135+
relWithDebInfo_dir,
141136
]
142137
)
143138
subprocess.run(
@@ -152,11 +147,11 @@ def package(self):
152147
]
153148
)
154149
self.copy(pattern="*", src=package_dir)
155-
150+
156151
def package_info(self):
157-
self.cpp_info.debug.libdirs = ["Debug/lib"]
158-
self.cpp_info.debug.bindirs = ["Debug/Plugins", "Debug"]
159-
self.cpp_info.debug.includedirs = ["Debug/include", "Debug"]
152+
self.cpp_info.relwithdebinfo.libdirs = ["RelWithDebInfo/lib"]
153+
self.cpp_info.relwithdebinfo.bindirs = ["RelWithDebInfo/Plugins", "RelWithDebInfo"]
154+
self.cpp_info.relwithdebinfo.includedirs = ["RelWithDebInfo/include", "RelWithDebInfo"]
160155
self.cpp_info.release.libdirs = ["Release/lib"]
161156
self.cpp_info.release.bindirs = ["Release/Plugins", "Release"]
162157
self.cpp_info.release.includedirs = ["Release/include", "Release"]

0 commit comments

Comments
 (0)