CPM for fetch_content
This commit is contained in:
parent
54c84ab18d
commit
604d9363dd
@ -1,9 +1,11 @@
|
||||
project(CGDI-c++)
|
||||
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.13)
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.14)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
|
||||
|
||||
|
1269
cmake/CPM.cmake
Normal file
1269
cmake/CPM.cmake
Normal file
File diff suppressed because it is too large
Load Diff
@ -2,13 +2,10 @@ if (TARGET geometry-central)
|
||||
return()
|
||||
endif()
|
||||
|
||||
include(FetchContent)
|
||||
include(CPM)
|
||||
|
||||
message(STATUS "Fetching geometry-central")
|
||||
|
||||
FetchContent_Declare(
|
||||
geometry-central
|
||||
GIT_REPOSITORY https://github.com/nmwsharp/geometry-central.git
|
||||
GIT_SHALLOW TRUE
|
||||
)
|
||||
FetchContent_MakeAvailable(geometry-central)
|
||||
CPMAddPackage(
|
||||
NAME geometry-central
|
||||
GIT_TAG 70c859ec3b58fe597c0063673a74082654e9c5aa
|
||||
GITHUB_REPOSITORY "nmwsharp/geometry-central"
|
||||
)
|
||||
|
@ -2,14 +2,15 @@ if (TARGET polyscope)
|
||||
return()
|
||||
endif()
|
||||
|
||||
include(FetchContent)
|
||||
include(CPM)
|
||||
|
||||
message(STATUS "Fetching polyscope")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG_OLD "${CMAKE_CXX_FLAGS_DEBUG}")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-w")
|
||||
|
||||
FetchContent_Declare(
|
||||
polyscope
|
||||
GIT_REPOSITORY https://github.com/nmwsharp/polyscope.git
|
||||
GIT_TAG v1.2.0
|
||||
GIT_SHALLOW TRUE
|
||||
)
|
||||
FetchContent_MakeAvailable(polyscope)
|
||||
CPMAddPackage(
|
||||
NAME polyscope
|
||||
VERSION 2.3.0
|
||||
GITHUB_REPOSITORY "nmwsharp/polyscope"
|
||||
)
|
||||
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG_OLD}")
|
||||
|
@ -12,10 +12,10 @@ int main(int argc, char **argv)
|
||||
//Some data
|
||||
std::vector<std::array<double, 3>> pts={{0,0,0}, {0,0,1}, {0,1,0}, {1,0,0}, {1,1,0},{0,1,1},{1,0,1},{1,1,1}};
|
||||
std::vector<double> values = {0.3, 3.4, 0.2, 0.4, 1.2, 4.0,3.6,5.0};
|
||||
|
||||
|
||||
auto pcl = polyscope::registerPointCloud("My Points", pts);
|
||||
pcl->addScalarQuantity("Some values", values);
|
||||
|
||||
|
||||
// Give control to the polyscope gui
|
||||
polyscope::show();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user