Skip to content

Commit

Permalink
Updates to support Spack
Browse files Browse the repository at this point in the history
  • Loading branch information
mathomp4 committed Mar 10, 2022
1 parent 2ef4787 commit 59b42f7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -215,16 +215,14 @@ endforeach ()

set (lib fms_${precision})

esma_add_library (${lib} SRCS ${srcs} TYPE SHARED)
target_link_libraries (${lib} PUBLIC ${NETCDF_LIBRARIES} ${MPI_Fortran_LIBRARIES})
esma_add_library (${lib} SRCS ${srcs} DEPENDENCIES NetCDF::NetCDF_Fortran MPI::MPI_Fortran TYPE SHARED)

target_include_directories (${lib} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/mpp/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/fft>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/fms>
)
target_include_directories (${lib} PUBLIC ${INC_NETCDF})

file (COPY include/fms_platform.h DESTINATION ${include_${this}})
file (COPY include/file_version.h DESTINATION ${include_${this}})
Expand Down Expand Up @@ -271,4 +269,4 @@ endif ()




0 comments on commit 59b42f7

Please sign in to comment.