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
12 changes: 4 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,10 @@ on:
pull_request:
workflow_dispatch:

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release

# for matrix check https://docs.github.com/en/actions/reference/specifications-for-github-hosted-runners
jobs:
prepare_matrix:
runs-on: ubuntu-latest
runs-on: ubuntu-slim
outputs:
matrix: ${{ steps.matrix_setup.outputs.matrix }}
steps:
Expand All @@ -34,7 +30,7 @@ jobs:

steps:
- name: Checkout the source
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
submodules: recursive
ref: ${{ github.event.pull_request.head.ref }}
Expand All @@ -45,9 +41,9 @@ jobs:
sudo xcode-select -switch /Applications/Xcode_${{matrix.build-xcode-version}}.app

- name: Setup python version
uses: actions/setup-python@v5
uses: actions/setup-python@v7
with:
python-version: "3.11"
python-version: "3.12"

- name: Start ssh key agent
uses: webfactory/ssh-agent@v0.9.0
Expand Down
26 changes: 13 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,19 @@ PROJECT(${PROJECT}
# -----------------------------------------------------------------------------
# CMake Options
# -----------------------------------------------------------------------------
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOMOC ON)

if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
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()

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

find_package(ManiVault COMPONENTS Core PointData ClusterData ColorData ImageData CONFIG QUIET)
mv_project_defaults()

if(UNIX AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
find_package(TBB REQUIRED)
endif()

# -----------------------------------------------------------------------------
# Source files
Expand Down Expand Up @@ -116,9 +111,10 @@ target_include_directories(${PROJECT} PRIVATE "${ManiVault_INCLUDE_DIR}")
# -----------------------------------------------------------------------------
target_compile_features(${PROJECT} PRIVATE cxx_std_20)

if(MV_UNITY_BUILD)
set_target_properties(${PROJECT} PROPERTIES UNITY_BUILD ON)
endif()
set_target_properties(${PROJECT} PROPERTIES
AUTOMOC ON
UNITY_BUILD ${MV_UNITY_BUILD}
)

# -----------------------------------------------------------------------------
# Target library linking
Expand All @@ -134,6 +130,10 @@ target_link_libraries(${PROJECT} PRIVATE ManiVault::ClusterData)
target_link_libraries(${PROJECT} PRIVATE ManiVault::ImageData)
target_link_libraries(${PROJECT} PRIVATE ManiVault::ColorData)

if(UNIX AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_link_libraries(${PROJECT} PRIVATE TBB::tbb)
endif()

# -----------------------------------------------------------------------------
# Target installation
# -----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion PluginInfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name" : "Scatterplot View",
"version" : {
"plugin" : "1.0.0",
"core" : ["1.3"]
"core" : ["1.5"]
},
"type" : "View",
"dependencies" : ["Points"]
Expand Down
22 changes: 4 additions & 18 deletions conanfile.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from conans import ConanFile
from conan.tools.cmake import CMakeDeps, CMake, CMakeToolchain
from conans.tools import save, load
from conans.tools import os_info
from conans import tools
import os
import pathlib
Expand Down Expand Up @@ -72,8 +73,8 @@ def configure(self):
pass

def system_requirements(self):
# May be needed for macOS or Linux
pass
if os_info.is_linux:
self.run("sudo apt update && sudo apt install -y libtbb-dev")

def config_options(self):
if self.settings.os == "Windows":
Expand Down Expand Up @@ -105,7 +106,7 @@ def generate(self):
tc.variables["ManiVault_DIR"] = manivault_dir

# Set some build options
tc.variables["MV_UNITY_BUILD"] = "ON"
tc.cache_variables["MV_UNITY_BUILD"] = True

tc.generate()

Expand All @@ -120,7 +121,6 @@ def build(self):

cmake = self._configure_cmake()
cmake.build(build_type="RelWithDebInfo")
cmake.build(build_type="Release")

def package(self):
package_dir = pathlib.Path(self.build_folder, "package")
Expand All @@ -138,23 +138,9 @@ def package(self):
relWithDebInfo_dir,
]
)
subprocess.run(
[
"cmake",
"--install",
self.build_folder,
"--config",
"Release",
"--prefix",
release_dir,
]
)
self.copy(pattern="*", src=package_dir)

def package_info(self):
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"]
Loading
Loading