rename and make shared library: relpipe-lib-protocol.cpp → relpipe-lib-common.cpp v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Tue, 03 Dec 2019 16:30:02 +0100
branchv_0
changeset 44 bcff4ebca71d
parent 43 e8889e9b6786
child 45 24a506eb97b5
rename and make shared library: relpipe-lib-protocol.cpp → relpipe-lib-common.cpp
nbproject/configurations.xml
src/CMakeLists.txt
src/pkg-config.cpp.pc.in
--- a/nbproject/configurations.xml	Wed Oct 30 16:47:42 2019 +0100
+++ b/nbproject/configurations.xml	Tue Dec 03 16:30:02 2019 +0100
@@ -78,7 +78,7 @@
           <executablePath>build/Debug/src/welcome</executablePath>
           <ccTool>
             <incDir>
-              <pElem>../relpipe-lib-protocol.cpp/include</pElem>
+              <pElem>../relpipe-lib-common.cpp/include</pElem>
               <pElem>build/Debug/src</pElem>
             </incDir>
             <preprocessorList>
--- a/src/CMakeLists.txt	Wed Oct 30 16:47:42 2019 +0100
+++ b/src/CMakeLists.txt	Tue Dec 03 16:30:02 2019 +0100
@@ -20,7 +20,7 @@
 
 # Relpipe libraries:
 INCLUDE(FindPkgConfig)
-pkg_check_modules (RELPIPE_LIBS relpipe-lib-protocol.cpp)
+pkg_check_modules (RELPIPE_LIBS relpipe-lib-common.cpp)
 include_directories(${RELPIPE_LIBS_INCLUDE_DIRS})
 link_directories(${RELPIPE_LIBS_LIBRARY_DIRS})
 
@@ -37,6 +37,9 @@
 	Factory.cpp
 )
 
+# Link libraries:
+target_link_libraries(${LIBRARY_FILE} ${RELPIPE_LIBS_LIBRARIES})
+
 install(TARGETS ${LIBRARY_FILE} DESTINATION lib/relpipe) # TODO: add version and symlink
 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_CODE}.cpp.pc" DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig/)
 install(DIRECTORY ../include/ DESTINATION include)
--- a/src/pkg-config.cpp.pc.in	Wed Oct 30 16:47:42 2019 +0100
+++ b/src/pkg-config.cpp.pc.in	Tue Dec 03 16:30:02 2019 +0100
@@ -6,5 +6,7 @@
 Description: @PROJECT_DESCRIPTION@
 Version: @PROJECT_VERSION@
 
+Requires: relpipe-lib-common.cpp = @PROJECT_VERSION@
+
 Libs: -L${libdir} -l@LIBRARY_FILE@
 Cflags: -I${includedir}