mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-27 07:30:33 +08:00
Made build system to use conditional.
This commit is contained in:
parent
cdb0ae4baa
commit
6341067733
@ -102,14 +102,30 @@ SET_TARGET_PROPERTIES(netcdf PROPERTIES
|
||||
SOVERSION ${netCDF_SO_VERSION}
|
||||
)
|
||||
|
||||
INSTALL(
|
||||
TARGETS netcdf EXPORT netCDFTargets
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries
|
||||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
|
||||
)
|
||||
###
|
||||
# The INCLUDES directive was introduced in 2.8.12.
|
||||
# However, 2.8.11 is still the default on some
|
||||
# popular linux distributions. See
|
||||
# https://github.com/Unidata/netcdf-c/issues/135
|
||||
# for more information.
|
||||
###
|
||||
IF(${CMAKE_VERSION} LESS 2.8.12)
|
||||
INSTALL(
|
||||
TARGETS netcdf EXPORT netCDFTargets
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries
|
||||
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
)
|
||||
ELSE()
|
||||
INSTALL(
|
||||
TARGETS netcdf EXPORT netCDFTargets
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
SET(ALL_TLL_LIBS ${TLL_LIBS} PARENT_SCOPE)
|
||||
SET(NC_LIBS ${NC_LIBS} PARENT_SCOPE)
|
||||
|
Loading…
Reference in New Issue
Block a user