*/
#include "config.hpp"
-#include "netlink.hpp"
-#include "utils.hpp"
+#include "netlink/netlink.hpp"
#include "utils/exception.hpp"
#include "utils/make-clean.hpp"
#include "utils/environment.hpp"
MESSAGE(STATUS "Generating makefile for the liblxcpp...")
FILE(GLOB HEADERS *.hpp)
FILE(GLOB HEADERS_UTILS ${COMMON_FOLDER}/utils/fd-utils.hpp
- ${COMMON_FOLDER}/utils/exception.hpp)
+ ${COMMON_FOLDER}/utils/exception.hpp
+ ${COMMON_FOLDER}/utils/channel.hpp
+ ${COMMON_FOLDER}/utils/environment.hpp
+ ${COMMON_FOLDER}/utils/execute.hpp)
+FILE(GLOB HEADERS_NETLINK ${COMMON_FOLDER}/netlink/*.hpp)
FILE(GLOB SRCS *.cpp *.hpp)
FILE(GLOB SRCS_UTILS ${COMMON_FOLDER}/utils/fd-utils.cpp
- ${COMMON_FOLDER}/utils/exception.cpp)
+ ${COMMON_FOLDER}/utils/exception.cpp
+ ${COMMON_FOLDER}/utils/channel.cpp
+ ${COMMON_FOLDER}/utils/environment.cpp
+ ${COMMON_FOLDER}/utils/execute.cpp)
+FILE(GLOB SRCS_NETLINK ${COMMON_FOLDER}/netlink/*.cpp)
SET(_LIB_VERSION_ "${VERSION}")
SET(_LIB_SOVERSION_ "0")
SET(PC_FILE "lib${PROJECT_NAME}.pc")
## Setup target ################################################################
-ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS} ${SRCS_UTILS})
+ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS} ${SRCS_UTILS} ${SRCS_NETLINK})
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES
SOVERSION ${_LIB_SOVERSION_}
VERSION ${_LIB_VERSION_}
DESTINATION ${INCLUDE_INSTALL_DIR}/lxcpp)
INSTALL(FILES ${HEADERS_UTILS}
DESTINATION ${INCLUDE_INSTALL_DIR}/lxcpp/utils)
+INSTALL(FILES ${HEADERS_NETLINK}
+ DESTINATION ${INCLUDE_INSTALL_DIR}/lxcpp/netlink)
FILE(GLOB server_SRCS ${SERVER_FOLDER}/*.cpp ${SERVER_FOLDER}/*.hpp)
FILE(GLOB client_SRCS ${CLIENT_FOLDER}/*.cpp ${CLIENT_FOLDER}/*.h)
FILE(GLOB socket_test_SRCS ${SOCKET_TEST_FOLDER}/*.cpp ${SOCKET_TEST_FOLDER}/*.hpp)
+FILE(GLOB lxcpp_test_SRCS lxcpp/lxcpp-api-compile-test.cpp)
FILE(GLOB main_SRC ${SERVER_FOLDER}/main.cpp)
LIST(REMOVE_ITEM server_SRCS ${main_SRC})
# We must compile socket-test separately, exclude it from unit-test build
-LIST(REMOVE_ITEM project_SRCS ${socket_test_SRCS})
+LIST(REMOVE_ITEM project_SRCS ${socket_test_SRCS} ${lxcpp_test_SRCS})
## Setup target ################################################################
## A fake target to test vasum-client C API
ADD_EXECUTABLE("vasum-client-c-api-compile-test" client/client-c-api-compile-test.c)
+## A fake target to test lxcpp API
+ADD_EXECUTABLE("lxcpp-api-compile-test" lxcpp/lxcpp-api-compile-test.cpp)
+TARGET_LINK_LIBRARIES("lxcpp-api-compile-test" lxcpp)
+
IF(NOT WITHOUT_SYSTEMD)
SET(SOCKET_TEST_CODENAME "${PROJECT_NAME}-socket-test")
--- /dev/null
+/*
+ * Copyright (C) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/**
+ * @file
+ * @author Krzysztof Dynowski (k.dynowski@samsumg.com)
+ * @brief Test compilation and linking with lxcpp library
+ */
+
+#include "lxcpp/lxcpp.hpp"
+
+using namespace lxcpp;
+
+int main(int /*argc*/, const char * /*argv*/ [])
+{
+ Container* c = createContainer();
+ delete c;
+}