11# Include Dependencies
2- add_subdirectory (fplot )
32add_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)
410
511# Full Factorial Example
612add_executable (full_factorial_example full_factorial_example.f90 )
@@ -27,56 +33,46 @@ configure_file(
2733add_executable (allan_example allan_example.f90 )
2834target_link_libraries (allan_example fstats )
2935target_link_libraries (allan_example ${fplot_LIBRARY} )
30- target_include_directories (allan_example PUBLIC ${fplot_INCLUDE_DIR} )
3136target_link_libraries (allan_example ${fortran-csv-module_LIBRARY} )
3237target_include_directories (allan_example PUBLIC ${fortran-csv-module_INCLUDE_DIR} )
3338
3439# Box-Muller Example
3540add_executable (box_muller_example box_muller_example.f90 )
3641target_link_libraries (box_muller_example fstats ${fplot_LIBRARY} )
37- target_include_directories (box_muller_example PUBLIC ${fplot_INCLUDE_DIR} )
3842
3943# Rejection Sampling Example
4044add_executable (rejection_sample_example rejection_sample_example.f90 )
4145target_link_libraries (rejection_sample_example fstats ${fplot_LIBRARY} )
42- target_include_directories (rejection_sample_example PUBLIC ${fplot_INCLUDE_DIR} )
4346
4447# LOWESS Example
4548add_executable (lowess_example lowess_example.f90 )
4649target_link_libraries (lowess_example fstats ${fplot_LIBRARY} )
47- target_include_directories (lowess_example PUBLIC ${fplot_INCLUDE_DIR} )
4850
4951# Bootstrap Example
5052add_executable (bootstrap_example bootstrap_example.f90 )
5153target_link_libraries (bootstrap_example fstats ${fplot_LIBRARY} )
52- target_include_directories (bootstrap_example PUBLIC ${fplot_INCLUDE_DIR} )
5354
5455# MCMC Regression Example
5556add_executable (mcmc_regression_example mcmc_regression_example.f90 )
5657target_link_libraries (mcmc_regression_example fstats )
5758target_link_libraries (mcmc_regression_example ${fplot_LIBRARY} )
58- target_include_directories (mcmc_regression_example PUBLIC ${fplot_INCLUDE_DIR} )
5959
6060# MCMC Regression Example 2
6161add_executable (mcmc_regression_example_2 mcmc_regression_example_2.f90 )
6262target_link_libraries (mcmc_regression_example_2 fstats )
6363target_link_libraries (mcmc_regression_example_2 ${fplot_LIBRARY} )
64- target_include_directories (mcmc_regression_example_2 PUBLIC ${fplot_INCLUDE_DIR} )
6564
6665# MCMC Regression Example 3
6766add_executable (mcmc_regression_example_3 mcmc_regression_example_3.f90 )
6867target_link_libraries (mcmc_regression_example_3 fstats )
6968target_link_libraries (mcmc_regression_example_3 ${fplot_LIBRARY} )
70- target_include_directories (mcmc_regression_example_3 PUBLIC ${fplot_INCLUDE_DIR} )
7169
7270# Distribution Example
7371add_executable (distribution_example distribution_example.f90 )
7472target_link_libraries (distribution_example fstats )
7573target_link_libraries (distribution_example ${fplot_LIBRARY} )
76- target_include_directories (distribution_example PUBLIC ${fplot_INCLUDE_DIR} )
7774
7875# Interpolation Example
7976add_executable (interpolation_example interpolation_example.f90 )
8077target_link_libraries (interpolation_example fstats )
8178target_link_libraries (interpolation_example ${fplot_LIBRARY} )
82- target_include_directories (interpolation_example PUBLIC ${fplot_INCLUDE_DIR} )
0 commit comments