diff --git a/bmi_heat/CMakeLists.txt b/bmi_heat/CMakeLists.txt index 8f86d3b..0e92921 100644 --- a/bmi_heat/CMakeLists.txt +++ b/bmi_heat/CMakeLists.txt @@ -1,12 +1,17 @@ # bmi-heat +set(extension_name bmiheatgeof) + # Create shared library, except on Windows. if(WIN32) add_library(${bmi_name} bmi_heat.f90) + add_library(${extension_name} bmi_heat_geo.f90) else() add_library(${bmi_name} SHARED bmi_heat.f90) + add_library(${extension_name} SHARED bmi_heat_geo.f90) endif() target_link_libraries(${bmi_name} ${model_name} ${bmif_lib}) +target_link_libraries(${extension_name} ${bmi_name}) add_executable(run_${bmi_name} bmi_main.f90) target_link_libraries(run_${bmi_name} ${bmi_name}) @@ -16,12 +21,14 @@ install( RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) install( - TARGETS ${bmi_name} + TARGETS ${bmi_name} ${extension_name} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) install( - FILES ${CMAKE_Fortran_MODULE_DIRECTORY}/${bmi_name}.mod + FILES + ${CMAKE_Fortran_MODULE_DIRECTORY}/${bmi_name}.mod + ${CMAKE_Fortran_MODULE_DIRECTORY}/${extension_name}.mod DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} )