Skip to content

Commit

Permalink
Use CMAKE_INSTALL_Fortran_MODULES
Browse files Browse the repository at this point in the history
  • Loading branch information
opoplawski committed Jan 25, 2025
1 parent 39a2cb6 commit e2e09b8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion wgrib2/ftn_api/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ target_include_directories(wgrib2_ftn_api

target_link_libraries(wgrib2_ftn_api PUBLIC wgrib2_lib)

install(DIRECTORY ${module_dir} DESTINATION ${CMAKE_INSTALL_PREFIX})
if(NOT DEFINED CMAKE_INSTALL_Fortran_MODULES)
set(CMAKE_INSTALL_Fortran_MODULES ${CMAKE_INSTALL_INCLUDEDIR})
endif()

install(DIRECTORY ${module_dir}/ DESTINATION ${CMAKE_INSTALL_Fortran_MODULES})

install(
TARGETS wgrib2_ftn_api
Expand Down

0 comments on commit e2e09b8

Please sign in to comment.