aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/Modules
diff options
context:
space:
mode:
authorMauro Sardara <msardara+fdio@cisco.com>2017-02-22 23:24:21 +0100
committerMauro Sardara <msardara+fdio@cisco.com>2017-02-22 23:24:21 +0100
commit975b5709addd72cba7184f94f2805f1c42e07dbe (patch)
treef89f813f04f6ba3f7558ba7bb9f07df1f9bdccef /cmake/Modules
parent9b30fc10fb1cbebe651e5a107e8ca5b24de54675 (diff)
First commit: http-server
Change-Id: Ia527fe3065016404b0ea752ddc9e15c96288ed86 Signed-off-by: Mauro Sardara <msardara+fdio@cisco.com>
Diffstat (limited to 'cmake/Modules')
-rw-r--r--cmake/Modules/FindLibicnet.cmake39
-rw-r--r--cmake/Modules/version.cmake15
2 files changed, 54 insertions, 0 deletions
diff --git a/cmake/Modules/FindLibicnet.cmake b/cmake/Modules/FindLibicnet.cmake
new file mode 100644
index 00000000..3c9c4f5f
--- /dev/null
+++ b/cmake/Modules/FindLibicnet.cmake
@@ -0,0 +1,39 @@
+########################################
+#
+# Find the Libparc libraries and includes
+# This module sets:
+# LIBICNET_FOUND: True if Libconsumer-producer was found
+# LIBICNETR_LIBRARY: The Libconsumer-producer library
+# LIBICNET_LIBRARIES: The Libconsumer-producer library and dependencies
+# LIBICNET_INCLUDE_DIR: The Libconsumer-producer include dir
+#
+
+set(LIBICNET_SEARCH_PATH_LIST
+ ${LIBICNET_HOME}
+ $ENV{LIBICNETHOME}
+ $ENV{CCNX_HOME}
+ $ENV{PARC_HOME}
+ $ENV{FOUNDATION_HOME}
+ /usr/local/parc
+ /usr/local/ccnx
+ /usr/local/ccn
+ /usr/local
+ /opt
+ /usr
+ )
+
+find_path(LIBICNET_INCLUDE_DIR icnet/icnet_common.h
+ HINTS ${LIBICNET_SEARCH_PATH_LIST}
+ PATH_SUFFIXES include
+ DOC "Find the libicnet includes")
+
+find_library(LIBICNET_LIBRARY NAMES icnet
+ HINTS ${LIBICNET_SEARCH_PATH_LIST}
+ PATH_SUFFIXES lib
+ DOC "Find the libicnet libraries")
+
+set(LIBICNET_LIBRARIES ${LIBICNET_LIBRARY})
+set(LIBICNET_INCLUDE_DIRS ${LIBICNET_INCLUDE_DIR})
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Libicnet DEFAULT_MSG LIBICNET_LIBRARY LIBICNET_INCLUDE_DIR)
diff --git a/cmake/Modules/version.cmake b/cmake/Modules/version.cmake
new file mode 100644
index 00000000..44a41099
--- /dev/null
+++ b/cmake/Modules/version.cmake
@@ -0,0 +1,15 @@
+#
+# Get a version to pass on the command line
+#
+execute_process(COMMAND ${PROJECT_SOURCE_DIR}/cmake/get_version.sh ${PROJECT_SOURCE_DIR}
+ 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}\"")
+