Switched PoyVox to build as a static library.

This commit is contained in:
David Williams
2011-04-20 23:25:32 +01:00
parent a5f37d7a3a
commit ef52b906e6
21 changed files with 71 additions and 86 deletions

View File

@ -9,14 +9,13 @@ SET(UTIL_SRC_FILES
#Projects headers files
SET(UTIL_INC_FILES
include/Export.h
include/Serialization.h
include/Serialization.inl
include/VolumeChangeTracker.h
include/VolumeChangeTracker.inl
)
ADD_DEFINITIONS(-DPOLYVOXUTIL_EXPORT) #Export symbols in the .dll
ADD_DEFINITIONS(-DPOLYVOX_SHARED_EXPORTS) #Export symbols in the .dll
#"Sources" and "Headers" are the group names in Visual Studio.
#They may have other uses too...
@ -30,7 +29,7 @@ LINK_DIRECTORIES(${PolyVoxCore_BINARY_DIR}/debug ${PolyVoxCore_BINARY_DIR}/relea
#Util
#Build
ADD_LIBRARY(PolyVoxUtil SHARED ${UTIL_SRC_FILES} ${UTIL_INC_FILES})
ADD_LIBRARY(PolyVoxUtil STATIC ${UTIL_SRC_FILES} ${UTIL_INC_FILES})
TARGET_LINK_LIBRARIES(PolyVoxUtil PolyVoxCore)
SET_TARGET_PROPERTIES(PolyVoxUtil PROPERTIES VERSION ${POLYVOX_VERSION} SOVERSION ${POLYVOX_VERSION_MAJOR})
IF(MSVC)

View File

@ -1,37 +0,0 @@
/*******************************************************************************
Copyright (c) 2005-2009 David Williams
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
*******************************************************************************/
#ifndef __PolyVoxUtil_Export_H__
#define __PolyVoxUtil_Export_H__
#ifdef WIN32
#ifdef POLYVOXUTIL_EXPORT
#define POLYVOXUTIL_API __declspec(dllexport)
#else
#define POLYVOXUTIL_API __declspec(dllimport)
#endif
#else
#define POLYVOXUTIL_API __attribute__ ((visibility("default")))
#endif
#endif

View File

@ -26,7 +26,6 @@ freely, subject to the following restrictions:
#include "PolyVoxForwardDeclarations.h"
#include "Region.h"
#include "Export.h"
#include <iostream>
#include <memory>

View File

@ -28,7 +28,6 @@ freely, subject to the following restrictions:
#include "PolyVoxForwardDeclarations.h"
#include "Region.h"
#include "Export.h"
namespace PolyVox
{

View File

@ -2,7 +2,7 @@
namespace PolyVox
{
class POLYVOXCORE_API DummyClass
class POLYVOX_API DummyClass
{
public:
int getx(void);