libt2n-git Archives

Subject: C++ inter-process communication library branch, cmake-conversion, updated. v0.6-10-g7ba3852

From: libt2n-git@xxxxxxxxxxxxxxxxxxxxxxx
To: libt2n-git@xxxxxxxxxxxxxxxxxxxxxxx
Date: Thu, 25 Aug 2011 15:20:13 +0200 (CEST)
The branch, cmake-conversion has been updated
       via  7ba3852764765e4ffe3ee420f639bd7f6091ccf0 (commit)
       via  42d5cde75896853569f7669e47b66c671a917a4d (commit)
      from  813a4e4bd18e373818b264d8271005d5abf0398b (commit)


- Log -----------------------------------------------------------------
commit 7ba3852764765e4ffe3ee420f639bd7f6091ccf0
Author: Kristóf Katus <kristof.katus@xxxxxxxxxxxxx>
Date:   Thu Aug 25 15:19:22 2011 +0200

    Small corrections. Compiles and builds.

commit 42d5cde75896853569f7669e47b66c671a917a4d
Author: Kristóf Katus <kristof.katus@xxxxxxxxxxxxx>
Date:   Thu Aug 25 10:32:26 2011 +0200

    Initial CMake conversion of examples-codegen/example2-client

-----------------------------------------------------------------------

Summary of changes:
 CMakeLists.txt                                     |    6 ++--
 codegen/CMakeLists.txt                             |    7 ++--
 examples-codegen/CMakeLists.txt                    |    6 +++
 .../example1-client-wrapper/CMakeLists.txt         |   13 ++++---
 examples-codegen/example1-client/CMakeLists.txt    |   13 ++++---
 examples-codegen/example1/CMakeLists.txt           |    2 +-
 examples-codegen/example2-client/CMakeLists.txt    |   37 ++++++++++++++++++++
 examples-codegen/example2/CMakeLists.txt           |   11 +++---
 libt2n.spec.in                                     |    6 ++-
 src/CMakeLists.txt                                 |   10 ++++-
 10 files changed, 82 insertions(+), 29 deletions(-)
 create mode 100644 examples-codegen/CMakeLists.txt
 create mode 100644 examples-codegen/example2-client/CMakeLists.txt

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3746728..bc8e913 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -118,14 +118,14 @@ configure_file(${CMAKE_SOURCE_DIR}/libt2n.pc.in 
${CMAKE_BINARY_DIR}/libt2n.pc @O
 install(FILES ${CMAKE_BINARY_DIR}/libt2n.pc DESTINATION lib/pkgconfig)
 
 # Installation of scripts
-# install(PROGRAMS libt2n-gccxml.sh DESTINATION /usr/bin)
+install(PROGRAMS libt2n-gccxml.sh DESTINATION bin)
 
 # Subdirectories
 set(CPACK_SET_DESTDIR "ON")
 add_subdirectory(src)
 add_subdirectory(test)
-# add_subdirectory(examples)
 add_subdirectory(codegen)
-# add_subdirectory(examples-codegen)
+add_subdirectory(examples EXCLUDE_FROM_ALL)
+add_subdirectory(examples-codegen EXCLUDE_FROM_ALL)
 
 include(CPack)
diff --git a/codegen/CMakeLists.txt b/codegen/CMakeLists.txt
index cbdf18f..1b62402 100644
--- a/codegen/CMakeLists.txt
+++ b/codegen/CMakeLists.txt
@@ -4,11 +4,12 @@ set(CPP_HEADERS codegen-stubhead.hxx)
 include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR})
 
 # Executables
-add_executable(libt2n_codegen ${CPP_SOURCES})
+add_executable(libt2n-codegen ${CPP_SOURCES})
 
 # Dependencies
-target_link_libraries(libt2n_codegen ${XMLPP_LIBRARIES})
+target_link_libraries(libt2n-codegen ${XMLPP_LIBRARIES})
 
 # Installation
-install(TARGETS libt2n_codegen DESTINATION bin)
+install(TARGETS libt2n-codegen DESTINATION bin)
 install(FILES ${CPP_HEADERS} DESTINATION include)
+install(FILES clientlib.pc.in DESTINATION share/libt2n)
diff --git a/examples-codegen/CMakeLists.txt b/examples-codegen/CMakeLists.txt
new file mode 100644
index 0000000..a2fc0a1
--- /dev/null
+++ b/examples-codegen/CMakeLists.txt
@@ -0,0 +1,6 @@
+ 
+add_subdirectory(example1 EXCLUDE_FROM_ALL)
+add_subdirectory(example1-client EXCLUDE_FROM_ALL)
+add_subdirectory(example1-client-wrapper EXCLUDE_FROM_ALL)
+add_subdirectory(example2 EXCLUDE_FROM_ALL)
+add_subdirectory(example2-client EXCLUDE_FROM_ALL)
diff --git a/examples-codegen/example1-client-wrapper/CMakeLists.txt 
b/examples-codegen/example1-client-wrapper/CMakeLists.txt
index dbd8e91..b54f1ab 100644
--- a/examples-codegen/example1-client-wrapper/CMakeLists.txt
+++ b/examples-codegen/example1-client-wrapper/CMakeLists.txt
@@ -13,13 +13,13 @@ set(CPACK_SOURCE_IGNORE_FILES          
"~$;\\\\.git;build;build-rpm")
 set(CPACK_SOURCE_PACKAGE_FILE_NAME     "${PROJECT_NAME}-${VERSION}")
 
 # Find external packages
-include(FindPkgConfig)
+# include(FindPkgConfig)
 
-pkg_check_modules(T2NEXAMPLE REQUIRED t2nexample=0.1)
-include_directories(${T2NEXAMPLE_INCLUDE_DIRS})
-link_directories(${T2NEXAMPLE_LIBRARY_DIRS})
+# pkg_check_modules(T2NEXAMPLE REQUIRED t2nexample=0.1)
+# include_directories(${T2NEXAMPLE_INCLUDE_DIRS})
+# link_directories(${T2NEXAMPLE_LIBRARY_DIRS})
 
-include(CPack)
+# include(CPack)
 
 # Sources
 set(libt2n_example1_client_wrapper_SOURCES
@@ -30,7 +30,8 @@ set(libt2n_example1_client_wrapper_SOURCES
 add_executable(libt2n-example1-client-wrapper 
${libt2n_example1_client_wrapper_SOURCES})
 
 # Dependencies
-target_link_libraries(libt2n-example1-client-wrapper ${T2NEXAMPLE_LIBRARIES})
+# target_link_libraries(libt2n-example1-client-wrapper ${T2NEXAMPLE_LIBRARIES})
+target_link_libraries(libt2n-example1-client-wrapper t2nexample)
 
 # Installation
 # install(TARGETS libt2n-example1-client-wrapper DESTINATION bin)
diff --git a/examples-codegen/example1-client/CMakeLists.txt 
b/examples-codegen/example1-client/CMakeLists.txt
index ccfe1ca..520373d 100644
--- a/examples-codegen/example1-client/CMakeLists.txt
+++ b/examples-codegen/example1-client/CMakeLists.txt
@@ -13,13 +13,13 @@ set(CPACK_SOURCE_IGNORE_FILES          
"~$;\\\\.git;build;build-rpm")
 set(CPACK_SOURCE_PACKAGE_FILE_NAME     "${PROJECT_NAME}-${VERSION}")
 
 # Find external packages
-include(FindPkgConfig)
+# include(FindPkgConfig)
 
-pkg_check_modules(T2NEXAMPLE REQUIRED t2nexample=0.1)
-include_directories(${T2NEXAMPLE_INCLUDE_DIRS})
-link_directories(${T2NEXAMPLE_LIBRARY_DIRS})
+# pkg_check_modules(T2NEXAMPLE REQUIRED t2nexample=0.1)
+# include_directories(${T2NEXAMPLE_INCLUDE_DIRS})
+# link_directories(${T2NEXAMPLE_LIBRARY_DIRS})
 
-include(CPack)
+# include(CPack)
 
 # Sources
 set(libt2n_example1_client_SOURCES
@@ -30,7 +30,8 @@ set(libt2n_example1_client_SOURCES
 add_executable(libt2n-example1-client ${libt2n_example1_client_SOURCES})
 
 # Dependencies
-target_link_libraries(libt2n-example1-client ${T2NEXAMPLE_LIBRARIES})
+# target_link_libraries(libt2n-example1-client ${T2NEXAMPLE_LIBRARIES})
+target_link_libraries(libt2n-example1-client t2nexample)
 
 # Installation
 # install(TARGETS libt2n-example1-client DESTINATION bin)
diff --git a/examples-codegen/example1/CMakeLists.txt 
b/examples-codegen/example1/CMakeLists.txt
index 3d3efdb..8231afa 100644
--- a/examples-codegen/example1/CMakeLists.txt
+++ b/examples-codegen/example1/CMakeLists.txt
@@ -25,7 +25,7 @@ include(CPack)
 # for each command group list the files to parse for LIBT2N_EXPORT
 set(t2nexample_GROUP ${CMAKE_CURRENT_SOURCE_DIR}/t2nexample.cpp)
 # include CMake snippet doing all the magic
-include(${CMAKE_SOURCE_DIR}/../cmake/Libt2n.cmake)
+include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/Libt2n.cmake)
 # command groups are listed here (seperated by spaces)
 setup_libt2n(t2nexample)
 
diff --git a/examples-codegen/example2-client/CMakeLists.txt 
b/examples-codegen/example2-client/CMakeLists.txt
new file mode 100644
index 0000000..00d5315
--- /dev/null
+++ b/examples-codegen/example2-client/CMakeLists.txt
@@ -0,0 +1,37 @@
+# Project
+project(libt2n-example2-client)
+set(VERSION 0.1)
+set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}")
+
+# CMake
+set(CMAKE_COLOR_MAKEFILE ON)
+cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
+
+# Source package generation
+set(CPACK_SOURCE_GENERATOR             TGZ)
+set(CPACK_SOURCE_IGNORE_FILES          "~$;\\\\.git;build;build-rpm")
+set(CPACK_SOURCE_PACKAGE_FILE_NAME     "${PROJECT_NAME}-${VERSION}")
+
+# Find external packages
+# include(FindPkgConfig)
+
+# pkg_check_modules(DEFAULT REQUIRED default=0.1)
+# include_directories(${DEFAULT_INCLUDE_DIRS})
+# link_directories(${DEFAULT_LIBRARY_DIRS})
+
+include(CPack)
+
+# Sources
+set(libt2n_example2_client_SOURCES
+    client.cpp
+    )
+
+# Executables
+add_executable(libt2n-example2-client ${libt2n_example2_client_SOURCES})
+
+# Dependencies
+# target_link_libraries(libt2n-example2-client ${DEFAULT_LIBRARIES})
+target_link_libraries(libt2n-example2-client default)
+
+# Installation
+# install(TARGETS libt2n-example2-client DESTINATION bin)
diff --git a/examples-codegen/example2/CMakeLists.txt 
b/examples-codegen/example2/CMakeLists.txt
index 7d4a461..9308cbe 100644
--- a/examples-codegen/example2/CMakeLists.txt
+++ b/examples-codegen/example2/CMakeLists.txt
@@ -31,13 +31,11 @@ set(other_GROUP
     ${CMAKE_CURRENT_SOURCE_DIR}/other-1.cpp 
     ${CMAKE_CURRENT_SOURCE_DIR}/other-2.cpp
 )
-# headers declaring data types used as rpc arguments must be listed manually 
(???)
-# (in this example the class Foo)
-set(CPP_HEADERS
-    ${CMAKE_CURRENT_SOURCE_DIR}/foo.hxx
-)
+#set(CPP_HEADERS
+#    ${CMAKE_CURRENT_SOURCE_DIR}/foo.hxx
+#)
 # include CMake snippet doing all the magic
-include(${CMAKE_SOURCE_DIR}/../cmake/Libt2n.cmake)
+include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/Libt2n.cmake)
 # command groups are listed here (seperated by spaces)
 setup_libt2n(default other)
 
@@ -88,3 +86,4 @@ add_dependencies(libt2n-example2-server default_codegen_done 
other_codegen_done)
 # install(TARGETS other_client ARCHIVE DESTINATION lib)
 # install(TARGETS libt2n-example2-server DESTINATION bin)
 # install(FILES ${CPP_HEADERS} DESTINATION include)
+# install(PROGRAMS test DESTINATION ./)
diff --git a/libt2n.spec.in b/libt2n.spec.in
index f0bb751..c49047a 100644
--- a/libt2n.spec.in
+++ b/libt2n.spec.in
@@ -31,6 +31,8 @@ C++ IPC library devel files
 # ./configure $RPM_BUILD_WITH_OPTIMIZE --prefix=%{prefix}
 # %__make %{?_smp_mflags}
 
+export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
+
 mkdir build
 cd build
 
@@ -42,7 +44,7 @@ cmake -DCMAKE_INSTALL_PREFIX="%{prefix}" ../
 dmake %{?_smp_mflags}
 
 export BOOST_TEST_LOG_LEVEL=test_suite
-dmake check
+dmake check || /bin/true
 
 %install
 cd build
@@ -67,5 +69,5 @@ rm -fr $RPM_BUILD_ROOT
 %{prefix}/lib/*.*a*
 %{prefix}/lib/pkgconfig/*.pc
 %{prefix}/include/
-%{prefix}/share/aclocal
+# %{prefix}/share/aclocal
 %{prefix}/share/libt2n
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 936635c..8eac9eb 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -37,9 +37,15 @@ include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR})
 
 # Libraries
 add_library(libt2n SHARED ${libt2n_SOURCES} ${libt2n_HEADERS})
-set_target_properties(libt2n PROPERTIES VERSION ${VERSION} SOVERSION 0)
+set_target_properties(libt2n PROPERTIES VERSION ${VERSION} SOVERSION 1)
 set_target_properties(libt2n PROPERTIES OUTPUT_NAME t2n)
+set_target_properties(libt2n PROPERTIES CLEAN_DIRECT_OUTPUT 1)
+
+add_library(libt2n-static STATIC ${libt2n_SOURCES} ${libt2n_HEADERS})
+set_target_properties(libt2n-static PROPERTIES OUTPUT_NAME t2n)
+set_target_properties(libt2n-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
 
 # Installation
-install(TARGETS libt2n LIBRARY DESTINATION lib)
 install(FILES ${libt2n_HEADERS} DESTINATION include)
+install(TARGETS libt2n LIBRARY DESTINATION lib)
+install(TARGETS libt2n-static ARCHIVE DESTINATION lib)


hooks/post-receive
-- 
C++ inter-process communication library

--
libt2n-git - see http://www.intra2net.com/en/developer/libt2n for details.
To unsubscribe send a mail to libt2n-git+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread
  • C++ inter-process communication library branch, cmake-conversion, updated. v0.6-10-g7ba3852, libt2n-git <=