|
From: <gb...@us...> - 2008-09-30 06:28:07
|
Revision: 312
http://gearbox.svn.sourceforge.net/gearbox/?rev=312&view=rev
Author: gbiggs
Date: 2008-09-30 06:27:56 +0000 (Tue, 30 Sep 2008)
Log Message:
-----------
Jumped through all the hoops necessary to fixed building of static libraries on Windows
Modified Paths:
--------------
gearbox/trunk/src/flexiport/CMakeLists.txt
gearbox/trunk/src/flexiport/doc.dox
gearbox/trunk/src/flexiport/flexiport.h
gearbox/trunk/src/flexiport/port.h
gearbox/trunk/src/flexiport/timeout.h
gearbox/trunk/src/hokuyo_aist/CMakeLists.txt
gearbox/trunk/src/hokuyo_aist/doc.dox
gearbox/trunk/src/hokuyo_aist/hokuyo_aist.h
gearbox/trunk/src/hokuyo_aist/test/CMakeLists.txt
Modified: gearbox/trunk/src/flexiport/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/flexiport/CMakeLists.txt 2008-09-30 04:00:05 UTC (rev 311)
+++ gearbox/trunk/src/flexiport/CMakeLists.txt 2008-09-30 06:27:56 UTC (rev 312)
@@ -39,9 +39,12 @@
ENDIF (FLEXIPORT_INCLUDE_LOGGING)
IF (WIN32)
- ADD_DEFINITIONS (-DFLEXIPORT_EXPORTS)
+ IF (GBX_DEFAULT_LIB_TYPE STREQUAL SHARED)
+ ADD_DEFINITIONS (-DFLEXIPORT_EXPORTS)
+ ELSE (GBX_DEFAULT_LIB_TYPE STREQUAL SHARED)
+ ADD_DEFINITIONS (-DFLEXIPORT_STATIC)
+ ENDIF (GBX_DEFAULT_LIB_TYPE STREQUAL SHARED)
ENDIF (WIN32)
- ADD_DEFINITIONS (-DFLEXIPORT_EXPORTS)
GBX_ADD_LIBRARY (${libName} DEFAULT ${srcs})
GBX_ADD_PKGCONFIG (${libName} "FlexiPort generic comms library" "" "" "" "")
GBX_ADD_HEADERS (${libName} ${hdrs})
Modified: gearbox/trunk/src/flexiport/doc.dox
===================================================================
--- gearbox/trunk/src/flexiport/doc.dox 2008-09-30 04:00:05 UTC (rev 311)
+++ gearbox/trunk/src/flexiport/doc.dox 2008-09-30 06:27:56 UTC (rev 312)
@@ -23,8 +23,12 @@
date without the original hardware present.
The @ref SerialPort and @ref TCPPort port types are cross-platform, usable on Linux, Mac OSX and
-Microsoft Windows.
+Microsoft Windows. If this library is compiled as static on Windows, you must define the
+@c FLEXIPORT_STATIC preprocessor variable when compiling code that includes port.h, flexiport.h or
+timeout.h.
+
+
For a full list of classes and functions, see @ref flexiport.
@par Header file
Modified: gearbox/trunk/src/flexiport/flexiport.h
===================================================================
--- gearbox/trunk/src/flexiport/flexiport.h 2008-09-30 04:00:05 UTC (rev 311)
+++ gearbox/trunk/src/flexiport/flexiport.h 2008-09-30 06:27:56 UTC (rev 312)
@@ -32,7 +32,9 @@
#include <string>
#if defined (WIN32)
- #if defined (FLEXIPORT_EXPORTS)
+ #if defined (FLEXIPORT_STATIC)
+ #define FLEXIPORT_EXPORT
+ #elif defined (FLEXIPORT_EXPORTS)
#define FLEXIPORT_EXPORT __declspec (dllexport)
#else
#define FLEXIPORT_EXPORT __declspec (dllimport)
Modified: gearbox/trunk/src/flexiport/port.h
===================================================================
--- gearbox/trunk/src/flexiport/port.h 2008-09-30 04:00:05 UTC (rev 311)
+++ gearbox/trunk/src/flexiport/port.h 2008-09-30 06:27:56 UTC (rev 312)
@@ -32,7 +32,9 @@
#include <map>
#if defined (WIN32)
- #if defined (FLEXIPORT_EXPORTS)
+ #if defined (FLEXIPORT_STATIC)
+ #define FLEXIPORT_EXPORT
+ #elif defined (FLEXIPORT_EXPORTS)
#define FLEXIPORT_EXPORT __declspec (dllexport)
#else
#define FLEXIPORT_EXPORT __declspec (dllimport)
Modified: gearbox/trunk/src/flexiport/timeout.h
===================================================================
--- gearbox/trunk/src/flexiport/timeout.h 2008-09-30 04:00:05 UTC (rev 311)
+++ gearbox/trunk/src/flexiport/timeout.h 2008-09-30 06:27:56 UTC (rev 312)
@@ -29,7 +29,9 @@
#define __TIMEOUT_H
#if defined (WIN32)
- #if defined (FLEXIPORT_EXPORTS)
+ #if defined (FLEXIPORT_STATIC)
+ #define FLEXIPORT_EXPORT
+ #elif defined (FLEXIPORT_EXPORTS)
#define FLEXIPORT_EXPORT __declspec (dllexport)
#else
#define FLEXIPORT_EXPORT __declspec (dllimport)
Modified: gearbox/trunk/src/hokuyo_aist/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/hokuyo_aist/CMakeLists.txt 2008-09-30 04:00:05 UTC (rev 311)
+++ gearbox/trunk/src/hokuyo_aist/CMakeLists.txt 2008-09-30 06:27:56 UTC (rev 312)
@@ -15,7 +15,11 @@
SET (srcs hokuyo_aist.cpp)
IF (WIN32)
- ADD_DEFINITIONS (-DHOKUYO_AIST_EXPORTS)
+ IF (GBX_DEFAULT_LIB_TYPE STREQUAL SHARED)
+ ADD_DEFINITIONS (-DHOKUYO_AIST_EXPORTS)
+ ELSE (GBX_DEFAULT_LIB_TYPE STREQUAL SHARED)
+ ADD_DEFINITIONS (-DHOKUYO_AIST_STATIC -DFLEXIPORT_STATIC)
+ ENDIF (GBX_DEFAULT_LIB_TYPE STREQUAL SHARED)
ENDIF (WIN32)
GBX_ADD_LIBRARY (${libName} DEFAULT ${srcs})
TARGET_LINK_LIBRARIES (${libName} ${reqLibs})
Modified: gearbox/trunk/src/hokuyo_aist/doc.dox
===================================================================
--- gearbox/trunk/src/hokuyo_aist/doc.dox 2008-09-30 04:00:05 UTC (rev 311)
+++ gearbox/trunk/src/hokuyo_aist/doc.dox 2008-09-30 06:27:56 UTC (rev 312)
@@ -13,6 +13,9 @@
For a full list of classes and functions, see @ref hokuyo_aist.
+If this library is compiled as static on Windows, you must define the @c HOKUYO_AIST_STATIC
+preprocessor variable when compiling code that includes hokuyo_aist.h.
+
Header file:
@verbatim
#include <hokuyo_aist/hokuyo_aist.h>
Modified: gearbox/trunk/src/hokuyo_aist/hokuyo_aist.h
===================================================================
--- gearbox/trunk/src/hokuyo_aist/hokuyo_aist.h 2008-09-30 04:00:05 UTC (rev 311)
+++ gearbox/trunk/src/hokuyo_aist/hokuyo_aist.h 2008-09-30 06:27:56 UTC (rev 312)
@@ -34,7 +34,9 @@
#if defined (WIN32)
typedef unsigned char uint8_t;
typedef unsigned int uint32_t;
- #if defined (HOKUYO_AIST_EXPORTS)
+ #if defined (HOKUYO_AIST_STATIC)
+ #define HOKUYO_AIST_EXPORT
+ #elif defined (HOKUYO_AIST_EXPORTS)
#define HOKUYO_AIST_EXPORT __declspec (dllexport)
#else
#define HOKUYO_AIST_EXPORT __declspec (dllimport)
Modified: gearbox/trunk/src/hokuyo_aist/test/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/hokuyo_aist/test/CMakeLists.txt 2008-09-30 04:00:05 UTC (rev 311)
+++ gearbox/trunk/src/hokuyo_aist/test/CMakeLists.txt 2008-09-30 06:27:56 UTC (rev 312)
@@ -1,6 +1,9 @@
INCLUDE (${GBX_CMAKE_DIR}/UseBasicRules.cmake)
GBX_ADD_EXECUTABLE (hokuyo_aist_example example.cpp)
+IF (NOT GBX_DEFAULT_LIB_TYPE STREQUAL SHARED)
+ ADD_DEFINITIONS (-D
+ENDIF (NOT GBX_DEFAULT_LIB_TYPE STREQUAL SHARED)
TARGET_LINK_LIBRARIES (hokuyo_aist_example hokuyo_aist flexiport)
GBX_ADD_EXAMPLE (hokuyo_aist example.cmake.in example.cmake
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|