Skip to content

Commit

Permalink
Merge pull request #20 from Pulse-Eight/rename
Browse files Browse the repository at this point in the history
rename to p8-platform...
  • Loading branch information
Lars Op den Kamp committed Dec 1, 2015
2 parents a1e5905 + 12dde81 commit cce6a49
Show file tree
Hide file tree
Showing 23 changed files with 103 additions and 91 deletions.
54 changes: 27 additions & 27 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
project(platform)
project(p8-platform)

cmake_minimum_required(VERSION 2.8.9)
enable_language(CXX)
Expand All @@ -9,11 +9,11 @@ find_package(Threads REQUIRED)
include(UseMultiArch.cmake)
include(CheckAtomic.cmake)

set(platform_NAME platform)
set(platform_DESCRIPTION "Platform support library")
set(platform_VERSION_MAJOR 2)
set(platform_VERSION_MINOR 0)
set(platform_VERSION_PATCH 0)
set(p8-platform_NAME p8-platform)
set(p8-platform_DESCRIPTION "Pulse-Eight platform support library")
set(p8-platform_VERSION_MAJOR 2)
set(p8-platform_VERSION_MINOR 0)
set(p8-platform_VERSION_PATCH 0)

set(CMAKE_POSITION_INDEPENDENT_CODE on)

Expand All @@ -22,64 +22,64 @@ if(WIN32)
src/windows/os-threads.cpp)
endif()

set(platform_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/include/platform")
set(p8-platform_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/include/p8-platform")
IF(WIN32)
LIST(APPEND platform_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/include/platform/windows")
LIST(APPEND p8-platform_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/include/p8-platform/windows")
ENDIF(WIN32)
set(platform_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
set(p8-platform_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})

if(NOT ${CORE_SYSTEM_NAME} STREQUAL "")
if(${CORE_SYSTEM_NAME} STREQUAL "osx" OR ${CORE_SYSTEM_NAME} STREQUAL "ios")
list(APPEND platform_LIBRARIES "-framework CoreVideo -framework IOKit")
list(APPEND p8-platform_LIBRARIES "-framework CoreVideo -framework IOKit")
endif()
endif()

set(SOURCES src/util/StringUtils.cpp)

add_library(platform ${SOURCES} ${PLAT_SOURCES})
target_link_libraries(platform ${platform_LIBRARIES})
set_target_properties(platform PROPERTIES VERSION ${platform_VERSION_MAJOR}.${platform_VERSION_MINOR}.${platform_VERSION_PATCH}
SOVERSION ${platform_VERSION_MAJOR}.0)
add_library(p8-platform ${SOURCES} ${PLAT_SOURCES})
target_link_libraries(p8-platform ${p8-platform_LIBRARIES})
set_target_properties(p8-platform PROPERTIES VERSION ${p8-platform_VERSION_MAJOR}.${p8-platform_VERSION_MINOR}.${p8-platform_VERSION_PATCH}
SOVERSION ${p8-platform_VERSION_MAJOR}.0)

install(TARGETS platform DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(FILES src/os.h DESTINATION include/platform)
install(TARGETS p8-platform DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(FILES src/os.h DESTINATION include/p8-platform)
IF(WIN32)
INSTALL(FILES src/windows/dlfcn-win32.h
src/windows/os-socket.h
src/windows/os-threads.h
src/windows/os-types.h
DESTINATION include/platform/windows)
DESTINATION include/p8-platform/windows)
ELSE(WIN32)
install(FILES src/posix/os-socket.h
src/posix/os-threads.h
src/posix/os-types.h
DESTINATION include/platform/posix)
DESTINATION include/p8-platform/posix)
ENDIF(WIN32)
install(FILES src/sockets/cdevsocket.h
src/sockets/socket.h
src/sockets/tcp.h
DESTINATION include/platform/sockets)
DESTINATION include/p8-platform/sockets)
install(FILES src/threads/atomics.h
src/threads/mutex.h
src/threads/threads.h
DESTINATION include/platform/threads)
DESTINATION include/p8-platform/threads)
install(FILES src/util/atomic.h
src/util/buffer.h
src/util/StringUtils.h
src/util/StdString.h
src/util/timeutils.h
src/util/util.h
DESTINATION include/platform/util)
DESTINATION include/p8-platform/util)

IF(NOT WIN32)
configure_file(platform.pc.in platform.pc)
install(FILES ${CMAKE_BINARY_DIR}/platform.pc
configure_file(p8-platform.pc.in p8-platform.pc)
install(FILES ${CMAKE_BINARY_DIR}/p8-platform.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR_NOARCH}/pkgconfig)
ENDIF(NOT WIN32)

# config mode
configure_file (platform-config.cmake.in
platform-config.cmake @ONLY)
install(FILES ${CMAKE_BINARY_DIR}/platform-config.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR_NOARCH}/platform)
configure_file (p8-platform-config.cmake.in
p8-platform-config.cmake @ONLY)
install(FILES ${CMAKE_BINARY_DIR}/p8-platform-config.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR_NOARCH}/p8-platform)

6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
p8-platform (2.0.0-1~trusty) trusty; urgency=medium

* renamed to p8-platform

-- Pulse-Eight Packaging <packaging@pulse-eight.com> Tue, 01 Dec 2015 03:22:00 +0100

platform (2.0.0-1~trusty) trusty; urgency=medium

* removed: fstrcmp and StringUtils::CompareFuzzy() +
Expand Down
6 changes: 6 additions & 0 deletions debian/changelog.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
p8-platform (2.0.0-1~#DIST#) #DIST#; urgency=medium

* renamed to p8-platform

-- Pulse-Eight Packaging <packaging@pulse-eight.com> Tue, 01 Dec 2015 03:22:00 +0100

platform (2.0.0-1~#DIST#) #DIST#; urgency=medium

* removed: fstrcmp and StringUtils::CompareFuzzy() +
Expand Down
20 changes: 10 additions & 10 deletions debian/control
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
Source: platform
Source: p8-platform
Priority: extra
Maintainer: Lars Op den Kamp <lars.opdenkamp@pulse-eight.com>
Build-Depends: debhelper (>= 8.0.0), cmake (>= 2.8.9)
Standards-Version: 3.9.2
Section: libs

Package: libplatform-dev
Package: libp8-platform-dev
Section: libdevel
Architecture: any
Multi-Arch: same
Depends: libplatform2 (= ${binary:Version})
Provides: libplatform-dev
Description: Platform support library -- development files
Platform support library
Depends: libp8-platform2 (= ${binary:Version})
Provides: libp8-platform-dev
Description: Pulse-Eight platform support library -- development files
Pulse-Eight platform support library

Package: libplatform2
Package: libp8-platform2
Section: libs
Architecture: any
Multi-Arch: same
Depends: ${shlibs:Depends}, ${misc:Depends}
Provides: libplatform
Description: Platform support library
Platform support library
Provides: libp8-platform
Description: Pulse-Eight platform support library
Pulse-Eight platform support library
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
usr/include/*
usr/lib/*/*.so
usr/lib/pkgconfig/*.pc
usr/lib/platform/*
usr/lib/p8-platform/*
File renamed without changes.
30 changes: 30 additions & 0 deletions p8-platform-config.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# - p8-platform config mode
#
# Defines the following variables:
# p8-platform_FOUND - true
# p8-platform_VERSION - version of the platform library found, e.g. 0.2
# p8-platform_INCLUDE_DIRS - header directories with which to compile
# p8-platform_LINKER_FLAGS - flags that must be passed to the linker
# p8-platform_LIBRARIES - names of the libraries with which to link
# p8-platform_LIBRARY_DIRS - directories in which the libraries are situated
#
# propagate these properties from one build system to the other
set (p8-platform_VERSION "@p8-platform_VERSION_MAJOR@.@p8-platform_VERSION_MINOR@")
set (p8-platform_INCLUDE_DIRS @p8-platform_INCLUDE_DIRS@ @CMAKE_INSTALL_PREFIX@/include)
set (p8-platform_LIBRARY_DIRS "@CMAKE_LIBRARY_OUTPUT_DIRECTORY@")
set (p8-platform_LINKER_FLAGS "@p8-platform_LINKER_FLAGS@")
set (p8-platform_CONFIG_VARS "@p8-platform_CONFIG_VARS@")

# libraries come from the build tree where this file was generated
if(WIN32)
set (p8-platform_LIBRARY "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/p8-platform.lib")
else(WIN32)
set (p8-platform_LIBRARY "-L@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ -lp8-platform")
endif(WIN32)
set (p8-platform_LIBRARIES ${p8-platform_LIBRARY} "@p8-platform_LIBRARIES@")
mark_as_advanced (p8-platform_LIBRARY)

# add the library as a target, so that other things in the project including
# this file may depend on it and get rebuild if this library changes.
add_library (p8-platform UNKNOWN IMPORTED)
set_property (TARGET p8-platform PROPERTY IMPORTED_LOCATION "${p8-platform_LIBRARY}")
10 changes: 10 additions & 0 deletions p8-platform.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
prefix=@CMAKE_INSTALL_PREFIX@
libdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@
includedir=@CMAKE_INSTALL_PREFIX@/include
DEPENDENCIES=@p8-platform_LIBRARIES@

Name: @p8-platform_NAME@
Description: @p8-platform_DESCRIPTION@ @p8-platform_VERSION_MAJOR@.@p8-platform_VERSION_MINOR@
Version: @p8-platform_VERSION_MAJOR@.@p8-platform_VERSION_MINOR@.@p8-platform_VERSION_PATCH@
Libs: -L${libdir} -lp8-platform
Cflags: -I${includedir}
30 changes: 0 additions & 30 deletions platform-config.cmake.in

This file was deleted.

10 changes: 0 additions & 10 deletions platform.pc.in

This file was deleted.

2 changes: 1 addition & 1 deletion src/posix/os-socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
#define SOL_TCP IPPROTO_TCP
#endif

namespace PLATFORM
namespace P8PLATFORM
{
// Standard sockets
//@{
Expand Down
2 changes: 1 addition & 1 deletion src/posix/os-threads.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
# endif
#endif

namespace PLATFORM
namespace P8PLATFORM
{
inline pthread_mutexattr_t *GetRecursiveMutexAttribute(void)
{
Expand Down
2 changes: 1 addition & 1 deletion src/sockets/cdevsocket.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

#include "socket.h"

namespace PLATFORM
namespace P8PLATFORM
{
class CCDevSocket : public CCommonSocket<chardev_socket_t>
{
Expand Down
2 changes: 1 addition & 1 deletion src/sockets/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

// Common socket operations

namespace PLATFORM
namespace P8PLATFORM
{
class ISocket : public PreventCopy
{
Expand Down
2 changes: 1 addition & 1 deletion src/sockets/tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "socket.h"


namespace PLATFORM
namespace P8PLATFORM
{
class CTcpSocket : public CCommonSocket<tcp_socket_t>
{
Expand Down
2 changes: 1 addition & 1 deletion src/threads/atomics.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include "../os.h"

namespace PLATFORM
namespace P8PLATFORM
{
///////////////////////////////////////////////////////////////////////////
// 32-bit atomic compare-and-swap
Expand Down
2 changes: 1 addition & 1 deletion src/threads/mutex.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

#include "../util/timeutils.h"

namespace PLATFORM
namespace P8PLATFORM
{
class PreventCopy
{
Expand Down
2 changes: 1 addition & 1 deletion src/threads/threads.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

#include "mutex.h"

namespace PLATFORM
namespace P8PLATFORM
{
class CThread
{
Expand Down
2 changes: 1 addition & 1 deletion src/util/buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "../threads/mutex.h"
#include <queue>

namespace PLATFORM
namespace P8PLATFORM
{
template<typename _BType>
struct SyncedBuffer
Expand Down
2 changes: 1 addition & 1 deletion src/util/timeutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#include <sys/time.h>
#endif

namespace PLATFORM
namespace P8PLATFORM
{
#if defined(__WINDOWS__)
struct timezone
Expand Down
2 changes: 1 addition & 1 deletion src/windows/os-socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
#define ETIMEDOUT 138
#endif

namespace PLATFORM
namespace P8PLATFORM
{
#ifndef MSG_WAITALL
#define MSG_WAITALL 0x8
Expand Down
2 changes: 1 addition & 1 deletion src/windows/os-threads.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

#include "../os.h"
#include "os-threads.h"
using namespace PLATFORM;
using namespace P8PLATFORM;

static ConditionArg g_InitializeConditionVariable;
static ConditionArg g_WakeConditionVariable;
Expand Down
2 changes: 1 addition & 1 deletion src/windows/os-threads.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* http://www.pulse-eight.net/
*/

namespace PLATFORM
namespace P8PLATFORM
{
#define thread_t HANDLE
#define ThreadsWait(thread, retVal) (::WaitForSingleObject(thread, INFINITE) < 0)
Expand Down

0 comments on commit cce6a49

Please sign in to comment.