Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Updated cmake module for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Sep 20, 2023
1 parent 42edf8c commit 2446448
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ ENDIF ()
# Have the .mod files placed in the include folder
SET(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod)

# Add our local modules to the module path
# Add our local modules to the module ldpath
FILE(TO_CMAKE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules" LOCAL_MODULE_PATH)
LIST(APPEND CMAKE_MODULE_PATH ${LOCAL_MODULE_PATH})

Expand Down
7 changes: 6 additions & 1 deletion cmake/Modules/FindNETCDF.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ FIND_PATH(NETCDF_INCLUDE_DIR
)

IF (BUILD_SHARED_LIBS)
SET(NETCDFF "netcdff")
IF (CMAKE_SYSTEM_NAME STREQUAL "Windows")
SET(NETCDFF "netcdff.dll")
ELSE ()
SET(NETCDFF "netcdff")
ENDIF ()
ELSE ()
SET(NCPREFIX_DIR ${CMAKE_SOURCE_DIR} CACHE PATH "Location of provided NetCDF-C dependencies")
SET(H5PREFIX_DIR ${CMAKE_SOURCE_DIR} CACHE PATH "Location of provided HDF5 dependencies")
Expand Down Expand Up @@ -95,6 +99,7 @@ FIND_LIBRARY(NETCDF_FORTRAN_LIBRARY
ENV LD_LIBRARY_PATH
PATH_SUFFIXES
lib
bin
${CMAKE_LIBRARY_ARCHITECTURE}
REQUIRED
)
Expand Down

0 comments on commit 2446448

Please sign in to comment.