Skip to content

Commit

Permalink
correct GLOBAL for FetchContent
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Feb 21, 2021
1 parent 1798628 commit ccf6231
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ target_include_directories(nc4fortran
target_link_libraries(nc4fortran PUBLIC NetCDF::NetCDF_Fortran)
set_target_properties(nc4fortran PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include)

add_library(nc4fortran::nc4fortran INTERFACE IMPORTED)
# GLOBAL needed for FetchContent use
add_library(nc4fortran::nc4fortran INTERFACE IMPORTED GLOBAL)
target_link_libraries(nc4fortran::nc4fortran INTERFACE nc4fortran)

install(FILES ${CMAKE_CURRENT_BINARY_DIR}/include/nc4fortran.mod
Expand Down

0 comments on commit ccf6231

Please sign in to comment.