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 43 5dd0bfb430a1
parent 42 e3de8202fdb4
child 44 3f7b5f3f3f84
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
@@ -76,6 +76,15 @@
           <buildCommand>${MAKE} -f Makefile</buildCommand>
           <cleanCommand>${MAKE} -f Makefile clean</cleanCommand>
           <executablePath>build/Debug/src/welcome</executablePath>
+          <ccTool>
+            <incDir>
+              <pElem>../relpipe-lib-common.cpp/include</pElem>
+              <pElem>build/Debug/src</pElem>
+            </incDir>
+            <preprocessorList>
+              <Elem>relpipe_lib_writer_cpp_EXPORTS</Elem>
+            </preprocessorList>
+          </ccTool>
         </makeTool>
         <preBuild>
           <preBuildCommandWorkingDir>build/Debug</preBuildCommandWorkingDir>
@@ -85,13 +94,6 @@
       </makefileType>
       <item path="src/Factory.cpp" ex="false" tool="1" flavor2="0">
         <ccTool flags="0">
-          <incDir>
-            <pElem>../relpipe-lib-protocol.cpp/include</pElem>
-            <pElem>build/Debug/src</pElem>
-          </incDir>
-          <preprocessorList>
-            <Elem>relpipe_lib_writer_cpp_EXPORTS</Elem>
-          </preprocessorList>
         </ccTool>
       </item>
     </conf>
--- 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}