aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--emu-radio/lte-emulator/CMakeLists.txt73
-rw-r--r--emu-radio/wifi-emulator/CMakeLists.txt71
2 files changed, 79 insertions, 65 deletions
diff --git a/emu-radio/lte-emulator/CMakeLists.txt b/emu-radio/lte-emulator/CMakeLists.txt
index a265fff5..6b8113b0 100644
--- a/emu-radio/lte-emulator/CMakeLists.txt
+++ b/emu-radio/lte-emulator/CMakeLists.txt
@@ -39,51 +39,60 @@ add_executable(lte_emulator ${SOURCE_FILES} ${COMMON_FILES})
target_link_libraries(lte_emulator ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${Lte_Ns3_LIBRARIES})
install(TARGETS lte_emulator DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
+install(FILES ${PROJECT_SOURCE_DIR}/fading-traces/fading_trace_EPA_3kmph.fad DESTINATION share/lte-emulator)
+install(FILES ${PROJECT_SOURCE_DIR}/fading-traces/fading_trace_ETU_3kmph.fad DESTINATION share/lte-emulator)
+install(FILES ${PROJECT_SOURCE_DIR}/fading-traces/fading_trace_EVA_60kmph.fad DESTINATION share/lte-emulator)
+install(FILES ${PROJECT_SOURCE_DIR}/fading-traces/fading_trace_generator.m DESTINATION share/lte-emulator)
# Generate DEB / RPM packages
option(DEB_PACKAGE "Create deb package" OFF)
option(RPM_PACKAGE "Create deb package" OFF)
-SET(VENDOR "Cisco Systems" CACHE STRING "Vendor")
-SET(CONTACT "msardara@cisco.com" CACHE STRING "Contact")
-SET(DISTRIBUTION "xenial" CACHE STRING "Distribution")
-SET(ARCHITECTURE "amd64" CACHE STRING "Architecture")
-SET(PACKAGE_MAINTAINER "Mauro Sardara (msardara@cisco.com)" CACHE STRING "Maintainer")
-SET(BUILD_NUMBER "1" CACHE STRING "Build Number")
-SET(PACKAGE_NAME lte-emulator)
-SET(CPACK_PACKAGING_INSTALL_PREFIX "/usr")
-SET(CPACK_PACKAGE_VENDOR ${VENDOR})
-SET(CPACK_PACKAGE_CONTACT ${CONTACT})
+set(VENDOR "Cisco Systems" CACHE STRING "Vendor")
+set(CONTACT "msardara@cisco.com" CACHE STRING "Contact")
+set(DISTRIBUTION "xenial" CACHE STRING "Distribution")
+set(ARCHITECTURE "amd64" CACHE STRING "Architecture")
+set(PACKAGE_MAINTAINER "Mauro Sardara (msardara@cisco.com)" CACHE STRING "Maintainer")
+set(BUILD_NUMBER "1" CACHE STRING "Build Number")
+set(PACKAGE_NAME lte-emulator)
+set(CPACK_PACKAGING_INSTALL_PREFIX "/usr")
+set(CPACK_PACKAGE_VENDOR ${VENDOR})
+set(CPACK_PACKAGE_CONTACT ${CONTACT})
# Get the version
execute_process(COMMAND bash ${CMAKE_SOURCE_DIR}/scripts/version
OUTPUT_VARIABLE PACKAGE_VERSION)
-string(STRIP ${PACKAGE_VERSION} PACKAGE_VERSION)
+
+if (PACKAGE_VERSION)
+ string(STRIP ${PACKAGE_VERSION} PACKAGE_VERSION)
+else()
+ set(PACKAGE_VERSION 1.0)
+endif()
if(DEB_PACKAGE)
- SET(TYPE "DEBIAN")
- SET(GENERATOR "DEB")
- SET(CPACK_PACKAGE_FILE_NAME "${PACKAGE_NAME}_${PACKAGE_VERSION}_${ARCHITECTURE}")
- SET(CPACK_${TYPE}_PACKAGE_DEPENDS "libns3sx-3v5, ns3sx, libboost-system1.58.0")
+ set(TYPE "DEBIAN")
+ set(GENERATOR "DEB")
+ set(CPACK_PACKAGE_FILE_NAME "${PACKAGE_NAME}_${PACKAGE_VERSION}_${ARCHITECTURE}")
+ set(CPACK_${TYPE}_PACKAGE_DEPENDS "libns3sx-3v5, ns3sx, libboost-system1.58.0")
elseif(RPM_PACKAGE)
- SET(TYPE "RPM")
- SET(GENERATOR "RPM")
- SET(CPACK_PACKAGE_FILE_NAME "${PACKAGE_NAME}-${PACKAGE_VERSION}.${ARCHITECTURE}")
- SET(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr/etc" "/usr/lib/python2.7" "/usr/lib/python2.7/site-packages")
- SET(CPACK_${TYPE}_PACKAGE_REQUIRES "")
+ set(TYPE "RPM")
+ set(GENERATOR "RPM")
+ set(CPACK_PACKAGE_FILE_NAME "${PACKAGE_NAME}-${PACKAGE_VERSION}.${ARCHITECTURE}")
+ set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr/etc" "/usr/lib/python2.7" "/usr/lib/python2.7/site-packages")
+ set(CPACK_${TYPE}_PACKAGE_REQUIRES "")
else()
- RETURN()
+ return()
endif()
-SET(CPACK_GENERATOR ${GENERATOR})
-SET(CPACK_${TYPE}_PACKAGE_MAINTAINER ${PACKAGE_MAINTAINER})
-SET(CPACK_${TYPE}_PACKAGE_NAME ${PACKAGE_NAME})
-SET(CPACK_${TYPE}_PACKAGE_VERSION ${PACKAGE_VERSION})
-SET(CPACK_${TYPE}_PACKAGE_ARCHITECTURE ${ARCHITECTURE})
-SET(CPACK_${TYPE}_PACKAGE_RELEASE 1)
-SET(CPACK_${TYPE}_PACKAGE_VENDOR ${VENDOR})
-SET(CPACK_${TYPE}_PACKAGE_DESCRIPTION "LTE channel emulator.")
-SET(CPACK_${TYPE}_PACKAGE_HOMEPAGE "https://wiki.fd.io/view/Vicn")
-
-INCLUDE(CPack)
+set(CPACK_GENERATOR ${GENERATOR})
+set(CPACK_${TYPE}_PACKAGE_MAINTAINER ${PACKAGE_MAINTAINER})
+set(CPACK_${TYPE}_PACKAGE_NAME ${PACKAGE_NAME})
+set(CPACK_${TYPE}_PACKAGE_VERSION ${PACKAGE_VERSION})
+set(CPACK_${TYPE}_PACKAGE_ARCHITECTURE ${ARCHITECTURE})
+set(CPACK_${TYPE}_PACKAGE_RELEASE 1)
+set(CPACK_${TYPE}_PACKAGE_VENDOR ${VENDOR})
+set(CPACK_${TYPE}_PACKAGE_DESCRIPTION "LTE channel emulator.")
+set(CPACK_${TYPE}_PACKAGE_HOMEPAGE "https://wiki.fd.io/view/Vicn")
+
+include(CPack)
diff --git a/emu-radio/wifi-emulator/CMakeLists.txt b/emu-radio/wifi-emulator/CMakeLists.txt
index 558a751f..eb551fe2 100644
--- a/emu-radio/wifi-emulator/CMakeLists.txt
+++ b/emu-radio/wifi-emulator/CMakeLists.txt
@@ -38,46 +38,51 @@ install(TARGETS wifi_emulator DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
option(DEB_PACKAGE "Create deb package" OFF)
option(RPM_PACKAGE "Create deb package" OFF)
-SET(VENDOR "Cisco Systems" CACHE STRING "Vendor")
-SET(CONTACT "msardara@cisco.com" CACHE STRING "Contact")
-SET(DISTRIBUTION "xenial" CACHE STRING "Distribution")
-SET(ARCHITECTURE "amd64" CACHE STRING "Architecture")
-SET(PACKAGE_MAINTAINER "Mauro Sardara (msardara@cisco.com)" CACHE STRING "Maintainer")
-SET(BUILD_NUMBER "1" CACHE STRING "Build Number")
-SET(PACKAGE_NAME wifi-emulator)
-
-SET(CPACK_PACKAGING_INSTALL_PREFIX "/usr")
-SET(CPACK_PACKAGE_VENDOR ${VENDOR})
-SET(CPACK_PACKAGE_CONTACT ${CONTACT})
+set(VENDOR "Cisco Systems" CACHE STRING "Vendor")
+set(CONTACT "msardara@cisco.com" CACHE STRING "Contact")
+set(DISTRIBUTION "xenial" CACHE STRING "Distribution")
+set(ARCHITECTURE "amd64" CACHE STRING "Architecture")
+set(PACKAGE_MAINTAINER "Mauro Sardara (msardara@cisco.com)" CACHE STRING "Maintainer")
+set(BUILD_NUMBER "1" CACHE STRING "Build Number")
+set(PACKAGE_NAME wifi-emulator)
+
+set(CPACK_PACKAGING_INSTALL_PREFIX "/usr")
+set(CPACK_PACKAGE_VENDOR ${VENDOR})
+set(CPACK_PACKAGE_CONTACT ${CONTACT})
# Get the version
execute_process(COMMAND bash ${CMAKE_SOURCE_DIR}/scripts/version
OUTPUT_VARIABLE PACKAGE_VERSION)
-string(STRIP ${PACKAGE_VERSION} PACKAGE_VERSION)
+
+if (PACKAGE_VERSION)
+ string(STRIP ${PACKAGE_VERSION} PACKAGE_VERSION)
+else()
+ set(PACKAGE_VERSION 1.0)
+endif()
if(DEB_PACKAGE)
- SET(TYPE "DEBIAN")
- SET(GENERATOR "DEB")
- SET(CPACK_PACKAGE_FILE_NAME "${PACKAGE_NAME}_${PACKAGE_VERSION}_${ARCHITECTURE}")
- SET(CPACK_${TYPE}_PACKAGE_DEPENDS "libns3sx-3v5, ns3sx, libboost-system1.58.0")
+ set(TYPE "DEBIAN")
+ set(GENERATOR "DEB")
+ set(CPACK_PACKAGE_FILE_NAME "${PACKAGE_NAME}_${PACKAGE_VERSION}_${ARCHITECTURE}")
+ set(CPACK_${TYPE}_PACKAGE_DEPENDS "libns3sx-3v5, ns3sx, libboost-system1.58.0")
elseif(RPM_PACKAGE)
- SET(TYPE "RPM")
- SET(GENERATOR "RPM")
- SET(CPACK_PACKAGE_FILE_NAME "${PACKAGE_NAME}-${PACKAGE_VERSION}.${ARCHITECTURE}")
- SET(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr/etc" "/usr/lib/python2.7" "/usr/lib/python2.7/site-packages")
- SET(CPACK_${TYPE}_PACKAGE_REQUIRES "")
+ set(TYPE "RPM")
+ set(GENERATOR "RPM")
+ set(CPACK_PACKAGE_FILE_NAME "${PACKAGE_NAME}-${PACKAGE_VERSION}.${ARCHITECTURE}")
+ set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr/etc" "/usr/lib/python2.7" "/usr/lib/python2.7/site-packages")
+ set(CPACK_${TYPE}_PACKAGE_REQUIRES "")
else()
- RETURN()
+ return()
endif()
-SET(CPACK_GENERATOR ${GENERATOR})
-SET(CPACK_${TYPE}_PACKAGE_MAINTAINER ${PACKAGE_MAINTAINER})
-SET(CPACK_${TYPE}_PACKAGE_NAME ${PACKAGE_NAME})
-SET(CPACK_${TYPE}_PACKAGE_VERSION ${PACKAGE_VERSION})
-SET(CPACK_${TYPE}_PACKAGE_ARCHITECTURE ${ARCHITECTURE})
-SET(CPACK_${TYPE}_PACKAGE_RELEASE 1)
-SET(CPACK_${TYPE}_PACKAGE_VENDOR ${VENDOR})
-SET(CPACK_${TYPE}_PACKAGE_DESCRIPTION "Wifi N channel emulator.")
-SET(CPACK_${TYPE}_PACKAGE_HOMEPAGE "https://wiki.fd.io/view/Vicn")
-
-INCLUDE(CPack)
+set(CPACK_GENERATOR ${GENERATOR})
+set(CPACK_${TYPE}_PACKAGE_MAINTAINER ${PACKAGE_MAINTAINER})
+set(CPACK_${TYPE}_PACKAGE_NAME ${PACKAGE_NAME})
+set(CPACK_${TYPE}_PACKAGE_VERSION ${PACKAGE_VERSION})
+set(CPACK_${TYPE}_PACKAGE_ARCHITECTURE ${ARCHITECTURE})
+set(CPACK_${TYPE}_PACKAGE_RELEASE 1)
+set(CPACK_${TYPE}_PACKAGE_VENDOR ${VENDOR})
+set(CPACK_${TYPE}_PACKAGE_DESCRIPTION "Wifi N channel emulator.")
+set(CPACK_${TYPE}_PACKAGE_HOMEPAGE "https://wiki.fd.io/view/Vicn")
+
+include(CPack)