1- # Get helper macros and functions
2- include ("${PROJECT_SOURCE_DIR} /cmake/helper.cmake" )
3-
41# Include Dependencies
5- add_subdirectory (fplot )
62add_subdirectory (fortran_csv_module )
3+ include (FetchContent )
4+ FetchContent_Declare (
5+ fplot
6+ GIT_REPOSITORY "https://github.com/jchristopherson/fplot"
7+ )
8+ FetchContent_MakeAvailable (fplot)
9+ set (fplot_LIBRARY fplot)
710
811# Full Factorial Example
912add_executable (full_factorial_example full_factorial_example.f90 )
@@ -30,56 +33,46 @@ configure_file(
3033add_executable (allan_example allan_example.f90 )
3134target_link_libraries (allan_example fstats )
3235target_link_libraries (allan_example ${fplot_LIBRARY} )
33- target_include_directories (allan_example PUBLIC ${fplot_INCLUDE_DIR} )
3436target_link_libraries (allan_example ${fortran-csv-module_LIBRARY} )
3537target_include_directories (allan_example PUBLIC ${fortran-csv-module_INCLUDE_DIR} )
3638
3739# Box-Muller Example
3840add_executable (box_muller_example box_muller_example.f90 )
3941target_link_libraries (box_muller_example fstats ${fplot_LIBRARY} )
40- target_include_directories (box_muller_example PUBLIC ${fplot_INCLUDE_DIR} )
4142
4243# Rejection Sampling Example
4344add_executable (rejection_sample_example rejection_sample_example.f90 )
4445target_link_libraries (rejection_sample_example fstats ${fplot_LIBRARY} )
45- target_include_directories (rejection_sample_example PUBLIC ${fplot_INCLUDE_DIR} )
4646
4747# LOWESS Example
4848add_executable (lowess_example lowess_example.f90 )
4949target_link_libraries (lowess_example fstats ${fplot_LIBRARY} )
50- target_include_directories (lowess_example PUBLIC ${fplot_INCLUDE_DIR} )
5150
5251# Bootstrap Example
5352add_executable (bootstrap_example bootstrap_example.f90 )
5453target_link_libraries (bootstrap_example fstats ${fplot_LIBRARY} )
55- target_include_directories (bootstrap_example PUBLIC ${fplot_INCLUDE_DIR} )
5654
5755# MCMC Regression Example
5856add_executable (mcmc_regression_example mcmc_regression_example.f90 )
5957target_link_libraries (mcmc_regression_example fstats )
6058target_link_libraries (mcmc_regression_example ${fplot_LIBRARY} )
61- target_include_directories (mcmc_regression_example PUBLIC ${fplot_INCLUDE_DIR} )
6259
6360# MCMC Regression Example 2
6461add_executable (mcmc_regression_example_2 mcmc_regression_example_2.f90 )
6562target_link_libraries (mcmc_regression_example_2 fstats )
6663target_link_libraries (mcmc_regression_example_2 ${fplot_LIBRARY} )
67- target_include_directories (mcmc_regression_example_2 PUBLIC ${fplot_INCLUDE_DIR} )
6864
6965# MCMC Regression Example 3
7066add_executable (mcmc_regression_example_3 mcmc_regression_example_3.f90 )
7167target_link_libraries (mcmc_regression_example_3 fstats )
7268target_link_libraries (mcmc_regression_example_3 ${fplot_LIBRARY} )
73- target_include_directories (mcmc_regression_example_3 PUBLIC ${fplot_INCLUDE_DIR} )
7469
7570# Distribution Example
7671add_executable (distribution_example distribution_example.f90 )
7772target_link_libraries (distribution_example fstats )
7873target_link_libraries (distribution_example ${fplot_LIBRARY} )
79- target_include_directories (distribution_example PUBLIC ${fplot_INCLUDE_DIR} )
8074
8175# Interpolation Example
8276add_executable (interpolation_example interpolation_example.f90 )
8377target_link_libraries (interpolation_example fstats )
8478target_link_libraries (interpolation_example ${fplot_LIBRARY} )
85- target_include_directories (interpolation_example PUBLIC ${fplot_INCLUDE_DIR} )
0 commit comments