aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
m---------cmake0
-rw-r--r--cmake/Modules/BuildMacros.cmake300
-rw-r--r--cmake/Modules/FindAsio.cmake41
-rw-r--r--cmake/Modules/FindCURL.cmake69
-rw-r--r--cmake/Modules/FindCollectd.cmake41
-rw-r--r--cmake/Modules/FindGFlags.cmake36
-rw-r--r--cmake/Modules/FindGlog.cmake36
-rw-r--r--cmake/Modules/FindHicnLight.cmake40
-rw-r--r--cmake/Modules/FindHicnPlugin.cmake35
-rw-r--r--cmake/Modules/FindJsoncpp.cmake47
-rw-r--r--cmake/Modules/FindLibEvent.cmake55
-rw-r--r--cmake/Modules/FindLibconfig++.cmake43
-rw-r--r--cmake/Modules/FindLibconfig.cmake43
-rw-r--r--cmake/Modules/FindLibhicn.cmake52
-rwxr-xr-xcmake/Modules/FindLibhicnctrl.cmake45
-rw-r--r--cmake/Modules/FindLibmemif.cmake47
-rw-r--r--cmake/Modules/FindLibparc.cmake50
-rw-r--r--cmake/Modules/FindLibtransport.cmake49
-rw-r--r--cmake/Modules/FindLongBow.cmake55
-rw-r--r--cmake/Modules/FindPThread.cmake58
-rw-r--r--cmake/Modules/FindSafeVapi.cmake40
-rw-r--r--cmake/Modules/FindSysrepo.cmake46
-rw-r--r--cmake/Modules/FindUncrustify.cmake21
-rw-r--r--cmake/Modules/FindVapiSafe.cmake40
-rw-r--r--cmake/Modules/FindVpp.cmake95
-rw-r--r--cmake/Modules/GTestImport.cmake45
-rw-r--r--cmake/Modules/IosMacros.cmake24
-rw-r--r--cmake/Modules/License.txt12
-rw-r--r--cmake/Modules/Packager.cmake344
-rw-r--r--cmake/Modules/PostInstall.cmake83
-rw-r--r--cmake/Modules/ServiceScript.cmake42
-rw-r--r--cmake/Modules/WindowsMacros.cmake33
-rw-r--r--cmake/Modules/detectCacheSize.cmake21
33 files changed, 0 insertions, 1988 deletions
diff --git a/cmake b/cmake
new file mode 160000
+Subproject 5fc3324dd897a75aa1fca4290a8ec02a8f19386
diff --git a/cmake/Modules/BuildMacros.cmake b/cmake/Modules/BuildMacros.cmake
deleted file mode 100644
index 15e2ff1a8..000000000
--- a/cmake/Modules/BuildMacros.cmake
+++ /dev/null
@@ -1,300 +0,0 @@
-# Copyright (c) 2017-2019 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-##############################
-# Utils for building libraries and executables
-#
-
-include(GNUInstallDirs)
-
-macro(remove_flag_from_target target flag)
- get_target_property(target_cxx_flags ${target} COMPILE_OPTIONS)
- if(target_cxx_flags)
- list(REMOVE_ITEM target_cxx_flags ${flag})
- set_target_properties(${target} PROPERTIES COMPILE_OPTIONS "${target_cxx_flags}")
- endif()
-endmacro()
-
-macro(build_executable exec)
- cmake_parse_arguments(ARG
- "NO_INSTALL"
- "COMPONENT"
- "SOURCES;LINK_LIBRARIES;DEPENDS;INCLUDE_DIRS;DEFINITIONS;COMPILE_OPTIONS;LINK_FLAGS"
- ${ARGN}
- )
-
- add_executable(${exec}-bin ${ARG_SOURCES})
-
- set(BUILD_ROOT ${CMAKE_BINARY_DIR}/build-root)
-
- set_target_properties(${exec}-bin
- PROPERTIES
- OUTPUT_NAME ${exec}
- INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}"
- BUILD_RPATH "${BUILD_ROOT}/lib"
- INSTALL_RPATH_USE_LINK_PATH TRUE
- ARCHIVE_OUTPUT_DIRECTORY "${BUILD_ROOT}/lib"
- LIBRARY_OUTPUT_DIRECTORY "${BUILD_ROOT}/lib"
- RUNTIME_OUTPUT_DIRECTORY "${BUILD_ROOT}/bin"
- LINK_FLAGS "${ARG_LINK_FLAGS}"
- )
-
- if(ARG_LINK_LIBRARIES)
- target_link_libraries(${exec}-bin ${ARG_LINK_LIBRARIES})
- endif()
-
- if(ARG_DEPENDS)
- add_dependencies(${exec}-bin ${ARG_DEPENDS})
- endif()
-
- if (ARG_COMPILE_OPTIONS)
- target_compile_options(${exec}-bin PRIVATE -Wall -Werror ${ARG_COMPILE_OPTIONS})
- endif()
-
- if(ARG_DEFINITIONS)
- target_compile_definitions(${exec}-bin PRIVATE ${ARG_DEFINITIONS})
- endif()
-
- if(ARG_INCLUDE_DIRS)
- target_include_directories(${exec}-bin BEFORE PUBLIC
- ${ARG_INCLUDE_DIRS}
- ${PROJECT_BINARY_DIR}
- )
- endif()
-
- if(NOT ARG_NO_INSTALL)
- install(
- TARGETS ${exec}-bin
- RUNTIME
- DESTINATION ${CMAKE_INSTALL_BINDIR}
- COMPONENT ${ARG_COMPONENT}
- )
- endif()
-endmacro()
-
-macro(build_library lib)
- cmake_parse_arguments(ARG
- "SHARED;STATIC;NO_DEV"
- "COMPONENT;"
- "SOURCES;LINK_LIBRARIES;OBJECT_LIBRARIES;LINK_FLAGS;INSTALL_HEADERS;DEPENDS;INCLUDE_DIRS;DEFINITIONS;HEADER_ROOT_DIR;LIBRARY_ROOT_DIR;INSTALL_FULL_PATH_DIR;EMPTY_PREFIX;COMPILE_OPTIONS;VERSION"
- ${ARGN}
- )
-
- message(STATUS "Building library ${lib}")
-
- # Clear target_libs
- unset(TARGET_LIBS)
-
- if (ARG_SHARED)
- list(APPEND TARGET_LIBS
- ${lib}.shared
- )
- add_library(${lib}.shared SHARED ${ARG_SOURCES} ${ARG_OBJECT_LIBRARIES})
- endif()
-
- if(ARG_STATIC)
- list(APPEND TARGET_LIBS
- ${lib}.static
- )
- add_library(${lib}.static STATIC ${ARG_SOURCES} ${ARG_OBJECT_LIBRARIES})
- endif()
-
- if(NOT ARG_COMPONENT)
- set(ARG_COMPONENT hicn)
- endif()
-
- set(BUILD_ROOT ${CMAKE_BINARY_DIR}/build-root)
-
- foreach(library ${TARGET_LIBS})
-
- if(HICN_VERSION)
- set_target_properties(${library}
- PROPERTIES
- SOVERSION ${HICN_VERSION}
- )
- endif()
-
- if (${ARG_EMPTY_PREFIX})
- set_target_properties(${library}
- PROPERTIES
- INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}"
- BUILD_RPATH "${BUILD_ROOT}/lib"
- INSTALL_RPATH_USE_LINK_PATH TRUE
- PREFIX ""
- ARCHIVE_OUTPUT_DIRECTORY "${BUILD_ROOT}/lib"
- LIBRARY_OUTPUT_DIRECTORY "${BUILD_ROOT}/lib"
- RUNTIME_OUTPUT_DIRECTORY "${BUILD_ROOT}/bin"
- LINK_FLAGS "${ARG_LINK_FLAGS}"
- )
- else ()
- set_target_properties(${library}
- PROPERTIES
- INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}"
- BUILD_RPATH "${BUILD_ROOT}/lib"
- INSTALL_RPATH_USE_LINK_PATH TRUE
- ARCHIVE_OUTPUT_DIRECTORY "${BUILD_ROOT}/lib"
- LIBRARY_OUTPUT_DIRECTORY "${BUILD_ROOT}/lib"
- RUNTIME_OUTPUT_DIRECTORY "${BUILD_ROOT}/bin"
- LINK_FLAGS "${ARG_LINK_FLAGS}"
- )
- endif()
-
- if (WIN32)
- target_compile_options(${library} PRIVATE ${ARG_COMPILE_OPTIONS})
- set_target_properties(${library}
- PROPERTIES
- WINDOWS_EXPORT_ALL_SYMBOLS TRUE
- )
- else ()
- target_compile_options(${library}
- PRIVATE -Wall -Werror ${ARG_COMPILE_OPTIONS}
- )
- set_target_properties(${library}
- PROPERTIES
- OUTPUT_NAME ${lib}
- )
- endif ()
-
- # library deps
- if(ARG_LINK_LIBRARIES)
- target_link_libraries(${library} PUBLIC ${ARG_LINK_LIBRARIES})
- endif()
-
- if(ARG_DEFINITIONS)
- target_compile_definitions(${library} PRIVATE ${ARG_DEFINITIONS})
- endif()
-
- if(ARG_INCLUDE_DIRS)
- target_include_directories(${library} BEFORE PUBLIC
- ${ARG_INCLUDE_DIRS}
- ${PROJECT_BINARY_DIR}
- )
- endif()
-
- if(ARG_VERSION)
- set_target_properties(${library}
- PROPERTIES
- VERSION ${ARG_VERSION}
- )
- endif()
-
- set(INSTALL_LIB_PATH "${CMAKE_INSTALL_LIBDIR}/${ARG_LIBRARY_ROOT_DIR}")
-
- if (ARG_INSTALL_FULL_PATH_DIR)
- set(INSTALL_LIB_PATH ${ARG_INSTALL_FULL_PATH_DIR})
- endif()
-
- install(
- TARGETS ${library}
- COMPONENT ${ARG_COMPONENT}
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
- LIBRARY DESTINATION ${INSTALL_LIB_PATH}
- )
-
- if(ARG_DEPENDS)
- add_dependencies(${library} ${ARG_DEPENDS})
- endif()
- endforeach()
-
- # install headers
- if(ARG_INSTALL_HEADERS)
- if (NOT ARG_HEADER_ROOT_DIR)
- set(ARG_HEADER_ROOT_DIR "hicn")
- endif()
-
- list(APPEND local_comps
- ${ARG_COMPONENT}-dev
- )
-
- foreach(file ${ARG_INSTALL_HEADERS})
- get_filename_component(_dir ${file} DIRECTORY)
-
- if (_dir)
- get_filename_component(dir ${_dir} NAME)
- if ("${dir}" STREQUAL src)
- set(dir "")
- endif()
- if ("${dir}" STREQUAL includes)
- set(dir "")
- endif()
- if ("${dir}" STREQUAL ${ARG_HEADER_ROOT_DIR})
- set(dir "")
- endif()
- else()
- set(dir "")
- endif()
-
- set(COMPONENT ${ARG_COMPONENT})
- if (NOT ARG_NO_DEV)
- set(COMPONENT ${COMPONENT}-dev)
- endif()
- install(
- FILES ${file}
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${ARG_HEADER_ROOT_DIR}/${dir}
- COMPONENT ${COMPONENT}
- )
- endforeach()
- endif()
-endmacro()
-
-macro (build_module module)
- cmake_parse_arguments(ARG
- "SHARED;STATIC;NO_DEV"
- "COMPONENT;"
- "SOURCES;LINK_LIBRARIES;INSTALL_HEADERS;DEPENDS;INCLUDE_DIRS;DEFINITIONS;HEADER_ROOT_DIR;LIBRARY_ROOT_DIR;INSTALL_FULL_PATH_DIR;EMPTY_PREFIX;COMPILE_OPTIONS;VERSION"
- ${ARGN}
- )
-
- message(STATUS "Building module ${module}")
-
- build_library(${module}
- SHARED
- SOURCES ${ARG_SOURCES}
- LINK_LIBRARIES ${ARG_LINK_LIBRARIES}
- INSTALL_HEADERS ${ARG_INSTALL_HEADERS}
- DEPENDS ${ARG_DEPENDS}
- COMPONENT ${ARG_COMPONENT}
- INCLUDE_DIRS ${ARG_INCLUDE_DIRS}
- HEADER_ROOT_DIR ${ARG_HEADER_ROOT_DIR}
- LIBRARY_ROOT_DIR ${ARG_LIBRARY_ROOT_DIR}
- INSTALL_FULL_PATH_DIR ${ARG_INSTALL_FULL_PATH_DIR}
- DEFINITIONS ${ARG_DEFINITIONS}
- EMPTY_PREFIX ${ARG_EMPTY_PREFIX}
- COMPILE_OPTIONS ${ARG_COMPILE_OPTIONS}
- VERSION ${ARG_VERSION}
- )
-
- if (${CMAKE_SYSTEM_NAME} MATCHES Darwin)
- set(LINK_FLAGS "-Wl,-undefined,dynamic_lookup")
- elseif(${CMAKE_SYSTEM_NAME} MATCHES iOS)
- set(LINK_FLAGS "-Wl,-undefined,dynamic_lookup")
- elseif(${CMAKE_SYSTEM_NAME} MATCHES Linux)
- set(LINK_FLAGS "-Wl,-unresolved-symbols=ignore-all")
- elseif(${CMAKE_SYSTEM_NAME} MATCHES Windows)
- set(LINK_FLAGS "/wd4275")
- else()
- message(FATAL_ERROR "Trying to build module on a not supportd platform. Aborting.")
- endif()
-
- set_target_properties(${module}.shared
- PROPERTIES
- LINKER_LANGUAGE C
- PREFIX ""
- LINK_FLAGS ${LINK_FLAGS}
- )
-
-endmacro(build_module)
-
-include(IosMacros)
-include(WindowsMacros)
diff --git a/cmake/Modules/FindAsio.cmake b/cmake/Modules/FindAsio.cmake
deleted file mode 100644
index 73888e519..000000000
--- a/cmake/Modules/FindAsio.cmake
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright (c) 2017-2019 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-########################################
-#
-# Find the hcin libraries and includes
-# This module sets:
-# ASIO_FOUND: True if asio was found
-# ASIO_INCLUDE_DIR: The asio include dir
-#
-
-set(ASIO_SEARCH_PATH_LIST
- ${ASIO_HOME}
- $ENV{ASIO_HOME}
- /usr/local
- /opt
- /usr
-)
-
-find_path(ASIO_INCLUDE_DIR asio.hpp
- HINTS ${ASIO_SEARCH_PATH_LIST}
- PATH_SUFFIXES include
- DOC "Find the asio includes"
-)
-
-set(ASIO_INCLUDE_DIRS ${ASIO_INCLUDE_DIR})
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Asio
- REQUIRED_VARS ASIO_INCLUDE_DIRS
-) \ No newline at end of file
diff --git a/cmake/Modules/FindCURL.cmake b/cmake/Modules/FindCURL.cmake
deleted file mode 100644
index 239b0e505..000000000
--- a/cmake/Modules/FindCURL.cmake
+++ /dev/null
@@ -1,69 +0,0 @@
-#.rst:
-# FindCURL
-# --------
-#
-# Find curl
-#
-# Find the native CURL headers and libraries.
-#
-# ::
-#
-# CURL_INCLUDE_DIRS - where to find curl_/curl_.h, etc.
-# CURL_LIBRARIES - List of libraries when using curl.
-# CURL_FOUND - True if curl found.
-# CURL_VERSION_STRING - the version of curl found (since CMake 2.8.8)
-
-#=============================================================================
-# Copyright 2006-2009 Kitware, Inc.
-# Copyright 2012 Rolf Eike Beer <eike@sf-mail.de>
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-# License text for the above reference.)
-
-# Look for the header file.
-find_path(CURL_INCLUDE_DIR NAMES curl/curl.h)
-mark_as_advanced(CURL_INCLUDE_DIR)
-
-# Look for the library (sorted from most current/relevant entry to least).
-find_library(CURL_LIBRARY NAMES
- curl
- # Windows MSVC prebuilts:
- curllib
- libcurl_imp
- curllib_static
- # Windows older "Win32 - MSVC" prebuilts (libcurl.lib, e.g. libcurl-7.15.5-win32-msvc.zip):
- libcurl
- )
-mark_as_advanced(CURL_LIBRARY)
-
-if(CURL_INCLUDE_DIR)
- foreach(_curl_version_header curlver.h curl.h)
- if(EXISTS "${CURL_INCLUDE_DIR}/curl/${_curl_version_header}")
- file(STRINGS "${CURL_INCLUDE_DIR}/curl/${_curl_version_header}" curl_version_str REGEX "^#define[\t ]+LIBCURL_VERSION[\t ]+\".*\"")
-
- string(REGEX REPLACE "^#define[\t ]+LIBCURL_VERSION[\t ]+\"([^\"]*)\".*" "\\1" CURL_VERSION_STRING "${curl_version_str}")
- unset(curl_version_str)
- break()
- endif()
- endforeach()
-endif()
-
-# handle the QUIETLY and REQUIRED arguments and set CURL_FOUND to TRUE if
-# all listed variables are TRUE
-include(FindPackageHandleStandardArgs)
-
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(CURL
- REQUIRED_VARS CURL_LIBRARY CURL_INCLUDE_DIR
- VERSION_VAR CURL_VERSION_STRING)
-
-if(CURL_FOUND)
- set(CURL_LIBRARIES ${CURL_LIBRARY})
- set(CURL_INCLUDE_DIRS ${CURL_INCLUDE_DIR})
-endif()
diff --git a/cmake/Modules/FindCollectd.cmake b/cmake/Modules/FindCollectd.cmake
deleted file mode 100644
index 244fd14e5..000000000
--- a/cmake/Modules/FindCollectd.cmake
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-set(COLLECTD_SEARCH_PATH_LIST
- ${COLLECTD_HOME}
- $ENV{COLLECTD_HOME}
- /usr/local
- /opt
- /usr
- )
-
-find_path(COLLECTD_INCLUDE_DIR collectd.h
- HINTS ${COLLECTD_SEARCH_PATH_LIST}
- PATH_SUFFIXES include/collectd/core/daemon/ daemon/
- DOC "Find the collectd includes"
-)
-
-find_path(COLLECTD_CONFIG_INCLUDE_DIR config.h
- HINTS ${COLLECTD_SEARCH_PATH_LIST}
- PATH_SUFFIXES include/collectd/core/
- DOC "Find the collectd includes"
-)
-
-message(STATUS ${COLLECTD_INCLUDE_DIR} ${COLLECTD_CONFIG_INCLUDE_DIR})
-
-set(COLLECTD_INCLUDE_DIRS ${COLLECTD_INCLUDE_DIR} ${COLLECTD_CONFIG_INCLUDE_DIR})
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Collectd DEFAULT_MSG COLLECTD_INCLUDE_DIRS)
-
-mark_as_advanced(COLLECTD_INCLUDE_DIRS)
diff --git a/cmake/Modules/FindGFlags.cmake b/cmake/Modules/FindGFlags.cmake
deleted file mode 100644
index 804bfebdc..000000000
--- a/cmake/Modules/FindGFlags.cmake
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright (c) 2017-2019 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#
-# Find libgflags
-#
-# LIBGFLAGS_INCLUDE_DIR - where to find gflags/gflags.h, etc.
-# LIBGFLAGS_LIBRARY - List of libraries when using libgflags.
-# LIBGFLAGS_FOUND - True if libgflags found.
-
-
-IF (LIBGFLAGS_INCLUDE_DIR)
- # Already in cache, be silent
- SET(LIBGFLAGS_FIND_QUIETLY TRUE)
-ENDIF ()
-
-FIND_PATH(LIBGFLAGS_INCLUDE_DIR gflags/gflags.h)
-
-FIND_LIBRARY(LIBGFLAGS_LIBRARY NAMES gflags gflags_static)
-
-# handle the QUIETLY and REQUIRED arguments and set LIBGFLAGS_FOUND to TRUE if
-# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBGFLAGS DEFAULT_MSG LIBGFLAGS_LIBRARY LIBGFLAGS_INCLUDE_DIR)
-
-MARK_AS_ADVANCED(LIBGFLAGS_LIBRARY LIBGFLAGS_INCLUDE_DIR) \ No newline at end of file
diff --git a/cmake/Modules/FindGlog.cmake b/cmake/Modules/FindGlog.cmake
deleted file mode 100644
index 10023a187..000000000
--- a/cmake/Modules/FindGlog.cmake
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright (c) 2017-2019 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#
-# Find libglog
-#
-# LIBGLOG_INCLUDE_DIR - where to find glog/logging.h, etc.
-# LIBGLOG_LIBRARY - List of libraries when using libglog.
-# LIBGLOG_FOUND - True if libglog found.
-
-
-IF (LIBGLOG_INCLUDE_DIR)
- # Already in cache, be silent
- SET(LIBGLOG_FIND_QUIETLY TRUE)
-ENDIF ()
-
-FIND_PATH(LIBGLOG_INCLUDE_DIR glog/logging.h)
-
-FIND_LIBRARY(LIBGLOG_LIBRARY glog)
-
-# handle the QUIETLY and REQUIRED arguments and set LIBGLOG_FOUND to TRUE if
-# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBGLOG DEFAULT_MSG LIBGLOG_LIBRARY LIBGLOG_INCLUDE_DIR)
-
-MARK_AS_ADVANCED(LIBGLOG_LIBRARY LIBGLOG_INCLUDE_DIR) \ No newline at end of file
diff --git a/cmake/Modules/FindHicnLight.cmake b/cmake/Modules/FindHicnLight.cmake
deleted file mode 100644
index 6894415e7..000000000
--- a/cmake/Modules/FindHicnLight.cmake
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright (c) 2019 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-set(HICNLIGHT_SEARCH_PATH_LIST
- ${HICNLIGHT_HOME}
- $ENV{HICNLIGHT_HOME}
- /usr/local
- /opt
- /usr
-)
-
-find_path(HICNLIGHT_INCLUDE_DIR hicn/ctrl/api.h
- HINTS ${HICNLIGHT_SEARCH_PATH_LIST}
- PATH_SUFFIXES include
- DOC "Find the hicn plugin includes"
-)
-
-find_library(HICNLIGHT_LIBRARY NAMES libhicnctrl.so
- HINTS ${HICNLIGHT_SEARCH_PATH_LIST}
- PATH_SUFFIXES lib/x86_64-linux-gnu/
- DOC "Find the hicn light lib"
-)
-
-set(HICNLIGHT_LIBRARIES ${HICNLIGHT_LIBRARY})
-set(HICNLIGHT_INCLUDE_DIRS ${HICNLIGHT_INCLUDE_DIR})
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Hicnlight HICNLIGHT_LIBRARIES HICNLIGHT_INCLUDE_DIRS)
-
-mark_as_advanced(HICNLIGHT_LIBRARY HICNLIGHT_INCLUDE_DIR)
diff --git a/cmake/Modules/FindHicnPlugin.cmake b/cmake/Modules/FindHicnPlugin.cmake
deleted file mode 100644
index 07e5f9a8c..000000000
--- a/cmake/Modules/FindHicnPlugin.cmake
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright (c) 2019 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-set(HICNPLUGIN_SEARCH_PATH_LIST
- ${VPP_SEARCH_PATH_LIST}
- ${HICNPLUGIN_HOME}
- $ENV{HICNPLUGIN_HOME}
- /usr/local
- /opt
- /usr
-)
-
-find_path(HICNPLUGIN_INCLUDE_DIR vapi/hicn.api.vapi.h
- HINTS ${HICNPLUGIN_SEARCH_PATH_LIST}
- PATH_SUFFIXES include
- DOC "Find the hicn plugin includes"
-)
-
-
-set(HICNPLUGIN_INCLUDE_DIRS ${HICNPLUGIN_INCLUDE_DIR} ${HICNPLUGIN_INCLUDE_DIR}/vpp_plugins)
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(HicnPlugin DEFAULT_MSG HICNPLUGIN_INCLUDE_DIR)
-
-mark_as_advanced(HICNPLUGIN_INCLUDE_DIR) \ No newline at end of file
diff --git a/cmake/Modules/FindJsoncpp.cmake b/cmake/Modules/FindJsoncpp.cmake
deleted file mode 100644
index acde7b95b..000000000
--- a/cmake/Modules/FindJsoncpp.cmake
+++ /dev/null
@@ -1,47 +0,0 @@
-# Find jsoncpp
-#
-# Find the jsoncpp includes and library
-#
-# if you nee to add a custom library search path, do it via via CMAKE_PREFIX_PATH
-#
-# This module defines
-# JSONCPP_INCLUDE_DIRS, where to find header, etc.
-# JSONCPP_LIBRARIES, the libraries needed to use jsoncpp.
-# JSONCPP_FOUND, If false, do not try to use jsoncpp.
-# JSONCPP_INCLUDE_PREFIX, include prefix for jsoncpp
-
-# only look in default directories
-find_path(
- JSONCPP_INCLUDE_DIR
- NAMES jsoncpp/json/json.h json/json.h
- DOC "jsoncpp include dir"
-)
-
-find_library(
- JSONCPP_LIBRARY
- NAMES jsoncpp
- DOC "jsoncpp library"
-)
-
-set(JSONCPP_INCLUDE_DIRS ${JSONCPP_INCLUDE_DIR})
-set(JSONCPP_LIBRARIES ${JSONCPP_LIBRARY})
-
-# find JSONCPP_INCLUDE_PREFIX
-find_path(
- JSONCPP_INCLUDE_PREFIX
- NAMES json.h
- PATH_SUFFIXES jsoncpp/json json
-)
-
-if (${JSONCPP_INCLUDE_PREFIX} MATCHES "jsoncpp")
- set(JSONCPP_INCLUDE_PREFIX "jsoncpp/json")
-else()
- set(JSONCPP_INCLUDE_PREFIX "json")
-endif()
-
-# handle the QUIETLY and REQUIRED arguments and set JSONCPP_FOUND to TRUE
-# if all listed variables are TRUE, hide their existence from configuration view
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(jsoncpp DEFAULT_MSG
- JSONCPP_INCLUDE_DIR JSONCPP_LIBRARY)
-mark_as_advanced (JSONCPP_INCLUDE_DIR JSONCPP_LIBRARY) \ No newline at end of file
diff --git a/cmake/Modules/FindLibEvent.cmake b/cmake/Modules/FindLibEvent.cmake
deleted file mode 100644
index 5e4113716..000000000
--- a/cmake/Modules/FindLibEvent.cmake
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright (c) 2017-2019 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-########################################
-#
-# Find the LibEvent libraries and includes
-# This module sets:
-# LIBEVENT_FOUND: True if LibEvent was found
-# LIBEVENT_LIBRARY: The LibEvent library
-# LIBEVENT_LIBRARIES: The LibEvent library and dependencies
-# LIBEVENT_INCLUDE_DIR: The LibEvent include dir
-#
-# This module will look for the libraries in various locations
-# See the LIBEVENT_SEARCH_PATH_LIST for a full list.
-#
-# The caller can hint at locations using the following variables:
-#
-# LIBEVENT_HOME (passed as -D to cmake)
-# LIBEVENT_HOME (in environment)
-#
-
-set(LIBEVENT_SEARCH_PATH_LIST
- ${LIBEVENT_HOME}
- $ENV{DEPENDENCIES}
- $ENV{LIBEVENT_HOME}
- /usr/local
- /opt
- /usr
- )
-
-find_path(LIBEVENT_INCLUDE_DIR event2/event.h
- HINTS ${LIBEVENT_SEARCH_PATH_LIST}
- PATH_SUFFIXES include
- DOC "Find the LibEvent includes" )
-
-find_library(LIBEVENT_LIBRARY NAMES event
- HINTS ${LIBEVENT_SEARCH_PATH_LIST}
- PATH_SUFFIXES lib
- DOC "Find the LibEvent libraries" )
-
-set(LIBEVENT_LIBRARIES ${LIBEVENT_LIBRARY})
-set(LIBEVENT_INCLUDE_DIRS ${LIBEVENT_INCLUDE_DIR})
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(LibEvent DEFAULT_MSG LIBEVENT_LIBRARY LIBEVENT_INCLUDE_DIR)
diff --git a/cmake/Modules/FindLibconfig++.cmake b/cmake/Modules/FindLibconfig++.cmake
deleted file mode 100644
index 1636ae96a..000000000
--- a/cmake/Modules/FindLibconfig++.cmake
+++ /dev/null
@@ -1,43 +0,0 @@
-set(LIBCONFIG_SEARCH_PATH_LIST
- ${LIBCONFIG_HOME}
- $ENV{LIBCONFIG_HOME}
- /usr/local
- /opt
- /usr
-)
-
-find_path(LIBCONFIG_INCLUDE_DIR libconfig.h++
- HINTS ${LIBCONFIG_SEARCH_PATH_LIST}
- PATH_SUFFIXES include
- DOC "Find the libconfig include"
-)
-
-if (WIN32)
- if(CMAKE_SIZEOF_VOID_P EQUAL 8)
- find_library(LIBCONFIG_CPP_LIBRARIES NAMES libconfig++.lib
- HINTS ${LIBCONFIG_SEARCH_PATH_LIST}
- PATH_SUFFIXES lib/x64
- DOC "Find the libconfig libraries"
- )
- elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
- find_library(LIBCONFIG_CPP_LIBRARIES NAMES libconfig++.lib
- HINTS ${LIBCONFIG_SEARCH_PATH_LIST}
- PATH_SUFFIXES lib/x32
- DOC "Find the libconfig libraries"
- )
- endif()
-else()
- find_library(LIBCONFIG_CPP_LIBRARY NAMES config++
- HINTS ${LIBCONFIG_SEARCH_PATH_LIST}
- PATH_SUFFIXES lib
- DOC "Find the libconfig++ libraries"
- )
-endif()
-
-set(LIBCONFIG_CPP_LIBRARIES ${LIBCONFIG_CPP_LIBRARY})
-set(LIBCONFIG_INCLUDE_DIRS ${LIBCONFIG_INCLUDE_DIR})
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Libconfig++ LIBCONFIG_CPP_LIBRARIES LIBCONFIG_INCLUDE_DIRS)
-
-mark_as_advanced(LIBCONFIG_CPP_LIBRARIES LIBCONFIG_INCLUDE_DIRS)
diff --git a/cmake/Modules/FindLibconfig.cmake b/cmake/Modules/FindLibconfig.cmake
deleted file mode 100644
index 55d2a0fad..000000000
--- a/cmake/Modules/FindLibconfig.cmake
+++ /dev/null
@@ -1,43 +0,0 @@
-set(LIBCONFIG_SEARCH_PATH_LIST
- ${LIBCONFIG_HOME}
- $ENV{LIBCONFIG_HOME}
- /usr/local
- /opt
- /usr
-)
-
-find_path(LIBCONFIG_INCLUDE_DIR libconfig.h
- HINTS ${LIBCONFIG_SEARCH_PATH_LIST}
- PATH_SUFFIXES include
- DOC "Find the libconfig include"
-)
-
-if (WIN32)
- if(CMAKE_SIZEOF_VOID_P EQUAL 8)
- find_library(LIBCONFIG_LIBRARY NAMES libconfig.lib
- HINTS ${LIBCONFIG_SEARCH_PATH_LIST}
- PATH_SUFFIXES lib/x64
- DOC "Find the libconfig libraries"
- )
- elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
- find_library(LIBCONFIG_LIBRARY NAMES libconfig.lib
- HINTS ${LIBCONFIG_SEARCH_PATH_LIST}
- PATH_SUFFIXES lib/x32
- DOC "Find the libconfig libraries"
- )
- endif()
-else()
- find_library(LIBCONFIG_LIBRARY NAMES config
- HINTS ${LIBCONFIG_SEARCH_PATH_LIST}
- PATH_SUFFIXES lib
- DOC "Find the libconfig libraries"
- )
-endif()
-
-set(LIBCONFIG_LIBRARIES ${LIBCONFIG_LIBRARY})
-set(LIBCONFIG_INCLUDE_DIRS ${LIBCONFIG_INCLUDE_DIR})
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Libconfig LIBCONFIG_LIBRARIES LIBCONFIG_INCLUDE_DIRS)
-
-mark_as_advanced(LIBCONFIG_LIBRARIES LIBCONFIG_INCLUDE_DIRS)
diff --git a/cmake/Modules/FindLibhicn.cmake b/cmake/Modules/FindLibhicn.cmake
deleted file mode 100644
index 5f241a6cd..000000000
--- a/cmake/Modules/FindLibhicn.cmake
+++ /dev/null
@@ -1,52 +0,0 @@
-# Copyright (c) 2017-2019 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-########################################
-#
-# Find the hcin libraries and includes
-# This module sets:
-# HICN_FOUND: True if hicn was found
-# HICN_LIBRARY: The hicn library
-# HICN_LIBRARIES: The hicn library and dependencies
-# HCIN_INCLUDE_DIR: The hicn include dir
-#
-
-set(HICN_SEARCH_PATH_LIST
- ${HICN_HOME}
- $ENV{HICN_HOME}
- $ENV{FOUNDATION_HOME}
- /usr/local
- /opt
- /usr
-)
-
-find_path(HICN_INCLUDE_DIR hicn/hicn.h
- HINTS ${HICN_SEARCH_PATH_LIST}
- PATH_SUFFIXES include
- DOC "Find the hicn includes"
-)
-
-find_library(HICN_LIBRARY NAMES hicn
- HINTS ${HICN_SEARCH_PATH_LIST}
- PATH_SUFFIXES lib
- DOC "Find the hicn libraries"
-)
-
-set(HICN_LIBRARIES ${HICN_LIBRARY})
-if (${CMAKE_SYSTEM_NAME} STREQUAL "Android")
- set(HICN_LIBRARIES ${HICN_LIBRARIES} log)
-endif()
-set(HICN_INCLUDE_DIRS ${HICN_INCLUDE_DIR})
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(hicn DEFAULT_MSG HICN_LIBRARY HICN_INCLUDE_DIR)
diff --git a/cmake/Modules/FindLibhicnctrl.cmake b/cmake/Modules/FindLibhicnctrl.cmake
deleted file mode 100755
index 7c20420b4..000000000
--- a/cmake/Modules/FindLibhicnctrl.cmake
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright (c) 2017-2019 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-########################################
-#
-# Find the hICN control library and include files
-#
-
-set(HICN_SEARCH_PATH_LIST
- ${HICN_HOME}
- $ENV{HICN_HOME}
- $ENV{FOUNDATION_HOME}
- /usr/local
- /opt
- /usr
-)
-
-find_path(LIBHICNCTRL_INCLUDE_DIR hicn/ctrl.h
- HINTS ${HICN_SEARCH_PATH_LIST}
- PATH_SUFFIXES include
- DOC "Find the hICN control include"
-)
-
-find_library(LIBHICNCTRL_LIBRARY NAMES hicnctrl
- HINTS ${HICN_SEARCH_PATH_LIST}
- PATH_SUFFIXES lib
- DOC "Find the hicn control library"
-)
-
-set(LIBHICNCTRL_LIBRARIES ${LIBHICNCTRL_LIBRARY})
-set(LIBHICNCTRL_INCLUDE_DIRS ${LIBHICNCTRL_INCLUDE_DIR})
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(hicnctrl DEFAULT_MSG
- LIBHICNCTRL_LIBRARY LIBHICNCTRL_INCLUDE_DIR)
diff --git a/cmake/Modules/FindLibmemif.cmake b/cmake/Modules/FindLibmemif.cmake
deleted file mode 100644
index 48460eecd..000000000
--- a/cmake/Modules/FindLibmemif.cmake
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright (c) 2017-2019 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-########################################
-#
-# Find the hcin libraries and includes
-# This module sets:
-# LIBMEMIF_FOUND: True if core was found
-# LIBMEMIF_LIBRARY: The core library
-# LIBMEMIF_INCLUDE_DIR: The core include dir
-#
-
-set(LIBMEMIF_SEARCH_PATH_LIST
- ${LIBMEMIF_HOME}
- $ENV{LIBMEMIF_HOME}
- /usr/local
- /opt
- /usr
-)
-
-find_path(LIBMEMIF_INCLUDE_DIR memif/libmemif.h
- HINTS ${LIBMEMIF_SEARCH_PATH_LIST}
- PATH_SUFFIXES include
- DOC "Find the libmemif includes"
-)
-
-find_library(LIBMEMIF_LIBRARY NAMES memif
- HINTS ${LIBMEMIF_SEARCH_PATH_LIST}
- PATH_SUFFIXES lib
- DOC "Find the libmemif libraries"
-)
-
-set(LIBMEMIF_LIBRARIES ${LIBMEMIF_LIBRARY})
-set(LIBMEMIF_INCLUDE_DIRS ${LIBMEMIF_INCLUDE_DIR})
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Libmemif DEFAULT_MSG LIBMEMIF_LIBRARY LIBMEMIF_INCLUDE_DIR)
diff --git a/cmake/Modules/FindLibparc.cmake b/cmake/Modules/FindLibparc.cmake
deleted file mode 100644
index c5c99af15..000000000
--- a/cmake/Modules/FindLibparc.cmake
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright (c) 2017-2019 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-########################################
-#
-# Find the Libparc libraries and includes
-# This module sets:
-# LIBPARC_FOUND: True if Libparc was found
-# LIBPARC_LIBRARY: The Libparc library
-# LIBPARC_LIBRARIES: The Libparc library and dependencies
-# LIBPARC_INCLUDE_DIR: The Libparc include dir
-#
-
-set(LIBPARC_SEARCH_PATH_LIST
- ${LIBPARC_HOME}
- $ENV{LIBPARC_HOME}
- /usr/local
- /opt
- /usr
-)
-
-find_path(LIBPARC_INCLUDE_DIR parc/libparc_About.h
- HINTS ${LIBPARC_SEARCH_PATH_LIST}
- PATH_SUFFIXES include
- DOC "Find the Libparc includes"
-)
-
-find_library(LIBPARC_LIBRARY NAMES parc
- HINTS ${LIBPARC_SEARCH_PATH_LIST}
- PATH_SUFFIXES lib
- DOC "Find the Libparc libraries"
-)
-
-set(LIBPARC_LIBRARIES ${LIBPARC_LIBRARY})
-set(LIBPARC_INCLUDE_DIRS ${LIBPARC_INCLUDE_DIR})
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Libparc DEFAULT_MSG LIBPARC_LIBRARY LIBPARC_INCLUDE_DIR)
-
-mark_as_advanced(LIBPARC_LIBRARY LIBPARC_INCLUDE_DIR)
diff --git a/cmake/Modules/FindLibtransport.cmake b/cmake/Modules/FindLibtransport.cmake
deleted file mode 100644
index 8a650b98c..000000000
--- a/cmake/Modules/FindLibtransport.cmake
+++ /dev/null
@@ -1,49 +0,0 @@
-# Copyright (c) 2017-2019 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-########################################
-#
-# Find the LibTRANSPORT libraries and includes
-# This module sets:
-# LIBTRANSPORT_FOUND: True if Libconsumer-producer was found
-# LIBTRANSPORTR_LIBRARY: The Libconsumer-producer library
-# LIBTRANSPORT_LIBRARIES: The Libconsumer-producer library and dependencies
-# LIBTRANSPORT_INCLUDE_DIR: The Libconsumer-producer include dir
-#
-
-set(LIBTRANSPORT_SEARCH_PATH_LIST
- ${LIBTRANSPORT_HOME}
- $ENV{LIBTRANSPORTHOME}
- /usr/local
- /opt
- /usr
-)
-
-find_path(LIBTRANSPORT_INCLUDE_DIR hicn/transport/config.h
- HINTS ${LIBTRANSPORT_SEARCH_PATH_LIST}
- PATH_SUFFIXES include
- DOC "Find the libtransport includes"
-)
-
-find_library(LIBTRANSPORT_LIBRARY
- NAMES hicntransport hicntransport-memif
- HINTS ${LIBTRANSPORT_SEARCH_PATH_LIST}
- PATH_SUFFIXES lib
- DOC "Find the libtransport libraries"
-)
-
-set(LIBTRANSPORT_LIBRARIES ${LIBTRANSPORT_LIBRARY})
-set(LIBTRANSPORT_INCLUDE_DIRS ${LIBTRANSPORT_INCLUDE_DIR})
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Libtransport DEFAULT_MSG LIBTRANSPORT_LIBRARIES LIBTRANSPORT_INCLUDE_DIRS) \ No newline at end of file
diff --git a/cmake/Modules/FindLongBow.cmake b/cmake/Modules/FindLongBow.cmake
deleted file mode 100644
index 4a05d7fdf..000000000
--- a/cmake/Modules/FindLongBow.cmake
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright (c) 2017-2019 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-########################################
-#
-# Find the LongBow libraries and includes
-# This module sets:
-# LONGBOW_FOUND: True if LongBow was found
-# LONGBOW_LIBRARY: The LongBow library
-# LONGBOW_LIBRARIES: The LongBow library and dependencies
-# LONGBOW_INCLUDE_DIR: The LongBow include dir
-#
-
-set(LONGBOW_SEARCH_PATH_LIST
- ${LONGBOW_HOME}
- $ENV{LONGBOW_HOME}
- $ENV{PARC_HOME}
- $ENV{FOUNDATION_HOME}
- /usr/local/parc
- /usr/local/ccn
- /usr/local
- /opt
- /usr
- )
-
-find_path(LONGBOW_INCLUDE_DIR LongBow/longBow_About.h
- HINTS ${LONGBOW_SEARCH_PATH_LIST}
- PATH_SUFFIXES include
- DOC "Find the LongBow includes" )
-
-find_library(LONGBOW_LIBRARY NAMES longbow
- HINTS ${LONGBOW_SEARCH_PATH_LIST}
- PATH_SUFFIXES lib
- DOC "Find the LongBow libraries" )
-
-find_library(LONGBOW_REPORT_LIBRARY NAMES longbow-textplain longbow-ansiterm
- HINTS ${LONGBOW_SEARCH_PATH_LIST}
- PATH_SUFFIXES lib
- DOC "Find the LongBow report libraries" )
-
-set(LONGBOW_LIBRARIES ${LONGBOW_LIBRARY} ${LONGBOW_REPORT_LIBRARY})
-set(LONGBOW_INCLUDE_DIRS ${LONGBOW_INCLUDE_DIR})
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(LongBow DEFAULT_MSG LONGBOW_LIBRARY LONGBOW_INCLUDE_DIR)
diff --git a/cmake/Modules/FindPThread.cmake b/cmake/Modules/FindPThread.cmake
deleted file mode 100644
index 6f0eeb7c0..000000000
--- a/cmake/Modules/FindPThread.cmake
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright (c) 2019 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-########################################
-#
-# Find the PThread libraries and includes
-# This module sets:
-# PTHREAD_FOUND: True if pthread was found
-# PTHREADR_LIBRARY: The pthread library
-# PTHREAD_LIBRARIES: The pthread library and dependencies
-# PTHREAD_INCLUDE_DIR: The pthread include dir
-#
-
-
-set(PTHREAD_SEARCH_PATH_LIST
- ${PTHREAD_HOME}
- $ENV{PTHREAD_HOME}
- /usr/local
- /opt
- /usr
-)
-
-find_path(PTHREAD_INCLUDE_DIR pthread.h
- HINTS ${PTHREAD_SEARCH_PATH_LIST}
- PATH_SUFFIXES include
- DOC "Find the pthreadincludes"
-)
-
-if(CMAKE_SIZEOF_VOID_P EQUAL 8)
- find_library(PTHREAD_LIBRARY NAMES pthreadVC2.lib
- HINTS ${PTHREAD_SEARCH_PATH_LIST}
- PATH_SUFFIXES lib/x64
- DOC "Find the pthread libraries"
- )
-elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
- find_library(PTHREAD_LIBRARY NAMES pthreadVC2.lib
- HINTS ${PTHREAD_SEARCH_PATH_LIST}
- PATH_SUFFIXES lib/x32
- DOC "Find the pthread libraries"
- )
-endif()
-
-
-set(PTHREAD_LIBRARIES ${PTHREAD_LIBRARY})
-set(PTHREAD_INCLUDE_DIRS ${PTHREAD_INCLUDE_DIR})
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Pthread DEFAULT_MSG PTHREAD_LIBRARIES PTHREAD_INCLUDE_DIRS) \ No newline at end of file
diff --git a/cmake/Modules/FindSafeVapi.cmake b/cmake/Modules/FindSafeVapi.cmake
deleted file mode 100644
index a9077ae14..000000000
--- a/cmake/Modules/FindSafeVapi.cmake
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright (c) 2019 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-set(SAFE_VAPI_SEARCH_PATH_LIST
- ${SAFE_VAPI_HOME}
- $ENV{SAFE_VAPI_HOME}
- /usr/local
- /opt
- /usr
-)
-
-find_path(SAFE_VAPI_INCLUDE_DIR vapi/vapi_safe.h
- HINTS ${SAFE_VAPI_SEARCH_PATH_LIST}
- PATH_SUFFIXES include
- DOC "Find the vapi_safe includes"
-)
-
-find_library(SAFE_VAPI_LIBRARY NAMES libsafe_vapi.so
- HINTS ${SAFE_VAPI_SEARCH_PATH_LIST}
- PATH_SUFFIXES lib/x86_64-linux-gnu/
- DOC "Find the vapi safe lib"
-)
-
-set(SAFE_VAPI_LIBRARIES ${SAFE_VAPI_LIBRARY})
-set(SAFE_VAPI_INCLUDE_DIRS ${SAFE_VAPI_INCLUDE_DIR})
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Hicnlight SAFE_VAPI_LIBRARIES SAFE_VAPI_INCLUDE_DIRS)
-
-mark_as_advanced(SAFE_VAPI_LIBRARY SAFE_VAPI_INCLUDE_DIR)
diff --git a/cmake/Modules/FindSysrepo.cmake b/cmake/Modules/FindSysrepo.cmake
deleted file mode 100644
index 1c389e480..000000000
--- a/cmake/Modules/FindSysrepo.cmake
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright (c) 2019 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-set(SYSREPO_SEARCH_PATH_LIST
- ${SYSREPO_HOME}
- $ENV{SYSREPO_HOME}
- /usr/local
- /opt
- /usr
-)
-
-find_path(SYSREPO_INCLUDE_DIR sysrepo/values.h
- HINTS ${SYSREPO_SEARCH_PATH_LIST}
- PATH_SUFFIXES include
- DOC "Find the sysrepo includes"
-)
-
-find_path(SYSREPO_INCLUDE_MAIN_DIR sysrepo.h
- HINTS ${SYSREPO_SEARCH_PATH_LIST}
- PATH_SUFFIXES include
- DOC "Find the sysrepo includes"
-)
-
-find_library(SYSREPO_LIBRARY NAMES libsysrepo.so
- HINTS ${SYSREPO_SEARCH_PATH_LIST}
- PATH_SUFFIXES lib
- DOC "Find the sysrepo library"
-)
-
-set(SYSREPO_LIBRARIES ${SYSREPO_LIBRARY})
-set(SYSREPO_INCLUDE_DIRS ${SYSREPO_INCLUDE_DIR} ${SYSREPO_INCLUDE_MAIN_DIR})
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Sysrepo DEFAULT_MSG SYSREPO_LIBRARIES SYSREPO_INCLUDE_DIRS)
-
-mark_as_advanced(SYSREPO_LIBRARY SYSREPO_INCLUDE_DIR SYSREPO_INCLUDE_MAIN_DIR)
diff --git a/cmake/Modules/FindUncrustify.cmake b/cmake/Modules/FindUncrustify.cmake
deleted file mode 100644
index f8f6b00b8..000000000
--- a/cmake/Modules/FindUncrustify.cmake
+++ /dev/null
@@ -1,21 +0,0 @@
-# Copyright (c) 2017-2019 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Find uncrustify program
-#
-find_program( UNCRUSTIFY_BIN uncrustify
- PATHS
- $ENV{UNCRUSTIFY_HOME}
- )
-
-message( "-- UNCRUSTIFY found in ${UNCRUSTIFY_BIN}" )
diff --git a/cmake/Modules/FindVapiSafe.cmake b/cmake/Modules/FindVapiSafe.cmake
deleted file mode 100644
index c2c9fd762..000000000
--- a/cmake/Modules/FindVapiSafe.cmake
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-set(SAFE_VAPI_SEARCH_PATH_LIST
- ${SAFE_VAPI_HOME}
- $ENV{SAFE_VAPI_HOME}
- /usr/local
- /opt
- /usr
-)
-
-find_path(SAFE_VAPI_INCLUDE_DIR vapi/vapi_safe.h
- HINTS ${SAFE_VAPI_SEARCH_PATH_LIST}
- PATH_SUFFIXES include
- DOC "Find the vapi_safe includes"
-)
-
-find_library(SAFE_VAPI_LIBRARY NAMES libsafe_vapi.so
- HINTS ${SAFE_VAPI_SEARCH_PATH_LIST}
- PATH_SUFFIXES lib/x86_64-linux-gnu/
- DOC "Find the vapi safe lib"
-)
-
-set(SAFE_VAPI_LIBRARIES ${SAFE_VAPI_LIBRARY})
-set(SAFE_VAPI_INCLUDE_DIRS ${SAFE_VAPI_INCLUDE_DIR})
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(VapiSafe DEFAULT_MSG SAFE_VAPI_LIBRARIES SAFE_VAPI_INCLUDE_DIRS)
-
-mark_as_advanced(SAFE_VAPI_LIBRARY SAFE_VAPI_INCLUDE_DIR)
diff --git a/cmake/Modules/FindVpp.cmake b/cmake/Modules/FindVpp.cmake
deleted file mode 100644
index 4f8dba17a..000000000
--- a/cmake/Modules/FindVpp.cmake
+++ /dev/null
@@ -1,95 +0,0 @@
-# Copyright (c) 2017-2019 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-set(VPP_SEARCH_PATH_LIST
- ${VPP_HOME}
- $ENV{VPP_HOME}
- /usr/local
- /opt
- /usr
-)
-
-find_path(VPP_INCLUDE_DIR vnet/vnet.h
- HINTS ${VPP_SEARCH_PATH_LIST}
- PATH_SUFFIXES include
- DOC "Find the VPP includes"
-)
-
-find_library(VPP_LIBRARY_MEMORYCLIENT
- NAMES vlibmemoryclient
- HINTS ${VPP_SEARCH_PATH_LIST}
- PATH_SUFFIXES lib lib64
- DOC "Find the Vpp Memoryclient library"
-)
-
-find_library(VPP_LIBRARY_SVM
- NAMES svm
- HINTS ${VPP_SEARCH_PATH_LIST}
- PATH_SUFFIXES lib lib64
- DOC "Find the Vpp svm library"
-)
-
-find_library(VPP_LIBRARY_INFRA
- NAMES vppinfra
- HINTS ${VPP_SEARCH_PATH_LIST}
- PATH_SUFFIXES lib lib64
- DOC "Find the Vpp infra library"
-)
-
-find_library(VPP_LIBRARY_VNET
- NAMES vnet
- HINTS ${VPP_SEARCH_PATH_LIST}
- PATH_SUFFIXES lib lib64
- DOC "Find the Vpp vnet library"
-)
-
-find_library(VPP_LIBRARY_VATPLUGIN
- NAMES vatplugin
- HINTS ${VPP_SEARCH_PATH_LIST}
- PATH_SUFFIXES lib lib64
- DOC "Find the Vpp vatplugin library"
-)
-
-find_library(VPP_LIBRARY_VLIB
- NAMES vlib
- HINTS ${VPP_SEARCH_PATH_LIST}
- PATH_SUFFIXES lib lib64
- DOC "Find the Vpp vlib library"
-)
-
-find_library(VPP_LIBRARY_VPPAPICLIENT
- NAMES vppapiclient
- HINTS ${VPP_SEARCH_PATH_LIST}
- PATH_SUFFIXES lib lib64
- DOC "Find the Vpp api library"
-)
-
-find_library(VPP_LIBRARY_VAPICLIENT
- NAMES vapiclient
- HINTS ${VPP_SEARCH_PATH_LIST}
- PATH_SUFFIXES lib lib64
- DOC "Find the Vpp vapi library"
-)
-
-find_library(VPP_LIBRARY_VLIBMEMORY
- NAMES vlibmemory
- HINTS ${VPP_SEARCH_PATH_LIST}
- PATH_SUFFIXES lib lib64
- DOC "Find the Vpp vlibmemory library"
-)
-
-set(VPP_LIBRARIES ${VPP_LIBRARY_MEMORYCLIENT} ${VPP_LIBRARY_SVM} ${VPP_LIBRARY_INFRA} ${VPP_LIBRARY_VATPLUGIN} ${VPP_LIBRARY_VLIB} ${VPP_LIBRARY_VNET} ${VPP_LIBRARY_VAPICLIENT} ${VPP_LIBRARY_VLIBMEMORY})
-set(VPP_INCLUDE_DIRS ${VPP_INCLUDE_DIR} ${VPP_INCLUDE_DIR}/vpp_plugins)
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Vpp DEFAULT_MSG VPP_LIBRARIES VPP_INCLUDE_DIRS)
diff --git a/cmake/Modules/GTestImport.cmake b/cmake/Modules/GTestImport.cmake
deleted file mode 100644
index d9d182578..000000000
--- a/cmake/Modules/GTestImport.cmake
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-##################################
-# Download and install GoogleTest
-
-include(ExternalProject)
-ExternalProject_Add(gtest
- URL https://github.com/google/googletest/archive/v1.10.x.zip
- PREFIX ${CMAKE_BINARY_DIR}/gtest
- BUILD_BYPRODUCTS
- ${CMAKE_BINARY_DIR}/gtest/src/gtest-build/lib/libgmock_main.a
- ${CMAKE_BINARY_DIR}/gtest/src/gtest-build/lib/libgmock.a
- ${CMAKE_BINARY_DIR}/gtest/src/gtest-build/lib/libgtest_main.a
- ${CMAKE_BINARY_DIR}/gtest/src/gtest-build/lib/libgtest.a
- INSTALL_COMMAND ""
-)
-
-ExternalProject_Get_Property(gtest source_dir binary_dir)
-
-message (STATUS "GTest include dir: ${source_dir}/googlemock/include ${source_dir}/googletest/include)")
-message (STATUS "GTest libs: ${binary_dir}/lib/libgmock_main.a ${binary_dir}/lib/libgmock.a ${binary_dir}/lib/libgtest_main.a ${binary_dir}/lib/libgtest.a")
-
-set(GTEST_INCLUDE_DIRS ${source_dir}/googlemock/include ${source_dir}/googletest/include)
-set(GTEST_LIBRARIES ${binary_dir}/lib/libgmock_main.a ${binary_dir}/lib/libgmock.a ${binary_dir}/lib/libgtest_main.a ${binary_dir}/lib/libgtest.a)
-
-macro(add_test_internal test)
- if(${CMAKE_VERSION} VERSION_GREATER "3.10.0")
- gtest_discover_tests(${test}-bin TEST_PREFIX new:)
- else()
- add_test(NAME ${test}-bin COMMAND ${test})
- endif()
-endmacro(add_test_internal)
-
-enable_testing()
diff --git a/cmake/Modules/IosMacros.cmake b/cmake/Modules/IosMacros.cmake
deleted file mode 100644
index b1e5cc438..000000000
--- a/cmake/Modules/IosMacros.cmake
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright (c) 2017-2019 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-if(COMPILE_FOR_IOS)
- include_directories(iOS)
-endif()
-
-macro(find_package_wrapper)
- if(COMPILE_FOR_IOS)
- find_host_package(${ARGN})
- else()
- find_package(${ARGN})
- endif()
-endmacro() \ No newline at end of file
diff --git a/cmake/Modules/License.txt b/cmake/Modules/License.txt
deleted file mode 100644
index 4d84c0dc7..000000000
--- a/cmake/Modules/License.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-Copyright (c) 2017-2021 Cisco and/or its affiliates.
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at:
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License. \ No newline at end of file
diff --git a/cmake/Modules/Packager.cmake b/cmake/Modules/Packager.cmake
deleted file mode 100644
index 105952662..000000000
--- a/cmake/Modules/Packager.cmake
+++ /dev/null
@@ -1,344 +0,0 @@
-# Copyright (c) 2017-2019 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#############
-# RPM/DEB/TGZ Packaging utils
-#
-
-set(CONTACT "hicn-dev@lists.fd.io" CACHE STRING "Contact")
-set(PACKAGE_MAINTAINER "ICN Team" CACHE STRING "Maintainer")
-set(PACKAGE_VENDOR "fd.io" CACHE STRING "Vendor")
-
-function(get_next_version VERSION NEXT_VERSION)
- string(REGEX REPLACE "([0-9]+).([0-9]+)" "\\1;\\2" VER_NUMBERS ${VERSION})
-
- # Increment version for getting next version value
- list(GET VER_NUMBERS 0 major)
- list(GET VER_NUMBERS 1 minor)
-
- math(EXPR minor "${minor} + 4")
-
- if (minor GREATER 12)
- math(EXPR minor "${minor} % 12")
- math(EXPR major "${major} + 1")
- endif()
-
- if (minor LESS 10)
- set(minor "0${minor}")
- endif()
-
- set(${NEXT_VERSION} "${major}.${minor}" PARENT_SCOPE)
-endfunction()
-
-macro(extract_version)
- # Extract version from git
- execute_process(
- COMMAND git describe --long --match v*
- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
- OUTPUT_VARIABLE VER
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
-
- if (NOT VER)
- set(VER "v1.2-0-gcafe")
- endif()
- message(STATUS "Git describe output: ${VER}")
-
- string(REGEX REPLACE "v([0-9]+).([0-9]+)-?(.*)?-([0-9]+)-(g[0-9a-f]+)" "\\1;\\2;\\3;\\4;\\5;" VER ${VER})
- list(GET VER 0 VERSION_MAJOR)
- list(GET VER 1 VERSION_MINOR)
- list(GET VER 2 RELEASE_CANDIDATE)
- list(GET VER 3 VERSION_REVISION)
- list(GET VER 4 COMMIT_NAME)
-endmacro(extract_version)
-
-function(make_packages)
- if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
- # parse /etc/os-release
- file(READ "/etc/os-release" os_version)
- string(REPLACE "\n" ";" os_version ${os_version})
- foreach(_ver ${os_version})
- string(REPLACE "=" ";" _ver ${_ver})
- list(GET _ver 0 _name)
- list(GET _ver 1 _value)
- set(OS_${_name} ${_value})
- endforeach()
-
- extract_version()
-
- message(STATUS "Version major: ${VERSION_MAJOR}")
- message(STATUS "Version minor: ${VERSION_MINOR}")
- message(STATUS "Release: ${RELEASE_CANDIDATE}")
- message(STATUS "Revision: ${VERSION_REVISION}")
- message(STATUS "Commit hash: ${COMMIT_NAME}")
-
- set(tag "${VERSION_MAJOR}.${VERSION_MINOR}")
- string(REPLACE "-" "~" tag ${tag})
- set(commit_num ${VERSION_REVISION})
- set(commit_name ${COMMIT_NAME})
-
- if (NOT DEFINED ENV{BUILD_NUMBER})
- set(bld "b1")
- else()
- set(bld "b$ENV{BUILD_NUMBER}")
- endif()
- message(STATUS "Build number is: ${bld}")
-
- #define DEB and RPM version numbers
- if(NOT RELEASE_CANDIDATE)
- if (commit_num)
- set(deb_ver "${tag}.${commit_num}-release")
- set(rpm_ver "${tag}.${commit_num}")
- else()
- set(deb_ver "${tag}-release")
- set(rpm_ver "${tag}")
- endif()
- set(rpm_release "release")
- else()
- # TODO To be changed for next release with
- # set(deb_ver "${tag}${RELEASE_CANDIDATE}~${commit_num}")
- # set(rpm_ver "${tag}")
- # set(rpm_release "${RELEASE_CANDIDATE}~${commit_num}")
- set(deb_ver "${tag}-${commit_num}")
- set(rpm_ver "${tag}-${commit_num}")
- set(rpm_release "1")
- endif()
-
- message(STATUS "Version: ${deb_ver}")
-
- get_next_version(${tag} next_version)
- message(STATUS "Next version: ${next_version}")
-
- get_cmake_property(components COMPONENTS)
- list(REMOVE_ITEM components "Unspecified")
- set(CPACK_COMPONENTS_ALL ${components})
-
- list(LENGTH components N_COMPONENTS)
-
- if (NOT N_COMPONENTS)
- return()
- endif()
-
- if(OS_ID MATCHES "debian" OR OS_ID_LIKE MATCHES "debian")
- set(CPACK_GENERATOR "DEB")
- set(type "DEBIAN")
-
- execute_process(
- COMMAND dpkg --print-architecture
- OUTPUT_VARIABLE arch
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
-
- set(CPACK_${type}_PACKAGE_VERSION "${deb_ver}")
- foreach(lc ${components})
- if (${lc} MATCHES ".*Unspecified.*")
- continue()
- endif()
-
- string(TOUPPER ${lc} uc)
- set(CPACK_${type}_${uc}_FILE_NAME "${lc}_${deb_ver}_${arch}.deb")
-
- set(DEB_DEPS)
- if (NOT ${${lc}_DEB_DEPENDENCIES} STREQUAL "")
- string(REPLACE "stable_version" ${tag} DEB_DEPS ${${lc}_DEB_DEPENDENCIES})
- string(REPLACE "next_version" ${next_version} DEB_DEPS ${DEB_DEPS})
- endif()
-
- set(CPACK_${type}_${uc}_PACKAGE_DEPENDS "${DEB_DEPS}")
- set(CPACK_${type}_${uc}_PACKAGE_NAME "${lc}")
- set(CPACK_COMPONENT_${uc}_DESCRIPTION "${${lc}_DESCRIPTION}")
-
- if (${lc}_DEB_PACKAGE_CONTROL_EXTRA)
- set(CPACK_DEBIAN_${uc}_PACKAGE_CONTROL_EXTRA "${${lc}_DEB_PACKAGE_CONTROL_EXTRA}")
- endif()
- endforeach()
- elseif(OS_ID_LIKE MATCHES "rhel")
- set(CPACK_GENERATOR "RPM")
- set(type "RPM")
-
- execute_process(
- COMMAND uname -m
- OUTPUT_VARIABLE arch
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
-
- set(CPACK_${type}_PACKAGE_VERSION "${rpm_ver}")
- set(CPACK_${type}_PACKAGE_RELEASE "${rpm_release}")
- foreach(lc ${components})
- if (${lc} MATCHES ".*Unspecified.*")
- continue()
- endif()
-
- string(TOUPPER ${lc} uc)
- set(CPACK_${type}_${uc}_DESCRIPTION "${${lc}_DESCRIPTION}")
-
- set(RPM_DEPS)
- if (NOT ${${lc}_RPM_DEPENDENCIES} STREQUAL "")
- string(REPLACE "stable_version" ${tag} RPM_DEPS ${${lc}_RPM_DEPENDENCIES})
- string(REPLACE "next_version" ${next_version} RPM_DEPS ${RPM_DEPS})
- endif()
-
- set(CPACK_${type}_${uc}_PACKAGE_REQUIRES "${RPM_DEPS}")
-
- if(${lc} MATCHES ".*-dev")
- set(package_name ${lc}el)
- else()
- set(package_name ${lc})
- endif()
-
- set(CPACK_RPM_${uc}_PACKAGE_NAME "${package_name}")
- set(CPACK_${type}_${uc}_FILE_NAME "${package_name}-${rpm_ver}-${rpm_release}.${arch}.rpm")
-
- if (NOT ${${lc}_RPM_POST_INSTALL_SCRIPT_FILE} STREQUAL "")
- set(CPACK_RPM_${uc}_POST_INSTALL_SCRIPT_FILE "${${lc}_RPM_POST_INSTALL_SCRIPT_FILE}")
- endif()
-
- if (NOT ${${lc}_RPM_POST_UNINSTALL_SCRIPT_FILE} STREQUAL "")
- set(CPACK_RPM_${uc}_POST_UNINSTALL_SCRIPT_FILE "${${lc}_RPM_POST_UNINSTALL_SCRIPT_FILE}")
- endif()
-
- if (NOT ${${lc}_RPM_PRE_UNINSTALL_SCRIPT_FILE} STREQUAL "")
- set(CPACK_RPM_${uc}_PRE_UNINSTALL_SCRIPT_FILE "${${lc}_RPM_PRE_UNINSTALL_SCRIPT_FILE}")
- endif()
- endforeach()
- endif()
-
- if(CPACK_GENERATOR)
- set(CPACK_PACKAGE_NAME ${ARG_NAME})
- set(CPACK_STRIP_FILES OFF)
- set(CPACK_PACKAGE_VENDOR "${PACKAGE_VENDOR}")
- set(CPACK_COMPONENTS_IGNORE_GROUPS 1)
- set(CPACK_${CPACK_GENERATOR}_COMPONENT_INSTALL ON)
- set(CPACK_${type}_PACKAGE_MAINTAINER "HICN Team")
- set(CPACK_PACKAGE_CONTACT ${CONTACT})
- include(CPack)
- endif()
- elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR ${CMAKE_SYSTEM_NAME} MATCHES "Windows")
- set(CMAKE_SKIP_BUILD_RPATH FALSE)
- set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
- set(CMAKE_INSTALL_RPATH /opt/hicn)
-
- set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
-
- set(CPACK_SET_DESTDIR true)
-
- set(CMAKE_INSTALL_RPATH "\${CPACK_INSTALL_PREFIX}")
- set(CMAKE_SKIP_INSTALL_RPATH FALSE)
- set(HICN_DEPENDECIES_INSTALLER "${LIBTRANSPORT_LIBRARIES_LIST};${FACEMGR_LIBRARY_LIST};${APPS_LIBRARY_LIST}")
- separate_arguments(HICN_DEPENDECIES_INSTALLER)
- foreach (HICN_DEPENDECY ${HICN_DEPENDECIES_INSTALLER})
- get_filename_component(DEPENDENCY_NAME "${HICN_DEPENDECY}" NAME)
- get_filename_component(DEPENDENCY "${HICN_DEPENDECY}" REALPATH)
- get_filename_component(DEPENDENCY_PATH "${DEPENDENCY}" DIRECTORY)
- install(FILES ${DEPENDENCY} DESTINATION lib COMPONENT dependencies)
- endforeach()
- set(CPACK_PACKAGE_NAME "hicn")
- extract_version()
- set(CPACK_PACKAGE_VENDOR "${PACKAGE_VENDOR}")
- set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "hICN")
- set(CPACK_PACKAGE_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}")
- set(CPACK_PACKAGE_VERSION_MAJOR "${VERSION_MAJOR}")
- set(CPACK_PACKAGE_VERSION_MINOR "${VERSION_MINOR}")
- set(CPACK_PACKAGE_VERSION_PATCH "${VERSION_REVISION}")
- set(CPACK_PACKAGE_INSTALL_DIRECTORY "hICN Components")
-
- set(CPACK_COMPONENTS_ALL dependencies ${HICN_UTILS} ${HICN_LIGHT} ${HICN_APPS} ${FACEMGR} lib${LIBTRANSPORT} ${LIBTRANSPORT}-dev lib${LIBHICN} ${LIBHICN}-dev ${HICN_UTILS}-dev ${HICN_LIGHT}-dev ${HICN_APPS}-dev ${FACEMGR}-dev)
- set(CPACK_COMPONENT_DEPENDENCIES_DISPLAY_NAME "Dependencies")
- if (NOT "${HICN_UTILS}" STREQUAL "")
- string(TOUPPER ${HICN_UTILS} HICN_UTILS_UPPERCASE)
- string(TOUPPER ${HICN_UTILS}-dev HICN_UTILS_DEV_UPPERCASE)
- set(CPACK_COMPONENT_${HICN_UTILS_UPPERCASE}_DISPLAY_NAME "hICN utils")
- set(CPACK_COMPONENT_${HICN_UTILS_DEV_UPPERCASE}_DISPLAY_NAME "hicn utils headers")
- set(CPACK_COMPONENT_${HICN_UTILS_UPPERCASE}_GROUP "Executables")
- set(CPACK_COMPONENT_${HICN_UTILS_DEV_UPPERCASE}_GROUP "Headers")
- set(CPACK_COMPONENT_${HICN_UTILS_UPPERCASE}_INSTALL_TYPES Full)
- set(CPACK_COMPONENT_${HICN_UTILS_DEV_UPPERCASE}_INSTALL_TYPES Full)
- endif ()
-
- if (NOT "${HICN_LIGHT}" STREQUAL "")
- string(TOUPPER ${HICN_LIGHT} HICN_LIGHT_UPPERCASE)
- string(TOUPPER ${HICN_LIGHT}-dev HICN_LIGHT_DEV_UPPERCASE)
- set(CPACK_COMPONENT_${HICN_LIGHT_UPPERCASE}_DISPLAY_NAME "hICN light apps")
- set(CPACK_COMPONENT_${HICN_LIGHT_DEV_UPPERCASE}_DISPLAY_NAME "hicn-light headers")
- set(CPACK_COMPONENT_${HICN_LIGHT_UPPERCASE}_GROUP "Executables")
- set(CPACK_COMPONENT_${HICN_LIGHT_DEV_UPPERCASE}_GROUP "Headers")
- set(CPACK_COMPONENT_${HICN_LIGHT_UPPERCASE}_INSTALL_TYPES Full)
- set(CPACK_COMPONENT_${HICN_LIGHT_DEV_UPPERCASE}_INSTALL_TYPES Full)
- endif ()
-
- if (NOT "${HICN_APPS}" STREQUAL "")
- string(TOUPPER ${HICN_APPS} HICN_APPS_UPPERCASE)
- string(TOUPPER ${HICN_APPS}-dev HICN_APPS_DEV_UPPERCASE)
- set(CPACK_COMPONENT_${HICN_APPS_UPPERCASE}_DISPLAY_NAME "hICN apps")
- set(CPACK_COMPONENT_${HICN_APPS_DEV_UPPERCASE}_DISPLAY_NAME "hicn-apps headers")
- set(CPACK_COMPONENT_${HICN_APPS_UPPERCASE}_GROUP "Executables")
- set(CPACK_COMPONENT_${HICN_APPS_DEV_UPPERCASE}_GROUP "Headers")
- set(CPACK_COMPONENT_${HICN_APPS_UPPERCASE}_INSTALL_TYPES Full)
- set(CPACK_COMPONENT_${HICN_APPS_DEV_UPPERCASE}_INSTALL_TYPES Full)
- endif ()
-
- if (NOT "${FACEMGR}" STREQUAL "")
- string(TOUPPER ${FACEMGR} FACEMGR_UPPERCASE)
- string(TOUPPER ${FACEMGR}-dev FACEMGR_DEV_UPPERCASE)
- set(CPACK_COMPONENT_${FACEMGR_UPPERCASE}_DISPLAY_NAME "facemgr")
- set(CPACK_COMPONENT_${FACEMGR_DEV_UPPERCASE}_DISPLAY_NAME "facemgr headers")
- set(CPACK_COMPONENT_${FACEMGR_UPPERCASE}_GROUP "Executables")
- set(CPACK_COMPONENT_${FACEMGR_DEV_UPPERCASE}_GROUP "Headers")
- set(CPACK_COMPONENT_${FACEMGR_UPPERCASE}_INSTALL_TYPES Full)
- set(CPACK_COMPONENT_${FACEMGR_DEV_UPPERCASE}_INSTALL_TYPES Full)
- endif ()
-
- if (NOT "${LIBTRANSPORT}" STREQUAL "")
- string(TOUPPER lib${LIBTRANSPORT} LIBTRANSPORT_UPPERCASE)
- string(TOUPPER ${LIBTRANSPORT}-dev LIBTRANSPORT_DEV_UPPERCASE)
- set(CPACK_COMPONENT_${LIBTRANSPORT_UPPERCASE}_DISPLAY_NAME "libtransport libs")
- set(CPACK_COMPONENT_${LIBTRANSPORT_DEV_UPPERCASE}_DISPLAY_NAME "libtransport headers")
- set(CPACK_COMPONENT_${LIBTRANSPORT_UPPERCASE}_GROUP "Libraries")
- set(CPACK_COMPONENT_${LIBTRANSPORT_DEV_UPPERCASE}_GROUP "Headers")
- set(CPACK_COMPONENT_${LIBTRANSPORT_UPPERCASE}_INSTALL_TYPES Full)
- set(CPACK_COMPONENT_${LIBTRANSPORT_DEV_UPPERCASE}_INSTALL_TYPES Full)
- endif ()
-
- if (NOT "${LIBHICN}" STREQUAL "")
- string(TOUPPER lib${LIBHICN} LIBHICN_UPPERCASE)
- string(TOUPPER ${LIBHICN}-dev LIBHICN_DEV_UPPERCASE)
- set(CPACK_COMPONENT_${LIBHICN_UPPERCASE}_DISPLAY_NAME "hicn libs")
- set(CPACK_COMPONENT_${LIBHICN_DEV_UPPERCASE}_DISPLAY_NAME "hicn headers")
- set(CPACK_COMPONENT_${LIBHICN_UPPERCASE}_GROUP "Libraries")
- set(CPACK_COMPONENT_${LIBHICN_DEV_UPPERCASE}_GROUP "Headers")
- set(CPACK_COMPONENT_${LIBHICN_UPPERCASE}_INSTALL_TYPES Full)
- set(CPACK_COMPONENT_${LIBHICN_DEV_UPPERCASE}_INSTALL_TYPES Full)
- endif ()
-
- set (CPACK_RESOURCE_FILE_LICENSE
- "${PROJECT_SOURCE_DIR}/cmake/Modules/License.txt")
- set(CPACK_COMPONENT_DEPENDENCIES_DESCRIPTION
- "All dependency libreries")
- set(CPACK_COMPONENT_DEPENDENCIES_GROUP "Dependencies")
- set(CPACK_COMPONENT_GROUP_DEVELOPMENT_EXPANDED ON)
- set(CPACK_COMPONENT_GROUP_DEPENDENCIES_DESCRIPTION
- "All dependency libreries")
- set(CPACK_ALL_INSTALL_TYPES Full Developer)
- set(CPACK_INSTALL_TYPE_FULL_DISPLAY_NAME "Everything")
- if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
- set(CMAKE_INSTALL_RPATH /opt/hicn)
-
- set(CPACK_INSTALL_PREFIX "/opt/hicn")
- set(CPACK_GENERATOR productbuild)
- set( CPACK_PRE_BUILD_SCRIPTS "${PROJECT_SOURCE_DIR}/cmake/Modules/PostInstall.cmake")
- else()
- set(CPACK_INSTALL_PREFIX "c:/Program Files/hicn")
- endif()
- include(CPack)
- endif()
-endfunction()
diff --git a/cmake/Modules/PostInstall.cmake b/cmake/Modules/PostInstall.cmake
deleted file mode 100644
index 89c7b9f68..000000000
--- a/cmake/Modules/PostInstall.cmake
+++ /dev/null
@@ -1,83 +0,0 @@
-function(change_rpath LIB_PATH TYPE)
- execute_process (
- COMMAND bash -c "ls ${LIB_PATH}"
- OUTPUT_VARIABLE ITEMS
- )
- string(REPLACE "\n" ";" ITEMS ${ITEMS})
-
- separate_arguments(ITEMS)
- foreach (ITEM ${ITEMS})
- if (NOT ITEM MATCHES ".a$")
- if (TYPE STREQUAL "LIB")
- execute_process (
- COMMAND bash -c "otool -L ${LIB_PATH}/${ITEM} | head -2 | tail -1| sed -e 's/^[[:space:]]*//'|awk '{print $1;}'"
- OUTPUT_VARIABLE OTOOL_OUTPUT
- )
- string(REPLACE "\n" "" OTOOL_OUTPUT ${OTOOL_OUTPUT})
-
- execute_process (
- COMMAND bash -c "basename ${OTOOL_OUTPUT}| sed -e 's/^[[:space:]]*//'"
- OUTPUT_VARIABLE BASENAME
- )
- string(REPLACE "\n" "" BASENAME ${BASENAME})
- execute_process (
- COMMAND bash -c "install_name_tool -id ${CPACK_INSTALL_PREFIX}/${BASENAME} ${LIB_PATH}/${ITEM}"
- OUTPUT_VARIABLE OUTPUT_INSTALL_NAME_TOOL
- )
- #change rpath
- execute_process (
- COMMAND bash -c "otool -L ${LIB_PATH}/${ITEM} | tail -n +3| sed -e 's/^[[:space:]]*//'|awk '{print $1;}'"
- OUTPUT_VARIABLE OTOOL_OUTPUTS
- )
- else ()
- #change rpath
- execute_process (
- COMMAND bash -c "otool -L ${LIB_PATH}/${ITEM} | tail -n +2| sed -e 's/^[[:space:]]*//'|awk '{print $1;}'"
- OUTPUT_VARIABLE OTOOL_OUTPUTS
- )
- endif ()
- string(REPLACE "\n" ";" OTOOL_OUTPUTS ${OTOOL_OUTPUTS})
- separate_arguments(OTOOL_OUTPUTS)
- foreach (OTOOL_OUTPUT ${OTOOL_OUTPUTS})
- execute_process (
- COMMAND bash -c "basename ${OTOOL_OUTPUT}| sed -e 's/^[[:space:]]*//'"
- OUTPUT_VARIABLE BASENAME
- )
- string(REPLACE "\n" "" BASENAME ${BASENAME})
- execute_process (
- COMMAND bash -c "dirname ${OTOOL_OUTPUT}| sed -e 's/^[[:space:]]*//'"
- OUTPUT_VARIABLE DIRNAME
- )
- string(REPLACE "\n" "" DIRNAME ${DIRNAME})
- if(NOT DIRNAME MATCHES "/usr/lib")
- execute_process (
- COMMAND bash -c "install_name_tool -change ${OTOOL_OUTPUT} ${CPACK_INSTALL_PREFIX}/${BASENAME} ${LIB_PATH}/${ITEM}"
- OUTPUT_VARIABLE OUTPUT_INSTALL_NAME_TOOL
- )
- endif()
-
- endforeach()
- endif()
- endforeach()
-endfunction()
-string(TOLOWER ${CPACK_COMPONENT_DEPENDENCIES_GROUP} CPACK_COMPONENT_DEPENDENCIES_GROUP )
-set(LIB_PATH "${CPACK_TEMPORARY_DIRECTORY}/${CPACK_COMPONENT_DEPENDENCIES_GROUP}${CPACK_INSTALL_PREFIX}/lib")
-change_rpath(${LIB_PATH} LIB)
-
-set(LIB_PATH "${CPACK_TEMPORARY_DIRECTORY}/facemgr${CPACK_INSTALL_PREFIX}/lib")
-change_rpath(${LIB_PATH} LIB)
-set(LIB_PATH "${CPACK_TEMPORARY_DIRECTORY}/libhicntransport${CPACK_INSTALL_PREFIX}/lib")
-change_rpath(${LIB_PATH} LIB)
-set(LIB_PATH "${CPACK_TEMPORARY_DIRECTORY}/libhicn${CPACK_INSTALL_PREFIX}/lib")
-change_rpath(${LIB_PATH} LIB)
-
-set(EXE_PATH "${CPACK_TEMPORARY_DIRECTORY}/hicn-utils${CPACK_INSTALL_PREFIX}/bin")
-change_rpath(${EXE_PATH} EXE)
-set(EXE_PATH "${CPACK_TEMPORARY_DIRECTORY}/hicn-light${CPACK_INSTALL_PREFIX}/bin")
-change_rpath(${EXE_PATH} EXE)
-set(EXE_PATH "${CPACK_TEMPORARY_DIRECTORY}/hicn-apps${CPACK_INSTALL_PREFIX}/bin")
-change_rpath(${EXE_PATH} EXE)
-set(EXE_PATH "${CPACK_TEMPORARY_DIRECTORY}/facemgr${CPACK_INSTALL_PREFIX}/bin")
-change_rpath(${EXE_PATH} EXE)
-#set(EXE_PATH "${CPACK_TEMPORARY_DIRECTORY}/hicnctrl${CPACK_INSTALL_PREFIX}/bin")
-#change_rpath(${EXE_PATH} EXE)
diff --git a/cmake/Modules/ServiceScript.cmake b/cmake/Modules/ServiceScript.cmake
deleted file mode 100644
index 8e7056a5a..000000000
--- a/cmake/Modules/ServiceScript.cmake
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright (c) 2019 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-########################################
-#
-# Find the LongBow libraries and includes
-# This module sets:
-# SYSTEMD_FOUND: True if Systemd was found
-# SYSTEMD_SERVICES_INSTALL_DIR: The Systemd install directory
-
-set(SYSTEMD_SERVICE_FOLDER "/lib/systemd/system")
-
-macro(install_service_script script)
-cmake_parse_arguments(ARG
- ""
- "COMPONENT"
- ""
- ${ARGN}
-)
-
- # Install service file only if
- # 1) We are on a linux system
- # 2) The installation prefix is /usr
-
- if (NOT ARG_COMPONENT)
- set(ARG_COMPONENT hicn)
- endif()
-
- if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND ${CMAKE_INSTALL_PREFIX} STREQUAL "/usr")
- install (FILES ${script} DESTINATION ${SYSTEMD_SERVICE_FOLDER} COMPONENT ${ARG_COMPONENT})
- endif()
-endmacro(install_service_script)
diff --git a/cmake/Modules/WindowsMacros.cmake b/cmake/Modules/WindowsMacros.cmake
deleted file mode 100644
index 0b34cde19..000000000
--- a/cmake/Modules/WindowsMacros.cmake
+++ /dev/null
@@ -1,33 +0,0 @@
-# Copyright (c) 2017-2019 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-if(WIN32)
- find_package(LibEvent REQUIRED)
- find_package(OpenSSL REQUIRED)
- find_package(PThread REQUIRED)
- find_library(WSOCK32_LIBRARY wsock32 required)
- find_library(WS2_32_LIBRARY ws2_32 required)
- list(APPEND WINDOWS_LIBRARIES
- ${LIBEVENT_LIBRARIES}
- ${OPENSSL_LIBRARIES}
- ${PTHREAD_LIBRARIES}
- ${WSOCK32_LIBRARY}
- ${WS2_32_LIBRARY}
- )
-
- list(APPEND WINDOWS_INCLUDE_DIRS
- ${LIBEVENT_INCLUDE_DIRS}
- ${OPENSSL_INCLUDE_DIR}
- ${PTHREAD_INCLUDE_DIRS}
- )
-endif() \ No newline at end of file
diff --git a/cmake/Modules/detectCacheSize.cmake b/cmake/Modules/detectCacheSize.cmake
deleted file mode 100644
index a8209bb27..000000000
--- a/cmake/Modules/detectCacheSize.cmake
+++ /dev/null
@@ -1,21 +0,0 @@
-# Detect the cache size
-#
-# XXX: TODO: This is a bug when cross compiling. We are detecting the local
-# Cache Line size and not the target cache line size. We should provide some
-# way to define this
-
-set(LEVEL1_DCACHE_LINESIZE 32)
-
-if( APPLE )
- execute_process(COMMAND sysctl -n hw.cachelinesize
- OUTPUT_VARIABLE LEVEL1_DCACHE_LINESIZE
- OUTPUT_STRIP_TRAILING_WHITESPACE)
-endif( APPLE )
-
-if( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" )
- execute_process(COMMAND getconf LEVEL1_DCACHE_LINESIZE
- OUTPUT_VARIABLE LEVEL1_DCACHE_LINESIZE
- OUTPUT_STRIP_TRAILING_WHITESPACE)
-endif()
-
-message(STATUS "Cache line size: ${LEVEL1_DCACHE_LINESIZE}")