Skip to content

Commit

Permalink
Allow using CMAKE_BUILD_TYPE and CMAKE_${CMAKE_BUILD_TYPE}_POSTFIX to…
Browse files Browse the repository at this point in the history
… add a postfix to pkgconfig files
  • Loading branch information
opoplawski committed Sep 22, 2023
1 parent 75cb8b4 commit fcfe656
Show file tree
Hide file tree
Showing 19 changed files with 56 additions and 20 deletions.
4 changes: 3 additions & 1 deletion AMD/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ set ( AMD_VERSION_MAJOR 3 )
set ( AMD_VERSION_MINOR 2 )
set ( AMD_VERSION_SUB 1 )

string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_UPPER)

message ( STATUS "Building AMD version: v"
${AMD_VERSION_MAJOR}.
${AMD_VERSION_MINOR}.
Expand Down Expand Up @@ -218,7 +220,7 @@ if ( NOT MSVC )
NEWLINE_STYLE LF )
install ( FILES
${CMAKE_CURRENT_BINARY_DIR}/AMD.pc
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig )
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig RENAME AMD${CMAKE_${CMAKE_BUILD_TYPE_UPPER}_POSTFIX}.pc )
endif ( )

#-------------------------------------------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion BTF/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ set ( BTF_VERSION_MAJOR 2 )
set ( BTF_VERSION_MINOR 2 )
set ( BTF_VERSION_SUB 1 )

string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_UPPER)

message ( STATUS "Building BTF version: v"
${BTF_VERSION_MAJOR}.
${BTF_VERSION_MINOR}.
Expand Down Expand Up @@ -201,7 +203,7 @@ if ( NOT MSVC )
NEWLINE_STYLE LF )
install ( FILES
${CMAKE_CURRENT_BINARY_DIR}/BTF.pc
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig )
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig RENAME BTF${CMAKE_${CMAKE_BUILD_TYPE_UPPER}_POSTFIX}.pc )
endif ( )

#-------------------------------------------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion CAMD/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ set ( CAMD_VERSION_MAJOR 3 )
set ( CAMD_VERSION_MINOR 2 )
set ( CAMD_VERSION_SUB 1 )

string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_UPPER)

message ( STATUS "Building CAMD version: v"
${CAMD_VERSION_MAJOR}.
${CAMD_VERSION_MINOR}.
Expand Down Expand Up @@ -203,7 +205,7 @@ if ( NOT MSVC )
NEWLINE_STYLE LF )
install ( FILES
${CMAKE_CURRENT_BINARY_DIR}/CAMD.pc
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig )
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig RENAME CAMD${CMAKE_${CMAKE_BUILD_TYPE_UPPER}_POSTFIX}.pc )
endif ( )

#-------------------------------------------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion CCOLAMD/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ set ( CCOLAMD_VERSION_MAJOR 3 )
set ( CCOLAMD_VERSION_MINOR 2 )
set ( CCOLAMD_VERSION_SUB 1 )

string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_UPPER)

message ( STATUS "Building CCOLAMD version: v"
${CCOLAMD_VERSION_MAJOR}.
${CCOLAMD_VERSION_MINOR}.
Expand Down Expand Up @@ -200,7 +202,7 @@ if ( NOT MSVC )
NEWLINE_STYLE LF )
install ( FILES
${CMAKE_CURRENT_BINARY_DIR}/CCOLAMD.pc
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig )
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig RENAME CCOLAMD${CMAKE_${CMAKE_BUILD_TYPE_UPPER}_POSTFIX}.pc )
endif ( )

#-------------------------------------------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion CHOLMOD/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ set ( CHOLMOD_VERSION_MAJOR 4 )
set ( CHOLMOD_VERSION_MINOR 2 )
set ( CHOLMOD_VERSION_SUB 1 )

string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_UPPER)

message ( STATUS "Building CHOLMOD version: v"
${CHOLMOD_VERSION_MAJOR}.
${CHOLMOD_VERSION_MINOR}.
Expand Down Expand Up @@ -609,7 +611,7 @@ if ( NOT MSVC )
NEWLINE_STYLE LF )
install ( FILES
${CMAKE_CURRENT_BINARY_DIR}/CHOLMOD.pc
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig )
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig RENAME CHOLMOD${CMAKE_${CMAKE_BUILD_TYPE_UPPER}_POSTFIX}.pc )
endif ( )

#-------------------------------------------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion COLAMD/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ set ( COLAMD_VERSION_MAJOR 3 )
set ( COLAMD_VERSION_MINOR 2 )
set ( COLAMD_VERSION_SUB 1 )

string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_UPPER)

message ( STATUS "Building COLAMD version: v"
${COLAMD_VERSION_MAJOR}.
${COLAMD_VERSION_MINOR}.
Expand Down Expand Up @@ -200,7 +202,7 @@ if ( NOT MSVC )
NEWLINE_STYLE LF )
install ( FILES
${CMAKE_CURRENT_BINARY_DIR}/COLAMD.pc
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig )
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig RENAME COLAMD${CMAKE_${CMAKE_BUILD_TYPE_UPPER}_POSTFIX}.pc )
endif ( )

#-------------------------------------------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion CSparse/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ set ( CSPARSE_VERSION_MAJOR 4 )
set ( CSPARSE_VERSION_MINOR 2 )
set ( CSPARSE_VERSION_SUB 0 )

string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_UPPER)

message ( STATUS "Building CSparse version: v"
${CSPARSE_VERSION_MAJOR}.
${CSPARSE_VERSION_MINOR}.
Expand Down Expand Up @@ -152,7 +154,7 @@ if ( NOT MSVC )
NEWLINE_STYLE LF )
# install ( FILES
# ${CMAKE_CURRENT_BINARY_DIR}/CSparse.pc
# DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
# DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig RENAME CSparse${CMAKE_${CMAKE_BUILD_TYPE_UPPER}_POSTFIX}.pc )
endif ( )

#-------------------------------------------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion CXSparse/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ set ( CXSPARSE_VERSION_MAJOR 4 )
set ( CXSPARSE_VERSION_MINOR 2 )
set ( CXSPARSE_VERSION_SUB 1 )

string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_UPPER)

message ( STATUS "Building CXSparse version: v"
${CXSPARSE_VERSION_MAJOR}.
${CXSPARSE_VERSION_MINOR}.
Expand Down Expand Up @@ -233,7 +235,7 @@ if ( NOT MSVC )
NEWLINE_STYLE LF )
install ( FILES
${CMAKE_CURRENT_BINARY_DIR}/CXSparse.pc
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig )
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig RENAME CXSparse${CMAKE_${CMAKE_BUILD_TYPE_UPPER}_POSTFIX}.pc )
endif ( )

#-------------------------------------------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion GPUQREngine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ set ( GPUQRENGINE_VERSION_MAJOR 3 )
set ( GPUQRENGINE_VERSION_MINOR 2 )
set ( GPUQRENGINE_VERSION_SUB 1 )

string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_UPPER)

message ( STATUS "Building GPUQRENGINE version: v"
${GPUQRENGINE_VERSION_MAJOR}.
${GPUQRENGINE_VERSION_MINOR}.
Expand Down Expand Up @@ -289,7 +291,7 @@ if ( NOT MSVC )
NEWLINE_STYLE LF )
install ( FILES
${CMAKE_CURRENT_BINARY_DIR}/GPUQREngine.pc
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig )
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig RENAME GPUQREngine${CMAKE_${CMAKE_BUILD_TYPE_UPPER}_POSTFIX}.pc )
endif ( )

#-------------------------------------------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion GraphBLAS/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ set ( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}

include ( GraphBLAS_version )

string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_UPPER)

#-------------------------------------------------------------------------------
# SuiteSparse policies
#-------------------------------------------------------------------------------
Expand Down Expand Up @@ -557,7 +559,7 @@ if ( NOT MSVC )
NEWLINE_STYLE LF )
install ( FILES
${CMAKE_CURRENT_BINARY_DIR}/GraphBLAS.pc
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig )
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig RENAME GraphBLAS${CMAKE_${CMAKE_BUILD_TYPE_UPPER}_POSTFIX}.pc )
endif ( )

#-------------------------------------------------------------------------------
Expand Down
6 changes: 4 additions & 2 deletions KLU/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ set ( KLU_VERSION_MAJOR 2 )
set ( KLU_VERSION_MINOR 2 )
set ( KLU_VERSION_SUB 1 )

string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_UPPER)

message ( STATUS "Building KLU version: v"
${KLU_VERSION_MAJOR}.
${KLU_VERSION_MINOR}.
Expand Down Expand Up @@ -385,7 +387,7 @@ if ( NOT MSVC )
NEWLINE_STYLE LF )
install ( FILES
${CMAKE_CURRENT_BINARY_DIR}/KLU.pc
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig )
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig RENAME KLU${CMAKE_${CMAKE_BUILD_TYPE_UPPER}_POSTFIX}.pc )
endif ( )

#-------------------------------------------------------------------------------
Expand Down Expand Up @@ -455,7 +457,7 @@ if ( NOT NCHOLMOD )
NEWLINE_STYLE LF )
install ( FILES
${CMAKE_CURRENT_BINARY_DIR}/KLU_CHOLMOD.pc
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig )
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig RENAME KLU_CHOLMOD${CMAKE_${CMAKE_BUILD_TYPE_UPPER}_POSTFIX}.pc )
endif ( )
endif ( )

Expand Down
4 changes: 3 additions & 1 deletion LDL/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ set ( LDL_VERSION_MAJOR 3 )
set ( LDL_VERSION_MINOR 2 )
set ( LDL_VERSION_SUB 1 )

string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_UPPER)

message ( STATUS "Building LDL version: v"
${LDL_VERSION_MAJOR}.
${LDL_VERSION_MINOR}.
Expand Down Expand Up @@ -216,7 +218,7 @@ if ( NOT MSVC )
NEWLINE_STYLE LF )
install ( FILES
${CMAKE_CURRENT_BINARY_DIR}/LDL.pc
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig )
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig RENAME LDL${CMAKE_${CMAKE_BUILD_TYPE_UPPER}_POSTFIX}.pc )
endif ( )

#-------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion Mongoose/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ if ( NOT MSVC )
NEWLINE_STYLE LF )
install ( FILES
${CMAKE_CURRENT_BINARY_DIR}/Mongoose.pc
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig )
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig RENAME Mongoose${CMAKE_${CMAKE_BUILD_TYPE_UPPER}_POSTFIX}.pc )
endif ( )

#-------------------------------------------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion RBio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ set ( RBIO_VERSION_MAJOR 4 )
set ( RBIO_VERSION_MINOR 2 )
set ( RBIO_VERSION_SUB 1 )

string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_UPPER)

message ( STATUS "Building RBIO version: v"
${RBIO_VERSION_MAJOR}.
${RBIO_VERSION_MINOR}.
Expand Down Expand Up @@ -201,7 +203,7 @@ if ( NOT MSVC )
NEWLINE_STYLE LF )
install ( FILES
${CMAKE_CURRENT_BINARY_DIR}/RBio.pc
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig )
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig RENAME RBio${CMAKE_${CMAKE_BUILD_TYPE_UPPER}_POSTFIX}.pc )
endif ( )

#-------------------------------------------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion SPEX/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ set ( SPEX_VERSION_MAJOR 2 )
set ( SPEX_VERSION_MINOR 2 )
set ( SPEX_VERSION_SUB 1 )

string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_UPPER)

message ( STATUS "Building SPEX version: v"
${SPEX_VERSION_MAJOR}.
${SPEX_VERSION_MINOR}.
Expand Down Expand Up @@ -285,7 +287,7 @@ if ( NOT MSVC )
NEWLINE_STYLE LF )
install ( FILES
${CMAKE_CURRENT_BINARY_DIR}/SPEX.pc
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig )
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig RENAME SPEX${CMAKE_${CMAKE_BUILD_TYPE_UPPER}_POSTFIX}.pc )
endif ( )

#-------------------------------------------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion SPQR/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ set ( SPQR_VERSION_MAJOR 4 )
set ( SPQR_VERSION_MINOR 2 )
set ( SPQR_VERSION_SUB 1 )

string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_UPPER)

message ( STATUS "Building SPQR version: v"
${SPQR_VERSION_MAJOR}.
${SPQR_VERSION_MINOR}.
Expand Down Expand Up @@ -392,7 +394,7 @@ if ( NOT MSVC )
NEWLINE_STYLE LF )
install ( FILES
${CMAKE_CURRENT_BINARY_DIR}/SPQR.pc
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig )
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig RENAME SPQR${CMAKE_${CMAKE_BUILD_TYPE_UPPER}_POSTFIX}.pc )
endif ( )

#-------------------------------------------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion SuiteSparse_GPURuntime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ set ( SUITESPARSE_GPURUNTIME_VERSION_MAJOR 3 )
set ( SUITESPARSE_GPURUNTIME_VERSION_MINOR 2 )
set ( SUITESPARSE_GPURUNTIME_VERSION_SUB 1 )

string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_UPPER)

message ( STATUS "Building SUITESPARSE_GPURUNTIME version: v"
${SUITESPARSE_GPURUNTIME_VERSION_MAJOR}.
${SUITESPARSE_GPURUNTIME_VERSION_MINOR}.
Expand Down Expand Up @@ -218,7 +220,7 @@ if ( NOT MSVC )
NEWLINE_STYLE LF )
install ( FILES
${CMAKE_CURRENT_BINARY_DIR}/SuiteSparse_GPURuntime.pc
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig )
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig RENAME SuiteSparse_GPURuntime${CMAKE_${CMAKE_BUILD_TYPE_UPPER}_POSTFIX}.pc )
endif ( )

#-------------------------------------------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion SuiteSparse_config/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ set ( SUITESPARSE_VERSION_MAJOR 7 )
set ( SUITESPARSE_VERSION_MINOR 2 )
set ( SUITESPARSE_VERSION_SUB 1 )

string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_UPPER)

message ( STATUS "Building SuiteSparse_config version: v"
${SUITESPARSE_VERSION_MAJOR}.
${SUITESPARSE_VERSION_MINOR}.
Expand Down Expand Up @@ -229,7 +231,7 @@ if ( NOT MSVC )
NEWLINE_STYLE LF )
install ( FILES
${CMAKE_CURRENT_BINARY_DIR}/SuiteSparse_config.pc
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig )
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig RENAME SuiteSparse_config${CMAKE_${CMAKE_BUILD_TYPE_UPPER}_POSTFIX}.pc )
endif ( )

#-------------------------------------------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion UMFPACK/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ set ( UMFPACK_VERSION_MAJOR 6 )
set ( UMFPACK_VERSION_MINOR 2 )
set ( UMFPACK_VERSION_SUB 1 )

string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_UPPER)

message ( STATUS "Building UMFPACK version: v"
${UMFPACK_VERSION_MAJOR}.
${UMFPACK_VERSION_MINOR}.
Expand Down Expand Up @@ -354,7 +356,7 @@ if ( NOT MSVC )
NEWLINE_STYLE LF )
install ( FILES
${CMAKE_CURRENT_BINARY_DIR}/UMFPACK.pc
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig )
DESTINATION ${SUITESPARSE_LIBDIR}/pkgconfig RENAME UMFPACK${CMAKE_${CMAKE_BUILD_TYPE_UPPER}_POSTFIX}.pc )
endif ( )

#-------------------------------------------------------------------------------
Expand Down

0 comments on commit fcfe656

Please sign in to comment.