File tree Expand file tree Collapse file tree 5 files changed +17
-13
lines changed Expand file tree Collapse file tree 5 files changed +17
-13
lines changed Original file line number Diff line number Diff line change 22### Matplot++ ###
33#######################################################
44# Project information
5- cmake_minimum_required (VERSION 3.14 )
5+ cmake_minimum_required (VERSION 3.10 )
66project (matplotplusplus VERSION 1.0.1)
77set (CMAKE_CXX_STANDARD 17)
88
@@ -14,7 +14,9 @@ include(GNUInstallDirs)
1414list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} /cmake)
1515message ("CMAKE_MODULE_PATH=${CMAKE_MODULE_PATH} " )
1616option (CPM_USE_LOCAL_PACKAGES "Try `find_package` before downloading dependencies" ON )
17- include (cmake/CPM.cmake)
17+ if (NOT ${CMAKE_VERSION} VERSION_LESS "3.14.0" )
18+ include (cmake/CPM.cmake)
19+ endif ()
1820
1921# Check if this is a master project or a subdirectory of another project
2022if (${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_SOURCE_DIR} )
@@ -119,4 +121,4 @@ if (BUILD_INSTALLER AND BUILD_PACKAGE)
119121
120122 # Always include CPack at last
121123 include (CPack)
122- endif ()
124+ endif ()
Original file line number Diff line number Diff line change @@ -6,9 +6,9 @@ if(NOT ${MATPLOT_BUILT_SHARED})
66
77 list (APPEND CMAKE_MODULE_PATH ${MATPLOT_CONFIG_INSTALL_DIR} )
88 list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR} " )
9- find_dependency(Filesystem)
10- list (POP_BACK CMAKE_MODULE_PATH )
9+ find_dependency(Filesystem COMPONENTS Final Experimental )
10+ list (REMOVE_ITEM CMAKE_MODULE_PATH " ${CMAKE_CURRENT_LIST_DIR} " )
1111endif ()
1212
1313include ("${CMAKE_CURRENT_LIST_DIR} /Matplot++Targets.cmake" )
14- check_required_components(Matplot++)
14+ check_required_components(Matplot++)
Original file line number Diff line number Diff line change 1- find_package (Filesystem REQUIRED)
1+ find_package (Filesystem COMPONENTS Final Experimental REQUIRED)
22
33add_library (matplot
44 matplot.h
@@ -241,4 +241,4 @@ if (BUILD_INSTALLER)
241241 NAMESPACE Matplot++::
242242 DESTINATION ${CMAKE_INSTALL_LIBDIR} /cmake/Matplot++
243243 )
244- endif ()
244+ endif ()
Original file line number Diff line number Diff line change 11add_subdirectory (generate_examples)
2- add_subdirectory (backends)
2+ add_subdirectory (backends)
Original file line number Diff line number Diff line change 1- find_package (Filesystem REQUIRED)
2- add_executable (generate_examples main.cpp)
3- target_link_libraries (generate_examples std::filesystem)
4- target_compile_features (generate_examples PRIVATE cxx_std_17)
1+ find_package (Filesystem COMPONENTS Final Experimental REQUIRED)
2+ if (NOT CXX_FILESYSTEM_IS_EXPERIMENTAL)
3+ add_executable (generate_examples main.cpp)
4+ target_link_libraries (generate_examples std::filesystem)
5+ target_compile_features (generate_examples PRIVATE cxx_std_17)
6+ endif ()
You can’t perform that action at this time.
0 commit comments