skeleton
This commit is contained in:
parent
7ebde5dde5
commit
b235a08ede
5 changed files with 86 additions and 0 deletions
28
CMakeLists.txt
Normal file
28
CMakeLists.txt
Normal file
|
@ -0,0 +1,28 @@
|
|||
project(libtransport)
|
||||
|
||||
set(CMAKE_MODULE_PATH "cmake_modules")
|
||||
|
||||
set(cppunit_DIR "${CMAKE_SOURCE_DIR}/cmake_modules")
|
||||
find_package(cppunit)
|
||||
|
||||
if(CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
ADD_DEFINITIONS(-ggdb)
|
||||
ADD_DEFINITIONS(-DDEBUG)
|
||||
ADD_DEFINITIONS(-Wall)
|
||||
ADD_DEFINITIONS(-W)
|
||||
ADD_DEFINITIONS(-Wcast-align)
|
||||
ADD_DEFINITIONS(-Wextra -Wno-sign-compare -Wno-unused-parameter)
|
||||
ADD_DEFINITIONS(-Winit-self)
|
||||
ADD_DEFINITIONS(-Wmissing-declarations)
|
||||
ADD_DEFINITIONS(-Wpointer-arith)
|
||||
ADD_DEFINITIONS(-Wreorder)
|
||||
ADD_DEFINITIONS(-Woverloaded-virtual)
|
||||
ADD_DEFINITIONS(-Wsign-promo)
|
||||
ADD_DEFINITIONS(-Wundef -Wunused)
|
||||
message(STATUS "Build type is set to Debug")
|
||||
endif(CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
|
||||
SET(TRANSPORT_VERSION 2.0)
|
||||
|
||||
ADD_SUBDIRECTORY(src)
|
||||
ADD_SUBDIRECTORY(include)
|
30
cmake_modules/cppunitConfig.cmake
Normal file
30
cmake_modules/cppunitConfig.cmake
Normal file
|
@ -0,0 +1,30 @@
|
|||
# - Find cppunit
|
||||
# Find the native cppunit includes and library
|
||||
#
|
||||
# CPPUNIT_INCLUDE_DIR - where to find cppunit/Test.h, etc.
|
||||
# CPPUNIT_LIBRARIES - List of libraries when using cppunit.
|
||||
# CPPUNIT_FOUND - True if cppunit found.
|
||||
|
||||
|
||||
IF (CPPUNIT_INCLUDE_DIR)
|
||||
# Already in cache, be silent
|
||||
SET(CPPUNIT_FIND_QUIETLY TRUE)
|
||||
ENDIF (CPPUNIT_INCLUDE_DIR)
|
||||
|
||||
FIND_PATH(CPPUNIT_INCLUDE_DIR cppunit/Test.h)
|
||||
|
||||
SET(CPPUNIT_NAMES cppunit)
|
||||
FIND_LIBRARY(CPPUNIT_LIBRARY NAMES ${CPPUNIT_NAMES} )
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set CPPUNIT_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CppUnit DEFAULT_MSG CPPUNIT_LIBRARY CPPUNIT_INCLUDE_DIR)
|
||||
|
||||
IF(CPPUNIT_FOUND)
|
||||
SET( CPPUNIT_LIBRARIES ${CPPUNIT_LIBRARY} )
|
||||
ELSE(CPPUNIT_FOUND)
|
||||
SET( CPPUNIT_LIBRARIES )
|
||||
ENDIF(CPPUNIT_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED( CPPUNIT_LIBRARY CPPUNIT_INCLUDE_DIR )
|
1
include/CMakeLists.txt
Normal file
1
include/CMakeLists.txt
Normal file
|
@ -0,0 +1 @@
|
|||
ADD_SUBDIRECTORY(transport)
|
15
src/CMakeLists.txt
Normal file
15
src/CMakeLists.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
FILE(GLOB SRC *.cpp *.h)
|
||||
FILE(GLOB HEADERS ../../include/transport/*.h)
|
||||
|
||||
# SOURCE_GROUP(headers FILES ${HEADERS})
|
||||
|
||||
ADD_LIBRARY(transport ${HEADERS} ${SRC})
|
||||
|
||||
TARGET_LINK_LIBRARIES(transport -lSwiften -lresolv -lidn -lz -lpthread -lexpat -lidn -lboost_date_time -lboost_system -lboost_filesystem -lboost_program_options -lboost_regex -lboost_thread-mt -lboost_signals -lz -lssl -lcrypto -lexpat -lresolv -lc -lxml2 -export-dynamic)
|
||||
|
||||
|
||||
|
||||
CONFIGURE_FILE(transport.pc.in "${CMAKE_CURRENT_BINARY_DIR}/transport.pc")
|
||||
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/transport.pc" DESTINATION lib/pkgconfig)
|
||||
|
||||
INSTALL(TARGETS transport LIBRARY DESTINATION lib ARCHIVE DESTINATION lib COMPONENT libraries)
|
12
src/transport.pc.in
Normal file
12
src/transport.pc.in
Normal file
|
@ -0,0 +1,12 @@
|
|||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: transport
|
||||
Version: @TRANSPORT_VERSION@
|
||||
Description: NeL @TRANSPORT_VERSION@
|
||||
Reqiures:
|
||||
Libs: -L${libdir}
|
||||
Libs.private: @LIBS@ -lc
|
||||
Cflags: -I${includedir}
|
Loading…
Add table
Reference in a new issue