X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=CMakeLists.txt;h=21ea46ad696f2657d9f88a5a8653afab9527bd96;hb=refs%2Fchanges%2F31%2F131%2F1;hp=c34f17a77b1807bd90a89ff8c2988376e26536eb;hpb=68c5cf1104e89f5c43786a3e48f5c6a1e757f59f;p=ric-plt%2Flib%2Frmr.git diff --git a/CMakeLists.txt b/CMakeLists.txt index c34f17a..21ea46a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,10 +21,9 @@ project( rmr LANGUAGES C ) cmake_minimum_required( VERSION 3.5 ) - -set( major_version "0" ) # automatically populated from git tag later +set( major_version "1" ) # should be automatically populated from git tag later, but until CI process sets a tag we use this set( minor_version "0" ) -set( patch_level "0" ) +set( patch_level "21" ) set( install_root "${CMAKE_INSTALL_PREFIX}" ) set( install_lib "lib" ) @@ -39,8 +38,11 @@ endif() # locations on all platforms. include( GNUInstallDirs ) -if( NOT BUILD_LIB ) - set( BUILD_LIB lib ) +# nano/nng install using LIBDIR as established by the gnu include; it varies from system +# to system, and we don't trust that it is always set, so we default to lib. +# +if( NOT CMAKE_INSTALL_LIBDIR ) + set( CMAKE_INSTALL_LIBDIR "lib" ) endif() # ---------------- extract some things from git ------------------------------ @@ -66,10 +68,11 @@ execute_process( OUTPUT_VARIABLE spoiled_str ) -set( mmp_version ${mmp_version_str} ) -list( GET mmp_version 0 major_version ) -list( GET mmp_version 1 minor_version ) -list( GET mmp_version 2 patch_level ) +# uncomment these lines once CI starts adding a tag on merge +#set( mmp_version ${mmp_version_str} ) +#list( GET mmp_version 0 major_version ) +#list( GET mmp_version 1 minor_version ) +#list( GET mmp_version 2 patch_level ) message( "+++ building ${major_version}.${minor_version}.${patch_level}${spoiled_str}" ) @@ -248,12 +251,12 @@ install( TARGETS rmr_nng_shared;rmr_nng_static;rmr_shared;rmr_static EXPORT Libr if( need_ext ) message( "including nano and nng libraries in the deb" ) install( FILES - ${CMAKE_CURRENT_BINARY_DIR}/${BUILD_LIB}/libnanomsg${nano_so_suffix} - ${CMAKE_CURRENT_BINARY_DIR}/${BUILD_LIB}/libnanomsg${nano_so_suffix_m} - ${CMAKE_CURRENT_BINARY_DIR}/${BUILD_LIB}/libnanomsg${nano_so_suffix_mm} - ${CMAKE_CURRENT_BINARY_DIR}/${BUILD_LIB}/libnng${nng_so_suffix} - ${CMAKE_CURRENT_BINARY_DIR}/${BUILD_LIB}/libnng${nng_so_suffix_m} - ${CMAKE_CURRENT_BINARY_DIR}/${BUILD_LIB}/libnng${nng_so_suffix_mm} + ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libnanomsg${nano_so_suffix} + ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libnanomsg${nano_so_suffix_m} + ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libnanomsg${nano_so_suffix_mm} + ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libnng${nng_so_suffix} + ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libnng${nng_so_suffix_m} + ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}/libnng${nng_so_suffix_mm} DESTINATION ${install_lib} )