From 9e48326cb84a311b4b2bdbee25b5da5fbb50ee67 Mon Sep 17 00:00:00 2001 From: "IDI GPT 8.0.0" Date: Wed, 29 Jan 2014 13:22:42 +0100 Subject: Setup to build rpm packet for library --- CMakeLists.txt | 12 ++---------- commonapi.spec.in | 2 +- src/CommonAPI/CMakeLists.txt | 7 +++---- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9b819db..8d432e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,14 +33,12 @@ FIND_PACKAGE(Threads REQUIRED) ############################################################################## # general stuff - +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -DDEBUG -g -Wall -DCOMMONAPI_INTERNAL_COMPILATION") OPTION(BUILD_SHARED_LIBS "Set to OFF to build static libraries" ON ) OPTION(ENABLE_BUILD_DOC "Set to ON to build Documentation" OFF) ADD_SUBDIRECTORY( src/CommonAPI ) -#ADD_SUBDIRECTORY( Test/Implementation ) -#ADD_SUBDIRECTORY( src ) ############################################################################## @@ -51,17 +49,11 @@ INSTALL(FILES CommonAPI.pc COMPONENT base) -#INSTALL(FILES Config/shm.conf -# DESTINATION /etc -# PERMISSIONS OWNER_WRITE OWNER_READ -# GROUP_READ GROUP_EXECUTE -# WORLD_READ WORLD_EXECUTE -#) CONFIGURE_FILE(commonapi.spec.in commonapi.spec) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/CommonAPI.pc.in ${CMAKE_CURRENT_SOURCE_DIR}/CommonAPI.pc) CONFIGURE_FILE(CommonAPI-uninstalled.pc.in CommonAPI-uninstalled.pc) -CONFIGURE_FILE(doxygen.cfg.in doxygen.cfg) +CONFIGURE_FILE(doxygen.cfg Doxygen) #CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/src/config.h) diff --git a/commonapi.spec.in b/commonapi.spec.in index f4b901e..890220a 100644 --- a/commonapi.spec.in +++ b/commonapi.spec.in @@ -42,7 +42,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) -%{_libdir}/libCommonAPI.so.0 +%{_libdir}/libCommonAPI.so.3 %{_libdir}/libCommonAPI.so.3.0.0 %{_libdir}/libCommonAPI.so #%{_includedir}/shm/shm_swwd.h diff --git a/src/CommonAPI/CMakeLists.txt b/src/CommonAPI/CMakeLists.txt index 73d1046..46a48a2 100644 --- a/src/CommonAPI/CMakeLists.txt +++ b/src/CommonAPI/CMakeLists.txt @@ -1,9 +1,8 @@ cmake_minimum_required (VERSION 2.8.1) FIND_PACKAGE(PkgConfig) -set(CAPI_LIB_SRCS *.cpp ) -add_library(CommonAPI ${shm_LIB_SRCS}) -target_link_libraries(CommonAPI ${EXPAT_LIBRARIES}) -set_target_properties(CommonAPI PROPERTIES VERSION 3.0.0 SOVERSION 0 LINKER_LANGUAGE C) +set(CAPI_LIB_SRCS Runtime.cpp Configuration.cpp ServicePublisher.cpp ContainerUtils.cpp ) +add_library(CommonAPI ${CAPI_LIB_SRCS}) +set_target_properties(CommonAPI PROPERTIES VERSION 3.0.0 SOVERSION 3 LINKER_LANGUAGE C) set(CAPI_DEV_INCL *.h ) -- cgit v1.2.1