From 263b58073a7f5b57059674585049f0262de562c5 Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Wed, 11 May 2011 13:19:25 +0200 Subject: [PATCH] Migrate libi2ncommon to cmake --- CMakeLists.txt | 147 ++++++++++++++++++++++++++++++++++++++++++++++ Makefile.am | 18 ------ configlib/CMakeLists.txt | 22 +++++++ configlib/Makefile.am | 18 ------ doc/Makefile.am | 18 ------ libi2ncommon.pc.in | 4 +- libi2ncommon.spec | 21 +++++-- libi2ncommon_utils.pc.in | 2 +- src/CMakeLists.txt | 70 ++++++++++++++++++++++ src/Makefile.am | 24 -------- test/CMakeLists.txt | 36 +++++++++++ test/Makefile.am | 10 --- test/test_filefunc.cpp | 4 +- utils/CMakeLists.txt | 24 ++++++++ utils/Makefile.am | 15 ----- xmllib/CMakeLists.txt | 27 +++++++++ xmllib/Makefile.am | 16 ----- 17 files changed, 347 insertions(+), 129 deletions(-) create mode 100644 CMakeLists.txt delete mode 100644 Makefile.am create mode 100644 configlib/CMakeLists.txt delete mode 100644 configlib/Makefile.am delete mode 100644 doc/Makefile.am create mode 100644 src/CMakeLists.txt delete mode 100644 src/Makefile.am create mode 100644 test/CMakeLists.txt delete mode 100644 test/Makefile.am create mode 100644 utils/CMakeLists.txt delete mode 100644 utils/Makefile.am create mode 100644 xmllib/CMakeLists.txt delete mode 100644 xmllib/Makefile.am diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..c0540cb --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,147 @@ +# Project +project(libi2ncommon) + +# Version settings +set(MAJOR_VERSION 2) +set(MINOR_VERSION 0) +set(VERSION 2.0) + +SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}") + +# CMake +if("${CMAKE_BUILD_TYPE}" STREQUAL "") + set(CMAKE_BUILD_TYPE Debug) +endif("${CMAKE_BUILD_TYPE}" STREQUAL "") +set(CMAKE_COLOR_MAKEFILE ON) +cmake_minimum_required(VERSION 2.6 FATAL_ERROR) + +# Debug build +message("-- Build type: ${CMAKE_BUILD_TYPE}") +if(${CMAKE_BUILD_TYPE} STREQUAL Debug) + add_definitions(-DDEBUG) +endif(${CMAKE_BUILD_TYPE} STREQUAL Debug) + +# Set components +set(CPACK_COMPONENTS_ALL sharedlibs staticlibs headers) +set(CPACK_COMPONENT_SHAREDLIBS_DISPLAY_NAME "Shared libraries") +set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ Headers") + +set(CPACK_COMPONENT_SHAREDLIBS_DESCRIPTION +"Shared library for general use.") +set(CPACK_COMPONENT_HEADERS_DESCRIPTION +"C/C++ header files.") + +set(CPACK_COMPONENT_SHAREDLIBS_GROUP "Development") +set(CPACK_COMPONENT_HEADERS_GROUP "Development") + +# Package information +set(CPACK_PACKAGE_VERSION ${VERSION}) +set(CPACK_PACKAGE_CONTACT "Intra2net AG ") +set(CPACK_PACKAGE_DESCRIPTION "libi2ncommon library.") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${CPACK_PACKAGE_DESCRIPTION} + ) +# Package settings +set(CPACK_GENERATOR "DEB;RPM") +set(CPACK_CMAKE_GENERATOR "Unix Makefiles") +set(CPACK_PACKAGE_NAME ${PROJECT_NAME}) +set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}${PACK_ARCH}) + +set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/LICENSE) + +set(CPACK_SOURCE_GENERATOR TGZ) +set(CPACK_SOURCE_IGNORE_FILES + "~$" + "\\\\.git" + "build" + "build-rpm" +) +set(CPACK_SOURCE_PACKAGE_FILE_NAME ${CPACK_PACKAGE_FILE_NAME}) + +# documentation +find_package(Doxygen) +if(DOXYGEN_FOUND) + # Set variables + set(PACKAGE libi2ncommon) + set(top_srcdir ${CMAKE_SOURCE_DIR}) + + # Find doxy config + message(STATUS "Doxygen found.") + set(DOXY_DIR "${CMAKE_SOURCE_DIR}/doc") + set(DOXY_CONFIG "${DOXY_DIR}/Doxyfile.in") + + # Copy doxy.config.in + configure_file("${DOXY_CONFIG}" "${CMAKE_BINARY_DIR}/doxy.config") + + # Create doc directory + add_custom_command( + OUTPUT ${CMAKE_BINARY_DIR}/doc + COMMAND rm -rf ${CMAKE_BINARY_DIR}/doc/{html,man} + COMMAND mkdir -p ${CMAKE_BINARY_DIR}/doc + DEPENDS src configlib xmllib utils test + ) + + # Run doxygen + add_custom_command( + OUTPUT ${CMAKE_BINARY_DIR}/doc/html/index.html + COMMAND ${DOXYGEN_EXECUTABLE} "${CMAKE_BINARY_DIR}/doxy.config" + DEPENDS "${CMAKE_BINARY_DIR}/doxy.config" "${CMAKE_BINARY_DIR}/doc" + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/doc + ) + + add_custom_target(docs ALL DEPENDS ${CMAKE_BINARY_DIR}/doc/html/index.html) + + message(STATUS "Generating API documentation with Doxygen") +else(DOXYGEN_FOUND) + message(STATUS "Not generating API documentation") +endif(DOXYGEN_FOUND) + +# Find external packages +include(FindPkgConfig) + +# Find Boost +find_package(Boost COMPONENTS iostreams unit_test_framework REQUIRED) + +# Find libxml++ +pkg_check_modules(XMLPP REQUIRED libxml++-2.6) + +# Find iconv +pkg_check_modules(ICONV REQUIRED libiconv) +include_directories($ICONV_INCLUDE_DIRS}) +link_directories(${ICONV_LIBRARY_DIRS}) + + +# pkgconfig output +set(prefix ${CMAKE_INSTALL_PREFIX}) +set(exec_prefix ${CMAKE_INSTALL_PREFIX}/bin) +set(includedir ${CMAKE_INSTALL_PREFIX}/include) +set(libdir ${CMAKE_INSTALL_PREFIX}/lib) + +# construct ${BOOST_LDADD} from ${Boost_LIBRARIES} +string(REGEX REPLACE ";" " -l" BOOST_LDADD "${Boost_IOSTREAMS_LIBRARIES}") +set(BOOST_LDADD "-l${BOOST_LDADD}") + +# construct ${BOOST_CFLAGS} from ${Boost_INCLUDE_DIRS} +string(REGEX REPLACE ";" " -I" BOOST_CFLAGS "${Boost_INCLUDE_DIRS}") +set(BOOST_CFLAGS "-I${BOOST_CFLAGS}") + +configure_file(${CMAKE_SOURCE_DIR}/libi2ncommon.pc.in ${CMAKE_BINARY_DIR}/libi2ncommon.pc @ONLY) +configure_file(${CMAKE_SOURCE_DIR}/libi2ncommon_config.pc.in ${CMAKE_BINARY_DIR}/libi2ncommon_config.pc @ONLY) +configure_file(${CMAKE_SOURCE_DIR}/libi2ncommon_xml.pc.in ${CMAKE_BINARY_DIR}/libi2ncommon_xml.pc @ONLY) +configure_file(${CMAKE_SOURCE_DIR}/libi2ncommon_utils.pc.in ${CMAKE_BINARY_DIR}/libi2ncommon_utils.pc @ONLY) + +install(FILES ${CMAKE_BINARY_DIR}/libi2ncommon.pc + ${CMAKE_BINARY_DIR}/libi2ncommon_config.pc + ${CMAKE_BINARY_DIR}/libi2ncommon_xml.pc + ${CMAKE_BINARY_DIR}/libi2ncommon_utils.pc + DESTINATION lib/pkgconfig) + +include(CPack) + +# Subdirectories +set(CPACK_SET_DESTDIR "ON") + +add_subdirectory(src) +add_subdirectory(configlib) +add_subdirectory(xmllib) +add_subdirectory(utils) +add_subdirectory(test) diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index d8cacae..0000000 --- a/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -# not a GNU package. You can remove this line, if -# have all needed files, that a GNU package needs -AUTOMAKE_OPTIONS = foreign 1.4 -ACLOCAL_FLAGS = -I m4 - -SUBDIRS = src configlib xmllib utils doc test - -# Install the pkg-config file: -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = libi2ncommon.pc libi2ncommon_config.pc libi2ncommon_xml.pc libi2ncommon_utils.pc - -if AUTOCHECK -all: config.h - $(MAKE) $(AM_MAKEFLAGS) all-recursive - $(MAKE) $(AM_MAKEFLAGS) check -endif - -EXTRA_DIST = LICENSE COPYING.GPL diff --git a/configlib/CMakeLists.txt b/configlib/CMakeLists.txt new file mode 100644 index 0000000..027a43c --- /dev/null +++ b/configlib/CMakeLists.txt @@ -0,0 +1,22 @@ +include_directories(${CMAKE_SOURCE_DIR}/src) + +set(cpp_sources + i2n_global_config.cpp +) + +set(cpp_headers + i2n_global_config.hpp +) + +add_library(i2ncommon_config SHARED ${cpp_sources} ${hpp_sources}) + +set_target_properties(i2ncommon_config PROPERTIES VERSION ${VERSION} SOVERSION ${MAJOR_VERSION}) + + +install(TARGETS i2ncommon_config + LIBRARY DESTINATION lib + COMPONENT sharedlibs) + +install(FILES ${cpp_headers} + DESTINATION include + COMPONENT headers) diff --git a/configlib/Makefile.am b/configlib/Makefile.am deleted file mode 100644 index b24bcc4..0000000 --- a/configlib/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -# set the include path found by configure -INCLUDES = -I$(top_srcdir)/src $(all_includes) \ - @LIBICONV_CFLAGS@ @BOOST_CPPFLAGS@ - -METASOURCES = AUTO - -lib_LTLIBRARIES = libi2ncommon_config.la - -include_HEADERS = i2n_global_config.hpp - -# Note: If you specify a:b:c as the version in the next line, -# the library that is made has version (a-c).c.b. In this -# example, the version is 2.1.2. (3:2:1) - -libi2ncommon_config_la_LDFLAGS = -version-info @LIBI2NCOMMON_LIB_VERSION@ @BOOST_LDFLAGS@ - -libi2ncommon_config_la_LIBADD = -libi2ncommon_config_la_SOURCES = i2n_global_config.cpp diff --git a/doc/Makefile.am b/doc/Makefile.am deleted file mode 100644 index 30aaeeb..0000000 --- a/doc/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -CLEANFILES = rm -rf html - -if HAVE_DOXYGEN -MANUALS = html/index.html -else -MANUALS = -endif - -all: $(MANUALS) - -# todo: separate build dir still doesn't work -html/index.html: Doxyfile $(top_srcdir)/src/*.cpp $(top_srcdir)/src/*.hxx $(top_srcdir)/src/*.hpp \ - $(top_srcdir)/configlib/*.cpp $(top_srcdir)/configlib/*.hpp \ - $(top_srcdir)/xmllib/*.cpp $(top_srcdir)/xmllib/*.hpp \ - $(top_srcdir)/utils/*.cpp $(top_srcdir)/utils/*.hpp - $(DOXYGEN) - -EXTRA_DIST = Doxyfile.in diff --git a/libi2ncommon.pc.in b/libi2ncommon.pc.in index 78a951d..8a4d578 100644 --- a/libi2ncommon.pc.in +++ b/libi2ncommon.pc.in @@ -7,5 +7,5 @@ Name: libi2ncommon Description: library with functions common in Intra2net programs Requires: libi2ncommon_utils Version: @VERSION@ -Libs: -L${libdir} -li2ncommon -li2ncommon_utils @BOOST_LDFLAGS@ @BOOST_IOSTREAMS_LIB@ -Cflags: -I${includedir} @BOOST_CPPFLAGS@ +Libs: -L${libdir} -li2ncommon -li2ncommon_utils @BOOST_LDADD@ +Cflags: -I${includedir} @BOOST_CFLAGS@ diff --git a/libi2ncommon.spec b/libi2ncommon.spec index 4bc6e07..81607ea 100644 --- a/libi2ncommon.spec +++ b/libi2ncommon.spec @@ -59,13 +59,23 @@ Library with open source utility modules. %build export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/intranator/lib/pkgconfig -autoreconf --force --install -./configure $RPM_BUILD_WITH_OPTIMIZE --prefix=%{prefix} -dmake -dmake check +mkdir build +cd build + +export CFLAGS="$RPM_OPT_FLAGS" +export CXXFLAGS="$RPM_OPT_FLAGS" +cmake -DCMAKE_INSTALL_PREFIX="%{prefix}" ../ + +make %{?_smp_mflags} VERBOSE=1 + +%check +cd build +make check %install + +cd build make DESTDIR=$RPM_BUILD_ROOT install %clean @@ -81,7 +91,8 @@ rm -fr $RPM_BUILD_ROOT %files devel %defattr(-,root,root) -%{prefix}/lib/*.*a* +# No static library for now +#%{prefix}/lib/*.*a* %{prefix}/lib/pkgconfig/*.pc %{prefix}/include/ diff --git a/libi2ncommon_utils.pc.in b/libi2ncommon_utils.pc.in index 771c287..f554c57 100644 --- a/libi2ncommon_utils.pc.in +++ b/libi2ncommon_utils.pc.in @@ -7,4 +7,4 @@ Name: libi2ncommon_utils Description: library with utility modules common in some Intra2net programs Version: @VERSION@ Libs: -L${libdir} -li2ncommon_utils -Cflags: -I${includedir} +Cflags: -I${includedir} @BOOST_CFLAGS@ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..84cc1f2 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,70 @@ +include_directories( + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_SOURCE_DIR}/utils + ${ICONV_INCLUDE_DIRS} +) + +SET(cpp_sources + cron.cpp + daemonfunc.cpp + filefunc.cpp + i18n.cpp + i2n_configfile.cpp + ipfunc.cpp + logfunc.cpp + logread.cpp + oftmpstream.cpp + pidfile.cpp + pointer_func.cpp + source_track_basics.cpp + stringfunc.cpp + timefunc.cpp + tmpfstream.cpp + tracefunc.cpp + tribool.cpp + userfunc.cpp + week.cpp +) + +SET(hpp_sources + cron.hpp + daemonfunc.hpp + exception.hxx + filefunc.hxx + i18n.h + i2n_configdata.hpp + i2n_configfile.hpp + insocketstream.hxx + ip_type.hxx + ipfunc.hxx + log_macros.hpp + logfunc.hpp + logread.hxx + oftmpstream.hxx + pidfile.hpp + pipestream.hxx + pointer_func.hpp + source_track_basics.hpp + stringfunc.hxx + timefunc.hxx + tmpfstream.hpp + tmpfstream_impl.hpp + tracefunc.hpp + tribool.hpp + userfunc.hpp + week.hpp +) + +add_library(i2ncommon SHARED ${cpp_sources} ${hpp_sources}) + +target_link_libraries(i2ncommon ${Boost_IOSTREAMS_LIBRARIES} ${ICONV_LIBRARIES}) + +set_target_properties(i2ncommon PROPERTIES VERSION ${VERSION} SOVERSION ${MAJOR_VERSION}) + +install(TARGETS i2ncommon + LIBRARY DESTINATION lib + COMPONENT sharedlibs) + +install(FILES ${cpp_headers} + DESTINATION include + COMPONENT headers) diff --git a/src/Makefile.am b/src/Makefile.am deleted file mode 100644 index 7921476..0000000 --- a/src/Makefile.am +++ /dev/null @@ -1,24 +0,0 @@ - -# set the include path found by configure -INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/utils @LIBICONV_CFLAGS@ @BOOST_CPPFLAGS@ $(all_includes) - -# the library search path. -lib_LTLIBRARIES = libi2ncommon.la -include_HEADERS = cron.hpp daemonfunc.hpp exception.hxx filefunc.hxx \ - i2n_configdata.hpp i2n_configfile.hpp insocketstream.hxx ip_type.hxx ipfunc.hxx \ - log_macros.hpp logfunc.hpp logread.hxx oftmpstream.hxx pidfile.hpp pipestream.hxx \ - pointer_func.hpp source_track_basics.hpp stringfunc.hxx timefunc.hxx tmpfstream.hpp \ - tmpfstream_impl.hpp tracefunc.hpp userfunc.hpp week.hpp tribool.hpp i18n.h - -libi2ncommon_la_SOURCES = cron.cpp daemonfunc.cpp filefunc.cpp \ - i2n_configfile.cpp ipfunc.cpp logfunc.cpp logread.cpp oftmpstream.cpp pidfile.cpp \ - pointer_func.cpp source_track_basics.cpp stringfunc.cpp timefunc.cpp tmpfstream.cpp \ - tracefunc.cpp userfunc.cpp week.cpp tribool.cpp i18n.cpp - -# Note: If you specify a:b:c as the version in the next line, -# the library that is made has version (a-c).c.b. In this -# example, the version is 2.1.2. (3:2:1) - -libi2ncommon_la_LDFLAGS = -version-info @LIBI2NCOMMON_LIB_VERSION@ @BOOST_LDFLAGS@ - -libi2ncommon_la_LIBADD = @LIBICONV_LIBS@ @BOOST_IOSTREAMS_LIB@ diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 0000000..bc3ba69 --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,36 @@ +include_directories( + ${CMAKE_SOURCE_DIR}/configlib + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_SOURCE_DIR}/utils) + +########### next target ############### + +SET(cpp_sources + ip_range.cpp + stringfunc.cpp + test_containerfunc.cpp + test_cron_interval.cpp + test_cron_point.cpp + test_filefunc.cpp + test_global_config.cpp + test_logging.cpp + test_pidfile.cpp + test_timefunc.cpp + test_tmpfstream.cpp +) + +add_executable(test_i2ncommon ${cpp_sources}) + +# Add custom "make check" target which automatically builds the library +add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} DEPENDS test_i2ncommon) + +# Invocation via "make test" +enable_testing() +add_test(test_i2ncommon test_i2ncommon) + +target_link_libraries(test_i2ncommon + i2ncommon + i2ncommon_utils + i2ncommon_config + ${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES} +) diff --git a/test/Makefile.am b/test/Makefile.am deleted file mode 100644 index 6cf2587..0000000 --- a/test/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -INCLUDES = -I$(top_srcdir)/configlib -I$(top_srcdir)/src -I$(top_srcdir)/utils @BOOST_CPPFLAGS@ -METASOURCES = AUTO -check_PROGRAMS = test -test_SOURCES = ip_range.cpp stringfunc.cpp test_containerfunc.cpp \ - test_cron_interval.cpp test_cron_point.cpp test_filefunc.cpp test_global_config.cpp \ - test_logging.cpp test_pidfile.cpp test_timefunc.cpp test_tmpfstream.cpp -test_LDADD = $(top_builddir)/src/libi2ncommon.la $(top_builddir)/utils/libi2ncommon_utils.la \ - $(top_builddir)/configlib/libi2ncommon_config.la @BOOST_UNIT_TEST_FRAMEWORK_LIB@ - -TESTS = test diff --git a/test/test_filefunc.cpp b/test/test_filefunc.cpp index f00e0f5..a345c66 100644 --- a/test/test_filefunc.cpp +++ b/test/test_filefunc.cpp @@ -79,7 +79,7 @@ BOOST_FIXTURE_TEST_SUITE(TestFileFunc, TestFileFuncFixture) BOOST_AUTO_TEST_CASE(StatTest1) { - I2n::Stat stat("test_filefunc.cpp"); + I2n::Stat stat("Makefile"); BOOST_CHECK_EQUAL( true, (bool)stat ); BOOST_CHECK_EQUAL( true, stat.is_regular_file() ); @@ -123,7 +123,7 @@ BOOST_AUTO_TEST_CASE(DirTest1) BOOST_CHECK_EQUAL( true, res ); BOOST_CHECK( ! names.empty() ); - StringVector::iterator it = std::find( names.begin(), names.end(), "test_filefunc.cpp"); + StringVector::iterator it = std::find( names.begin(), names.end(), "Makefile"); BOOST_CHECK( it != names.end() ); it = std::find( names.begin(), names.end(), "." ); diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt new file mode 100644 index 0000000..dbef7f8 --- /dev/null +++ b/utils/CMakeLists.txt @@ -0,0 +1,24 @@ +include_directories(${CMAKE_SOURCE_DIR}/src) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) + +set(cpp_sources + containerfunc.cpp + signalfunc.cpp +) +set(cpp_headers + containerfunc.hpp + signalfunc.hpp +) + +add_library(i2ncommon_utils SHARED ${cpp_sources} ${hpp_sources}) + +set_target_properties(i2ncommon_utils PROPERTIES VERSION ${VERSION} SOVERSION ${MAJOR_VERSION}) + + +install(TARGETS i2ncommon_utils + LIBRARY DESTINATION lib + COMPONENT sharedlibs) + +install(FILES ${cpp_headers} + DESTINATION include + COMPONENT headers) diff --git a/utils/Makefile.am b/utils/Makefile.am deleted file mode 100644 index 4535091..0000000 --- a/utils/Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ -# set the include path found by configure -INCLUDES = -I$(top_srcdir)/src @BOOST_CPPFLAGS@ $(all_includes) -METASOURCES = AUTO - -lib_LTLIBRARIES = libi2ncommon_utils.la - -include_HEADERS = containerfunc.hpp signalfunc.hpp - -# Note: If you specify a:b:c as the version in the next line, -# the library that is made has version (a-c).c.b. In this -# example, the version is 2.1.2. (3:2:1) - -libi2ncommon_utils_la_LDFLAGS = -version-info @LIBI2NCOMMON_LIB_VERSION@ @BOOST_LDFLAGS@ - -libi2ncommon_utils_la_SOURCES = containerfunc.cpp signalfunc.cpp diff --git a/xmllib/CMakeLists.txt b/xmllib/CMakeLists.txt new file mode 100644 index 0000000..b015555 --- /dev/null +++ b/xmllib/CMakeLists.txt @@ -0,0 +1,27 @@ +include_directories(${CMAKE_SOURCE_DIR}/src) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) +include_directories(${XMLPP_INCLUDE_DIRS}) + +link_directories(${XMLPP_LIBRARY_DIRS}) + +set(cpp_sources + xmlcommon.cpp +) + +set(cpp_headers + xmlcommon.hpp +) + +add_library(i2ncommon_xml SHARED ${cpp_sources} ${hpp_sources}) + +target_link_libraries(i2ncommon_xml ${Xmlpp_LIBRARIES}) + +set_target_properties(i2ncommon_xml PROPERTIES VERSION ${VERSION} SOVERSION ${MAJOR_VERSION}) + +install(TARGETS i2ncommon_xml + LIBRARY DESTINATION lib + COMPONENT sharedlibs) + +install(FILES ${cpp_headers} + DESTINATION include + COMPONENT headers) diff --git a/xmllib/Makefile.am b/xmllib/Makefile.am deleted file mode 100644 index b9aaea8..0000000 --- a/xmllib/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ -# set the include path found by configure -INCLUDES = -I$(top_srcdir)/src $(all_includes) @LIBXMLPP_CFLAGS@ -METASOURCES = AUTO - -lib_LTLIBRARIES = libi2ncommon_xml.la - -include_HEADERS = xmlcommon.hpp - -# Note: If you specify a:b:c as the version in the next line, -# the library that is made has version (a-c).c.b. In this -# example, the version is 2.1.2. (3:2:1) - -libi2ncommon_xml_la_LDFLAGS = -version-info @LIBI2NCOMMON_LIB_VERSION@ - -libi2ncommon_xml_la_LIBADD = @LIBXMLPP_LIBS@ -libi2ncommon_xml_la_SOURCES = xmlcommon.cpp -- 1.7.1