File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11add_subdirectory (src )
22
3- install (DIRECTORY include/ DESTINATION include)
3+ configure_file (libpolycube.pc.in ${CMAKE_CURRENT_BINARY_DIR} /libpolycube.pc @ONLY )
4+
5+ install (DIRECTORY include/ DESTINATION /usr/include)
6+
7+ install (FILES ${CMAKE_CURRENT_BINARY_DIR} /libpolycube.pc
8+ DESTINATION ${CMAKE_INSTALL_LIBDIR} /pkgconfig)
Original file line number Diff line number Diff line change 1616
1717#pragma once
1818
19- #include < spdlog/spdlog.h>
19+ #include " spdlog/spdlog.h"
2020#include < string>
2121
2222namespace polycube {
Original file line number Diff line number Diff line change 1919#include < map>
2020#include < string>
2121
22- #include < spdlog/sinks/rotating_file_sink.h>
23- #include < spdlog/sinks/stdout_sinks.h>
24- #include < spdlog/spdlog.h>
22+ #include " spdlog/sinks/rotating_file_sink.h"
23+ #include " spdlog/sinks/stdout_sinks.h"
24+ #include " spdlog/spdlog.h"
2525
2626#include " polycube/common.h"
2727
Original file line number Diff line number Diff line change 1919#include < map>
2020#include < string>
2121
22- #include < spdlog/sinks/rotating_file_sink.h>
23- #include < spdlog/sinks/stdout_sinks.h>
24- #include < spdlog/spdlog.h>
25-
26- #include " polycube/common.h"
27-
28- #include " polycube/services/cube_factory.h"
2922#include " polycube/services/port.h"
3023#include " polycube/services/utils.h"
3124
Original file line number Diff line number Diff line change 1+ prefix=@CMAKE_INSTALL_PREFIX@
2+ libdir=${prefix}/lib
3+ includedir=/usr/include
4+
5+ Name: libpolycube
6+ Version: @REVISION@
7+ Description: Polycube library
8+ Requires:
9+ Requires.private: libtins
10+ Libs: -L${libdir} -lpolycube -luuid -ltins
11+ Cflags: -I${includedir} -I${includedir}/polycube
Original file line number Diff line number Diff line change 1- install (DIRECTORY spdlog DESTINATION include/polycube)
1+ install (DIRECTORY spdlog DESTINATION /usr/ include/polycube)
Original file line number Diff line number Diff line change 11include_directories (${CMAKE_SOURCE_DIR} /src/libs/polycube/include )
22include_directories (${CMAKE_SOURCE_DIR} /src/libs/spdlog )
33
4+ set (POLYCUBE_STANDALONE_SERVICE false )
5+ set (POLYCUBE_LIBRARIES polycube uuid tins)
6+
47set (LOAD_SERVICES "" PARENT_SCOPE )
58
69macro (add_service servicename servicefolder )
Original file line number Diff line number Diff line change @@ -8,6 +8,12 @@ include_directories(serializer)
88include_directories (interface )
99include_directories (default-src )
1010
11+ if (POLYCUBE_STANDALONE_SERVICE)
12+ find_package (PkgConfig REQUIRED )
13+ pkg_check_modules (POLYCUBE libpolycube )
14+ include_directories (${POLYCUBE_INCLUDE_DIRS} )
15+ endif (POLYCUBE_STANDALONE_SERVICE )
16+
1117# Needed to load files as variables
1218include_directories (${CMAKE_CURRENT_BINARY_DIR} )
1319
@@ -26,9 +32,7 @@ load_file_as_variable(pcn-helloworld Helloworld_dp_egress.c helloworld_code_egre
2632# load datamodel in a variable
2733load_file_as_variable (pcn-helloworld ../datamodel/helloworld.yang helloworld_datamodel )
2834
29- target_link_libraries (pcn-helloworld
30- polycube
31- uuid )
35+ target_link_libraries (pcn-helloworld ${POLYCUBE_LIBRARIES} )
3236
3337# Specify shared library install directory
3438
You can’t perform that action at this time.
0 commit comments