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 @@ -90,6 +90,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 @@ -105,6 +106,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}}
16 changes: 8 additions & 8 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)

# -----------------------------------------------------------------------------
# PointDataConversion Plugin
Expand All @@ -16,17 +16,17 @@ set(CMAKE_AUTOMOC ON)

if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /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_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)

# -----------------------------------------------------------------------------
# Dependencies
# -----------------------------------------------------------------------------
find_package(Qt6 COMPONENTS Widgets WebEngineWidgets REQUIRED)

find_package(ManiVault COMPONENTS Core PointData CONFIG)
find_package(ManiVault COMPONENTS Core PointData CONFIG QUIET)

# -----------------------------------------------------------------------------
# Source files
Expand All @@ -52,7 +52,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)

# -----------------------------------------------------------------------------
# Target library linking
Expand Down Expand Up @@ -89,6 +89,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()
27 changes: 11 additions & 16 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class PointDataConversionPluginConan(ConanFile):
"""Class to package the PointDataConversionPlugin using conan

Packages both RELEASE and DEBUG.
Packages both RELEASE and RELWITHDEBINFO.
Uses rules_support (github.com/ManiVaultStudio/rulessupport) to derive
versioninfo based on the branch naming convention
as described in https://github.com/ManiVaultStudio/core/wiki/Branch-naming-rules
Expand Down Expand Up @@ -90,13 +90,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 @@ -119,12 +114,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 @@ -133,9 +128,9 @@ def package(self):
"--install",
self.build_folder,
"--config",
"Debug",
"RelWithDebInfo",
"--prefix",
debug_dir,
relWithDebInfo_dir,
]
)
subprocess.run(
Expand All @@ -150,11 +145,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"]
self.cpp_info.release.includedirs = ["Release/include", "Release"]
Loading