target_sources(Octopus_octopus PRIVATE
		casida.F90
		geom_opt.F90
		ground_state.F90
		invert_ks.F90
		main.F90
		phonons_fd.F90
		pulpo.F90
		run.F90
		run_multisystem.F90
		static_pol.F90
		system_factory.F90
		test.F90
		time_dependent.F90
		)

## Link targets
target_link_libraries(Octopus_octopus PRIVATE
		Octopus_base Octopus_lib fortran_cli)
set_target_properties(Octopus_octopus PROPERTIES
		LINKER_LANGUAGE Fortran)

if (TARGET ELPA::OpenMP)
	target_link_libraries(Octopus_octopus PRIVATE ELPA::OpenMP)
elseif (TARGET ELPA::elpa)
	target_link_libraries(Octopus_octopus PRIVATE ELPA::elpa)
endif ()
if (TARGET MKL::${MKL_SCALAPACK})
	target_link_libraries(Octopus_octopus PRIVATE MKL::${MKL_SCALAPACK})
elseif (TARGET SCALAPACK::scalapack)
	target_link_libraries(Octopus_octopus PRIVATE SCALAPACK::scalapack)
endif ()
if (TARGET MPI::MPI_Fortran)
	target_link_libraries(Octopus_octopus PUBLIC MPI::MPI_Fortran)
endif ()

if (OCTOPUS_INSTALL)
	install(TARGETS Octopus_octopus
			RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif ()
