Skip to content

Commit

Permalink
fix install of fortran module files (TEOS-10#4)
Browse files Browse the repository at this point in the history
Change-Id: Ie9ab863fa44220e65c36eb4bc10472b52137685e
  • Loading branch information
aerorahul committed Aug 26, 2019
1 parent 14b3632 commit 8d86e3c
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ ecbuild_requires_macro_version( 2.7 )
# Project
################################################################################

set( INSTALL_INCLUDE_DIR "include" )
ecbuild_declare_project()

ecbuild_enable_fortran( REQUIRED )
ecbuild_enable_fortran(
MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/${INSTALL_INCLUDE_DIR}/gsw
REQUIRED )

################################################################################
# Dependencies
Expand All @@ -36,7 +39,7 @@ ecbuild_enable_fortran( REQUIRED )

list( APPEND GSW_TPLS )

set( GSW_INCLUDE_DIRS ${CMAKE_Fortran_MODULE_DIRECTORY})
set( GSW_INCLUDE_DIRS ${CMAKE_Fortran_MODULE_DIRECTORY} )
set( GSW_LIBRARIES gsw )

get_directory_property( GSW_DEFINITIONS COMPILE_DEFINITIONS )
Expand All @@ -62,8 +65,8 @@ add_subdirectory(toolbox)
add_subdirectory(test)

list ( APPEND gsw_src_files
${gsw_modules_files}
${gsw_toolbox_files}
${gsw_modules_files}
${gsw_toolbox_files}
)

################################################################################
Expand All @@ -76,7 +79,7 @@ ecbuild_add_library( TARGET gsw
)

if(ECBUILD_INSTALL_FORTRAN_MODULES)
install(DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/${CMAKE_CFG_INTDIR} DESTINATION ${INSTALL_INCLUDE_DIR} )
install(DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY} DESTINATION ${INSTALL_INCLUDE_DIR} )
endif()

################################################################################
Expand Down

0 comments on commit 8d86e3c

Please sign in to comment.