aboutsummaryrefslogtreecommitdiffstats
path: root/src/scvpp/CMakeLists.txt
diff options
context:
space:
mode:
authorYohanPipereau <ypiperea@cisco.com>2019-03-12 14:15:26 +0100
committerHongjun Ni <hongjun.ni@intel.com>2019-03-18 00:51:36 +0000
commitd7680154981c54989bcbcab81173791dc1805512 (patch)
tree5a1e807c0cb91d478eca43d0f673daa4006fa124 /src/scvpp/CMakeLists.txt
parentf8118bf32a5e5276f796c3f03095c2ee1a41423a (diff)
Fix Cmake build environment and harden Warnings
-Remove unused sweetcomb CmakeList.txt Warnings -Add more Warnings to plugins, scvpp and gNMI Cmake projects -Remove unused/useless Cmake options in CmakeList files & add comments -Improve gNMI CMakeList.txt and make it independant of a gRPC cmake build for later package integration. -Add FindGRPC.cmake -Remove the use of CXX17 variant and use a dedicated Cmake module for gRPC Change-Id: Iafa3c031d12802e8d8c914cbce6b119c2a5c4800 Signed-off-by: Yohan Pipereau <ypiperea@cisco.com>
Diffstat (limited to 'src/scvpp/CMakeLists.txt')
-rw-r--r--src/scvpp/CMakeLists.txt18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/scvpp/CMakeLists.txt b/src/scvpp/CMakeLists.txt
index 1256fc8..2dc42d6 100644
--- a/src/scvpp/CMakeLists.txt
+++ b/src/scvpp/CMakeLists.txt
@@ -16,8 +16,8 @@
cmake_minimum_required(VERSION 2.8)
project(scvpp)
-# add subdirectories
-add_subdirectory(src)
+# DEPENDENCIES
+##############
# enable testing if requested and possible
SET(ENABLE_TESTS 1 CACHE BOOL "Enable unit tests.")
@@ -32,9 +32,21 @@ if(ENABLE_TESTS)
endif(CMOCKA_FOUND)
endif(ENABLE_TESTS)
-find_package(PkgConfig QUIET)
+# COMPILER & LINKER & INSTALL
+#############################
+
+#define CMAKE_INSTALL_LIBDIR/INCLUDEDIR
+include(GNUInstallDirs)
+
+add_subdirectory(src)
+
+# MORE INSTALL
+##############
+
+find_package(PkgConfig QUIET) #QUIET disables message if not found
if(PKG_CONFIG_FOUND)
# generate and install pkg-config file
configure_file("libscvpp.pc.in" "libscvpp.pc" @ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libscvpp.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
endif()
+