tmp update

This commit is contained in:
张壹 2022-12-15 09:37:03 +08:00
parent 4e82b432f6
commit c637c3a919
2 changed files with 9 additions and 6 deletions

View File

@ -11,8 +11,5 @@ set(@PROJECT_NAME@_LIB netcdfcxx_legacy)
set(@PROJECT_NAME@_LIBRARY netcdfcxx_legacy)
set(@PROJECT_NAME@_FOUND 1)
set(@PROJECT_NAME@_OPENMP @LibLCG_OPENMP@)
set(@PROJECT_NAME@_EIGEN @LibLCG_EIGEN@)
# include target information
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")

View File

@ -26,10 +26,16 @@ set_target_properties(netcdfcxx_legacy PROPERTIES CLEAN_DIRECT_OUTPUT 1)
set_target_properties(netcdfcxx_legacy_static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
#
set_target_properties(netcdfcxx_legacy PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR})
#
set_target_properties(netcdfcxx_legacy PROPERTIES INSTALL_RPATH /usr/local/lib)
set_target_properties(netcdfcxx_legacy_static PROPERTIES INSTALL_RPATH /usr/local/lib)
find_library(NETCDF_LIBRARY netcdf ${netCDF_LIB_DIR})
target_link_libraries(netcdfcxx_legacy PUBLIC ${NETCDF_LIBRARY})
target_link_libraries(netcdfcxx_legacy_static ${NETCDF_LIBRARY})
#find_library(NETCDF_LIBRARY netcdf ${netCDF_LIB_DIR})
target_link_libraries(netcdfcxx_legacy PUBLIC ${netCDF_LIBRARIES})
target_link_libraries(netcdfcxx_legacy_static ${netCDF_LIBRARIES})
#
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
set(CONFIG_FILE_PATH lib/cmake/${PROJECT_NAME})