mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-30 16:10:44 +08:00
Package management configuration.
This commit is contained in:
parent
71abc449d9
commit
59e88302e1
@ -478,7 +478,7 @@ FILE(COPY "${NetCDF_SOURCE_DIR}/nc-config"
|
||||
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE)
|
||||
EXECUTE_PROCESS(COMMAND "chmod 755 ${NetCDF_BINARY_DIR}/nc-config")
|
||||
|
||||
INSTALL(PROGRAMS ${NetCDF_BINARY_DIR}/nc-config DESTINATION bin)
|
||||
INSTALL(PROGRAMS ${NetCDF_BINARY_DIR}/nc-config DESTINATION bin COMPONENT utilities)
|
||||
INCLUDE_DIRECTORIES(${NetCDF_BINARY_DIR})
|
||||
# End autotools-style checs for config.h
|
||||
|
||||
@ -566,10 +566,17 @@ ENDIF()
|
||||
# Moving on to CPack, install packages.
|
||||
#####
|
||||
INSTALL(FILES ${NetCDF_SOURCE_DIR}/include/netcdf.h
|
||||
DESTINATION include)
|
||||
DESTINATION include COMPONENT headers)
|
||||
|
||||
# Install the dependencies.
|
||||
IF(MSVC)
|
||||
INSTALL(DIRECTORY ${CMAKE_PREFIX_PATH} DESTINATION "deps" COMPONENT dependencies)
|
||||
|
||||
ENDIF()
|
||||
|
||||
|
||||
IF(ENABLE_DOXYGEN)
|
||||
INSTALL(DIRECTORY man4 DESTINATION ".")
|
||||
INSTALL(DIRECTORY man4 DESTINATION "." COMPONENT documentation)
|
||||
ENDIF()
|
||||
|
||||
# Subdirectory CMakeLists.txt files should specify their own
|
||||
@ -623,8 +630,24 @@ ADD_CUSTOM_TARGET(uninstall
|
||||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
|
||||
|
||||
|
||||
## Customize some of the package component descriptions
|
||||
set (CPACK_COMPONENT_UTILITIES_DISPLAY_NAME "netCDF Utilities")
|
||||
set (CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "netCDF Libraries")
|
||||
set (CPACK_COMPONENT_HEADERS_DISPLAY_NAME "netCDF Headers")
|
||||
set (CPACK_COMPONENT_DEPENDENCIES_DISPLAY_NAME "netCDF Dependencies")
|
||||
set (CPACK_COMPONENT_DOCUMENTATION_DISPLAY_NAME "netCDF Documentation")
|
||||
|
||||
|
||||
set (CPACK_COMPONENT_UTILITIES_DESCRIPTION
|
||||
"The netCDF Utilities")
|
||||
set (CPACK_COMPONENT_LIBRARIES_DESCRIPTION
|
||||
"The netCDF Libraries")
|
||||
set (CPACK_COMPONENT_HEADERS_DESCRIPTION
|
||||
"C header files for use with netCDF")
|
||||
set (CPACK_COMPONENT_DEPENDENCIES_DESCRIPTION
|
||||
"Dependencies for this build of netCDF")
|
||||
set (CPACK_COMPONENT_DOCUMENTATION_DESCRIPTION
|
||||
"The netCDF user documentation.")
|
||||
print_conf_summary()
|
||||
#MESSAGE(STATUS "CPACK_SOURCE_IGNORE_FILES: ${CPACK_SOURCE_IGNORE_FILES}")
|
||||
# CPack inclusion must come last.
|
||||
|
@ -62,7 +62,8 @@ IF(NOT MSVC)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
INSTALL(TARGETS netcdf DESTINATION lib)# EXPORT netcdf-targets)
|
||||
#INSTALL(EXPORT netcdf-targets DESTINATION ".")
|
||||
#include(CPack)
|
||||
INSTALL(TARGETS netcdf RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
COMPONENT libraries)
|
||||
SET(ALL_TLL_LIBS ${TLL_LIBS} PARENT_SCOPE)
|
||||
|
@ -33,7 +33,7 @@ add_library(netcdf3 OBJECT ${libsrc_SOURCES})
|
||||
set(man_MANS netcdf.3)
|
||||
|
||||
SET(MAN_FILES netcdf.3)
|
||||
INSTALL(FILES ${MAN_FILES} DESTINATION "share/man/man3")
|
||||
INSTALL(FILES ${MAN_FILES} DESTINATION "share/man/man3" COMPONENT documentation)
|
||||
|
||||
|
||||
set(ARGS_MANPAGE -DAPI=C)
|
||||
|
@ -128,10 +128,10 @@ IF(MSVC)
|
||||
ENDIF()
|
||||
|
||||
|
||||
INSTALL(TARGETS ncdump DESTINATION bin)
|
||||
INSTALL(TARGETS nccopy DESTINATION bin)
|
||||
INSTALL(TARGETS ncdump DESTINATION bin COMPONENT utilities)
|
||||
INSTALL(TARGETS nccopy DESTINATION bin COMPONENT utilities)
|
||||
SET(MAN_FILES nccopy.1 ncdump.1)
|
||||
INSTALL(FILES ${MAN_FILES} DESTINATION "share/man/man1")
|
||||
INSTALL(FILES ${MAN_FILES} DESTINATION "share/man/man1" COMPONENT documentation)
|
||||
|
||||
|
||||
SET(CLEANFILES test0.nc test1.cdl test1.nc test2.cdl ctest1.cdl ctest.c ctest64.c ctest0.nc ctest0_64.nc c1.cdl ctest1_64.cdl c0.nc small.nc small2.nc c0tmp.nc c1.ncml utf8.cdl utf8_64.cdl utf8.nc utf8_64.nc tmp.cdl tst_vlen_data.nc tst_utf8.nc tst_special_atts.nc tst_unicode.nc tst_solar_2.nc tst_string_data.nc tst_calendars.nc tst_nans.nc tst_opaque_data.nc tst_solar_cmp.nc tst_enum_data.nc tst_solar_1.nc tst_mslp_64.nc tst_mslp.nc tst_comp2.nc tst_ncml.nc tst_fillbug.nc tst_group_data.nc tst_small.nc tst_comp.nc tst_unicode.cdl tst_group_data.cdl tst_compounds2.cdl tst_comp.cdl tst_enum_data.cdl tst_small.cdl tst_times.cdl tst_solar_2.cdl tst_string_data.cdl tst_fillbug.cdl tst_opaque_data.cdl tst_compounds4.cdl tst_utf8.cdl tst_compounds3.cdl tst_special_atts.cdl tst_nans.cdl tst_format_att_64.cdl tst_vlen_data.cdl tst_solar_1.cdl tst_format_att.cdl tst_inflated.nc tmp_subset.cdl tst_inflated4.nc tst_deflated.nc tst_chunking.nc tmp*.nc tst_charfill.nc tmp_tst_charfill.cdl iter.* tst_nc_test_netcdf4_4_0.cdl)
|
||||
|
@ -11,7 +11,7 @@ ENDIF()
|
||||
ADD_EXECUTABLE(ncgen ${ncgen_FILES})
|
||||
TARGET_LINK_LIBRARIES(ncgen netcdf ${ALL_TLL_LIBS})
|
||||
|
||||
INSTALL(TARGETS ncgen DESTINATION bin)
|
||||
INSTALL(TARGETS ncgen DESTINATION bin COMPONENT utilities)
|
||||
|
||||
# Stuff to build if tests are enabled.
|
||||
IF(ENABLE_TESTS)
|
||||
@ -26,7 +26,8 @@ IF(ENABLE_TESTS)
|
||||
ENDIF()
|
||||
|
||||
SET(MAN_FILES ncgen.1)
|
||||
INSTALL(FILES ${MAN_FILES} DESTINATION "share/man/man1")
|
||||
INSTALL(FILES ${MAN_FILES} DESTINATION "share/man/man1"
|
||||
COMPONENT documentation)
|
||||
|
||||
SET(CLEANFILES c0.nc c0_64.nc c0_4.nc c0_4c.nc ref_camrun.c)
|
||||
SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${CLEANFILES}")
|
||||
|
@ -36,10 +36,10 @@ IF(ENABLE_TESTS)
|
||||
#ADD_TEST(ncgen3_${F} sh ${CMAKE_CURRENT_BINARY_DIR}/${F}.sh)
|
||||
ENDFOREACH()
|
||||
ENDIF()
|
||||
INSTALL(TARGETS ncgen3 DESTINATION bin)
|
||||
INSTALL(TARGETS ncgen3 DESTINATION bin COMPONENT utilities)
|
||||
|
||||
SET(MAN_FILES ncgen3.1)
|
||||
INSTALL(FILES ${MAN_FILES} DESTINATION "share/man/man1")
|
||||
INSTALL(FILES ${MAN_FILES} DESTINATION "share/man/man1" COMPONENT documentation)
|
||||
|
||||
SET(CLEANFILES c0.nc c0_64.nc c0_4.nc c0_4c.nc)
|
||||
SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${CLEANFILES}")
|
||||
|
Loading…
Reference in New Issue
Block a user