update build system

This commit is contained in:
张壹 2021-08-02 22:28:10 +08:00
parent 2a4f53240e
commit 7b0a67b36c

View File

@ -33,8 +33,8 @@ target_link_libraries(netcdfcxx_legacy_static ${NETCDF_LIBRARY})
install(TARGETS netcdfcxx_legacy DESTINATION lib)
install(TARGETS netcdfcxx_legacy_static DESTINATION lib)
#
install(FILES lib/netcdfcpp.h DESTINATION include)
install(FILES lib/ncvalues.h DESTINATION include)
install(FILES lib/netcdfcpp.h DESTINATION include/netcdfcxx_legacy)
install(FILES lib/ncvalues.h DESTINATION include/netcdfcxx_legacy)
#
#
@ -45,7 +45,7 @@ macro(add_sample name)
#
add_executable(${name} example/${name}.cpp)
# Windows
set_target_properties(${name} PROPERTIES INSTALL_RPATH /opt/lib)
set_target_properties(${name} PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
#
target_link_libraries(${name} PUBLIC netcdfcxx_legacy)
endmacro()