fix(rtable): Prevent direct send hairpins
[ric-plt/lib/rmr.git] / CMakeLists.txt
index c34f17a..2d40e80 100644 (file)
 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 "30" )
 
 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}" )
 
@@ -165,9 +168,9 @@ set( CMAKE_POSITION_INDEPENDENT_CODE ON )
 set( CMAKE_CXX_FLAGS "-g -Wall " )
 
 # Include modules
-add_subdirectory( src/common )
-add_subdirectory( src/nanomsg )
-add_subdirectory( src/nng )
+add_subdirectory( src/rmr/common )
+add_subdirectory( src/rmr/nanomsg )
+add_subdirectory( src/rmr/nng )
 add_subdirectory( doc )                                # this will auto skip if {X}fm is not available
 
 
@@ -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}
        )