Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand All @@ -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}}
14 changes: 7 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)

Expand All @@ -17,9 +17,9 @@ 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_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)

Expand All @@ -28,7 +28,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
Expand Down Expand Up @@ -114,7 +114,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)
Expand Down Expand Up @@ -159,6 +159,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 $<IF:$<CONFIG:DEBUG>,${ManiVault_INSTALL_DIR}/debug,${ManiVault_INSTALL_DIR}/release>)
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">)
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>>)
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">>)
endif()
23 changes: 9 additions & 14 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(
Expand All @@ -135,9 +130,9 @@ def package(self):
"--install",
self.build_folder,
"--config",
"Debug",
"RelWithDebInfo",
"--prefix",
debug_dir,
relWithDebInfo_dir,
]
)
subprocess.run(
Expand All @@ -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"]