tmp update
This commit is contained in:
parent
4e82b432f6
commit
c637c3a919
@ -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")
|
@ -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})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user