summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorMauro Sardara <msardara+fdio@cisco.com>2017-02-22 14:37:37 +0100
committerMauro Sardara <msardara+fdio@cisco.com>2017-02-22 13:46:08 +0000
commitba8541cad3a4069886444abbd1848b6ef3fff72c (patch)
tree39226dd9b036ca7e513c2cccd8e71e15e09b86bc /cmake
parent9b30fc10fb1cbebe651e5a107e8ca5b24de54675 (diff)
Initial Commit: libicnet
Change-Id: I10a72cb0d84b76553a85c168416b847f6a4ff5f6 Signed-off-by: Mauro Sardara <msardara+fdio@cisco.com>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Modules/FindCCNX_Common.cmake52
-rw-r--r--cmake/Modules/FindCCNX_Portal.cmake53
-rw-r--r--cmake/Modules/FindCCNX_Transport_Rta.cmake63
-rw-r--r--cmake/Modules/FindLibparc.cmake52
-rw-r--r--cmake/Modules/FindLongBow.cmake58
-rw-r--r--cmake/Modules/version.cmake28
6 files changed, 306 insertions, 0 deletions
diff --git a/cmake/Modules/FindCCNX_Common.cmake b/cmake/Modules/FindCCNX_Common.cmake
new file mode 100644
index 00000000..da5a4119
--- /dev/null
+++ b/cmake/Modules/FindCCNX_Common.cmake
@@ -0,0 +1,52 @@
+# Copyright (c) 2017 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:
+# CCNX_COMMON_FOUND: True if Libparc was found
+# CCNX_COMMON_LIBRARY: The Libparc library
+# CCNX_COMMON_LIBRARIES: The Libparc library and dependencies
+# CCNX_COMMON_INCLUDE_DIR: The Libparc include dir
+#
+
+set(CCNX_COMMON_SEARCH_PATH_LIST
+ ${CCNX_COMMON_HOME}
+ $ENV{CCNX_COMMON_HOME}
+ $ENV{CCNX_HOME}
+ $ENV{PARC_HOME}
+ $ENV{FOUNDATION_HOME}
+ /usr/local/parc
+ /usr/local/ccnx
+ /usr/local/ccn
+ /usr/local
+ /opt
+ /usr
+ )
+
+find_path(CCNX_COMMON_INCLUDE_DIR ccnx/common/libccnxCommon_About.h
+ HINTS ${CCNX_COMMON_SEARCH_PATH_LIST}
+ PATH_SUFFIXES include
+ DOC "Find the Libccnx-common includes")
+
+find_library(CCNX_COMMON_LIBRARY NAMES ccnx_common
+ HINTS ${CCNX_COMMON_SEARCH_PATH_LIST}
+ PATH_SUFFIXES lib
+ DOC "Find the Libccnx-common libraries")
+
+set(CCNX_COMMON_LIBRARIES ${CCNX_COMMON_LIBRARY})
+set(CCNX_COMMON_INCLUDE_DIRS ${CCNX_COMMON_INCLUDE_DIR})
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(CCNX_Common DEFAULT_MSG CCNX_COMMON_LIBRARY CCNX_COMMON_INCLUDE_DIR)
diff --git a/cmake/Modules/FindCCNX_Portal.cmake b/cmake/Modules/FindCCNX_Portal.cmake
new file mode 100644
index 00000000..d7aa9066
--- /dev/null
+++ b/cmake/Modules/FindCCNX_Portal.cmake
@@ -0,0 +1,53 @@
+# Copyright (c) 2017 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 Libccnx-transport libraries and includes
+# This module sets:
+# CCNX_PORTAL_FOUND: True if Libparc was found
+# CCNX_PORTAL_LIBRARY: The Libparc library
+# CCNX_PORTAL_LIBRARIES: The Libparc library and dependencies
+# CCNX_PORTAL_INCLUDE_DIR: The Libparc include dir
+#
+
+set(CCNX_PORTAL_SEARCH_PATH_LIST
+ ${CCNX_PORTAL_HOME}
+ $ENV{CCNX_PORTAL_HOME}
+ $ENV{CCNX_HOME}
+ $ENV{PARC_HOME}
+ $ENV{FOUNDATION_HOME}
+ /usr/local/parc
+ /usr/local/ccnx
+ /usr/local/ccn
+ /usr/local
+ /opt
+ /usr
+ )
+
+find_path(CCNX_PORTAL_INCLUDE_DIR ccnx/api/ccnx_Portal/ccnxPortal_About.h
+ HINTS ${CCNX_PORTAL_SEARCH_PATH_LIST}
+ PATH_SUFFIXES include
+ DOC "Find the Libccnx-portal includes")
+
+find_library(CCNX_PORTAL_LIBRARY NAMES ccnx_api_portal
+ HINTS ${CCNX_PORTAL_SEARCH_PATH_LIST}
+ PATH_SUFFIXES lib
+ DOC "Find the Libccnx-portal libraries")
+
+set(CCNX_PORTAL_LIBRARIES ${CCNX_PORTAL_LIBRARY})
+
+set(CCNX_PORTAL_INCLUDE_DIRS ${CCNX_PORTAL_INCLUDE_DIR})
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(CCNX_Portal DEFAULT_MSG CCNX_PORTAL_LIBRARY CCNX_PORTAL_INCLUDE_DIR)
diff --git a/cmake/Modules/FindCCNX_Transport_Rta.cmake b/cmake/Modules/FindCCNX_Transport_Rta.cmake
new file mode 100644
index 00000000..bc0b0428
--- /dev/null
+++ b/cmake/Modules/FindCCNX_Transport_Rta.cmake
@@ -0,0 +1,63 @@
+# Copyright (c) 2017 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 Libccnx-transport libraries and includes
+# This module sets:
+# CCNX_TRANSPORT_RTA_FOUND: True if Libparc was found
+# CCNX_TRANSPORT_RTA_LIBRARY: The Libparc library
+# CCNX_TRANSPORT_RTA_LIBRARIES: The Libparc library and dependencies
+# CCNX_TRANSPORT_RTA_INCLUDE_DIR: The Libparc include dir
+#
+
+set(CCNX_TRANSPORT_RTA_SEARCH_PATH_LIST
+ ${CCNX_TRANSPORT_RTA_HOME}
+ $ENV{CCNX_TRANSPORT_RTA_HOME}
+ $ENV{CCNX_HOME}
+ $ENV{PARC_HOME}
+ $ENV{FOUNDATION_HOME}
+ /usr/local/parc
+ /usr/local/ccnx
+ /usr/local/ccn
+ /usr/local
+ /opt
+ /usr
+ )
+
+find_path(CCNX_TRANSPORT_RTA_INCLUDE_DIR ccnx/transport/librta_About.h
+ HINTS ${CCNX_TRANSPORT_RTA_SEARCH_PATH_LIST}
+ PATH_SUFFIXES include
+ DOC "Find the Libccnx-transport-rta includes")
+
+find_library(CCNX_TRANSPORT_RTA_LIBRARY NAMES ccnx_transport_rta
+ HINTS ${CCNX_TRANSPORT_RTA_SEARCH_PATH_LIST}
+ PATH_SUFFIXES lib
+ DOC "Find the Libccnx-transport-rta libraries")
+
+find_library(CCNX_API_NOTIFY_LIBRARY NAMES ccnx_api_notify
+ HINTS ${CCNX_TRANSPORT_RTA_SEARCH_PATH_LIST}
+ PATH_SUFFIXES lib
+ DOC "Find the Libccnx-transport-rta libraries")
+
+find_library(CCNX_API_CONTROL_LIBRARY NAMES ccnx_api_control
+ HINTS ${CCNX_TRANSPORT_RTA_SEARCH_PATH_LIST}
+ PATH_SUFFIXES lib
+ DOC "Find the Libccnx-transport-rta libraries")
+
+set(CCNX_TRANSPORT_RTA_LIBRARIES ${CCNX_TRANSPORT_RTA_LIBRARY} ${CCNX_API_CONTROL_LIBRARY} ${CCNX_API_NOTIFY_LIBRARY})
+
+set(CCNX_TRANSPORT_RTA_INCLUDE_DIRS ${CCNX_TRANSPORT_RTA_INCLUDE_DIR})
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(CCNX_Transport_Api DEFAULT_MSG CCNX_TRANSPORT_RTA_LIBRARY CCNX_TRANSPORT_RTA_INCLUDE_DIR)
diff --git a/cmake/Modules/FindLibparc.cmake b/cmake/Modules/FindLibparc.cmake
new file mode 100644
index 00000000..da8b3af7
--- /dev/null
+++ b/cmake/Modules/FindLibparc.cmake
@@ -0,0 +1,52 @@
+# Copyright (c) 2017 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}
+ $ENV{CCNX_HOME}
+ $ENV{PARC_HOME}
+ $ENV{FOUNDATION_HOME}
+ /usr/local/parc
+ /usr/local/ccnx
+ /usr/local/ccn
+ /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)
diff --git a/cmake/Modules/FindLongBow.cmake b/cmake/Modules/FindLongBow.cmake
new file mode 100644
index 00000000..28d0b3b1
--- /dev/null
+++ b/cmake/Modules/FindLongBow.cmake
@@ -0,0 +1,58 @@
+# Copyright (c) 2017 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{CCNX_HOME}
+ $ENV{PARC_HOME}
+ $ENV{FOUNDATION_HOME}
+ /usr/local/parc
+ /usr/local/ccnx
+ /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/version.cmake b/cmake/Modules/version.cmake
new file mode 100644
index 00000000..9ff36099
--- /dev/null
+++ b/cmake/Modules/version.cmake
@@ -0,0 +1,28 @@
+# Copyright (c) 2017 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.
+
+#
+# Get a version to pass on the command line
+#
+execute_process(COMMAND ${PROJECT_SOURCE_DIR}/cmake/get_version.sh ../../../..
+ OUTPUT_VARIABLE RELEASE_VERSION
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+execute_process(COMMAND date -u +%Y-%m-%dT%H:%M:%SZ
+ OUTPUT_VARIABLE ISO_DATE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+MESSAGE(STATUS "Configuring version ${RELEASE_VERSION}")
+
+add_definitions("-DRELEASE_VERSION=\"${RELEASE_VERSION}\"")
+