File tree Expand file tree Collapse file tree 10 files changed +55
-0
lines changed
Expand file tree Collapse file tree 10 files changed +55
-0
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ set_if_not_defined(NIFTI_INSTALL_RUNTIME_DIR bin)
7272set_if_not_defined(NIFTI_INSTALL_LIBRARY_DIR lib)
7373set_if_not_defined(NIFTI_INSTALL_ARCHIVE_DIR ${NIFTI_INSTALL_LIBRARY_DIR} )
7474set_if_not_defined(NIFTI_INSTALL_INCLUDE_DIR include /nifti)
75+ set_if_not_defined(NIFTI_INSTALL_PKGCONFIG_DIR ${NIFTI_INSTALL_LIBRARY_DIR} /pkgconfig)
7576set_if_not_defined(NIFTI_INSTALL_MAN_DIR share/man/man1)
7677set_if_not_defined(NIFTI_INSTALL_DOC_DIR share/doc /${PROJECT_NAME} )
7778set_if_not_defined(NIFTI_ZLIB_LIBRARIES "" )
Original file line number Diff line number Diff line change @@ -134,6 +134,8 @@ function(install_nifti_target target_name)
134134 PUBLIC_HEADER DESTINATION ${NIFTI_INSTALL_INCLUDE_DIR}
135135 COMPONENT Development
136136 INCLUDES DESTINATION ${NIFTI_INSTALL_INCLUDE_DIR}
137+ COMPONENT Development
138+ PKG_CONFIG DESTINATION ${NIFTI_INSTALL_PKGCONFIG_DIR}
137139 )
138140endfunction ()
139141
Original file line number Diff line number Diff line change @@ -11,11 +11,13 @@ set_target_properties(
1111# Set library version when building shared libs.
1212if (BUILD_SHARED_LIBS )
1313 get_lib_version_vars("nifti2_io_version.h" NIFTI2_VERSION NIFTI2_MAJOR_VERSION)
14+ configure_file (nifti2.pc.in nifti2.pc @ONLY)
1415 set_target_properties (${NIFTI_NIFTILIB2_NAME}
1516 PROPERTIES
1617 ${NIFTI_LIBRARY_PROPERTIES}
1718 VERSION ${NIFTI2_VERSION}
1819 SOVERSION ${NIFTI2_MAJOR_VERSION}
20+ PKG_CONFIG nifti2.pc
1921 )
2022endif ()
2123install_nifti_target(${NIFTI_NIFTILIB2_NAME} )
Original file line number Diff line number Diff line change 1+ prefix=@CMAKE_INSTALL_PREFIX@
2+ exec_prefix="${prefix}"
3+ libdir="${prefix}/@NIFTI_INSTALL_LIBRARY_DIR@"
4+ includedir="${prefix}/@NIFTI_INSTALL_INCLUDE_DIR@"
5+
6+ Name: nifti2
7+ Description: Core i/o routines for reading and writing nifti-2 format files
8+ Version: @PROJECT_VERSION@
9+ Requires: znzlib
10+ Libs: -L${libdir} -lnifti2
11+ Cflags: -I${includedir}
Original file line number Diff line number Diff line change @@ -11,11 +11,13 @@ target_compile_options(${NIFTI_CDFLIB_NAME} PRIVATE "-D__COMPILE_UNUSED_FUNCTION
1111target_link_libraries (${NIFTI_CDFLIB_NAME} PUBLIC ${NIFTI_PACKAGE_PREFIX} niftiio)
1212get_lib_version_vars("nifticdf_version.h" NIFTICDF_VERSION NIFTICDF_MAJOR_VERSION)
1313if (BUILD_SHARED_LIBS )
14+ configure_file (nifticdf.pc.in nifticdf.pc @ONLY)
1415 set_target_properties (${NIFTI_CDFLIB_NAME}
1516 PROPERTIES
1617 ${NIFTI_LIBRARY_PROPERTIES}
1718 VERSION ${NIFTICDF_VERSION}
1819 SOVERSION ${NIFTICDF_MAJOR_VERSION}
20+ PKG_CONFIG nifticdf.pc
1921 )
2022endif ()
2123install_nifti_target(${NIFTI_CDFLIB_NAME} )
Original file line number Diff line number Diff line change 1+ prefix=@CMAKE_INSTALL_PREFIX@
2+ exec_prefix="${prefix}"
3+ libdir="${prefix}/@NIFTI_INSTALL_LIBRARY_DIR@"
4+ includedir="${prefix}/@NIFTI_INSTALL_INCLUDE_DIR@"
5+
6+ Name: nifticdf
7+ Description: Functions to compute cumulative distributions and their inverses
8+ Version: @PROJECT_VERSION@
9+ Libs: -L${libdir} -lnifticdf
10+ Cflags: -I${includedir}
Original file line number Diff line number Diff line change @@ -11,11 +11,13 @@ set_target_properties(
1111# Set library version when building shared libs.
1212if (BUILD_SHARED_LIBS )
1313 get_lib_version_vars("nifti1_io_version.h" NIFTI_VERSION NIFTI_MAJOR_VERSION)
14+ configure_file (niftiio.pc.in niftiio.pc @ONLY)
1415 set_target_properties (${NIFTI_NIFTILIB_NAME}
1516 PROPERTIES
1617 ${NIFTI_LIBRARY_PROPERTIES}
1718 VERSION ${NIFTI_VERSION}
1819 SOVERSION ${NIFTI_MAJOR_VERSION}
20+ PKG_CONFIG niftiio.pc
1921 )
2022endif ()
2123install_nifti_target(${NIFTI_NIFTILIB_NAME} )
Original file line number Diff line number Diff line change 1+ prefix=@CMAKE_INSTALL_PREFIX@
2+ exec_prefix="${prefix}"
3+ libdir="${prefix}/@NIFTI_INSTALL_LIBRARY_DIR@"
4+ includedir="${prefix}/@NIFTI_INSTALL_INCLUDE_DIR@"
5+
6+ Name: niftiio
7+ Description: Core i/o routines for reading and writing nifti-1 format files
8+ Version: @PROJECT_VERSION@
9+ Requires: znzlib
10+ Libs: -L${libdir} -lnitfiio
11+ Cflags: -I${includedir}
Original file line number Diff line number Diff line change @@ -11,11 +11,13 @@ target_compile_definitions(${NIFTI_ZNZLIB_NAME} PUBLIC ${ZNZ_COMPILE_DEF})
1111# Set library version if building shared libs.
1212if (BUILD_SHARED_LIBS )
1313 get_lib_version_vars("znzlib_version.h" ZNZLIB_VERSION ZNZLIB_MAJOR_VERSION)
14+ configure_file (znzlib.pc.in znzlib.pc @ONLY)
1415 set_target_properties (${NIFTI_ZNZLIB_NAME}
1516 PROPERTIES
1617 ${NIFTI_LIBRARY_PROPERTIES}
1718 VERSION ${ZNZLIB_VERSION}
1819 SOVERSION ${ZNZLIB_MAJOR_VERSION}
20+ PKG_CONFIG znzlib.pc
1921 )
2022endif ()
2123install_nifti_target(${NIFTI_ZNZLIB_NAME} )
Original file line number Diff line number Diff line change 1+ prefix=@CMAKE_INSTALL_PREFIX@
2+ exec_prefix="${prefix}"
3+ libdir="${prefix}/@NIFTI_INSTALL_LIBRARY_DIR@"
4+ includedir="${prefix}/@NIFTI_INSTALL_INCLUDE_DIR@"
5+ zlib_support=true
6+
7+ Name: znzlib
8+ Description: Low level library for handling read/write of compressed files
9+ Version: @PROJECT_VERSION@
10+ Requires: zlib
11+ Libs: -L${libdir} -lznz
12+ Cflags: -I${includedir}
You can’t perform that action at this time.
0 commit comments