The expiration time for new job artifacts in CI/CD pipelines is now 30 days (GitLab default). Previously generated artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Commit 2a4b47b3 authored by schultezub's avatar schultezub
Browse files

* Updated CMake files to include additional link directories

* Added GenericPointerData class

git-svn-id: https://camplinux.in.tum.de/svn/campvis/trunk@480 bb408c1c-ae56-11e1-83d9-df6b3e0c105e
parent 9c2d29ba
......@@ -31,6 +31,8 @@ ENDIF()
include(cmake/commonconf.cmake)
include(cmake/parseModulesDir.cmake)
SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON)
MESSAGE(STATUS "--------------------------------------------------------------------------------")
IF(CAMPVIS_BUILD_LIB_TGT)
......@@ -59,7 +61,7 @@ ENDIF()
#
IF(WIN32)
# gather Qt4 DLLs - TODO: remove redundant naming of required components
FIND_PACKAGE(Qt4DLLs COMPONENTS QtCore QtGui QtOpenGL)
FIND_PACKAGE(Qt4DLLs COMPONENTS QtCore QtGui QtOpenGL QtNetwork QtXmlPatterns)
LIST(APPEND CampvisExternalDllsDebug ${QT_DEBUG_DLLS})
LIST(APPEND CampvisExternalDllsRelease ${QT_RELEASE_DLLS})
......
......@@ -54,6 +54,7 @@ QT4_WRAP_CPP(CampvisApplicationMoc ${CampvisApplicationToBeMocced})
LIST(APPEND CampvisApplicationSources ${CampvisApplicationMoc})
INCLUDE(${QT_USE_FILE})
LINK_DIRECTORIES(${CampvisGlobalLinkDirectories} ${CampvisModulesLinkDirectories})
ADD_EXECUTABLE(campvis-application
${CampvisApplicationSources} ${CampvisApplicationHeaders}
......
......@@ -31,10 +31,13 @@ FOREACH(ModDir ${ModDirs})
LIST(APPEND CampvisModulesDefinitions ${ThisModDefinitions})
LIST(APPEND CampvisModulesIncludeDirs ${ThisModIncludeDirs})
LIST(APPEND CampvisModulesExternalLibs ${ThisModExternalLibs})
LIST(APPEND CampvisModulesLinkDirectories ${ThisModLinkDirectories})
LIST(APPEND CampvisModulesSources ${ThisModSources})
LIST(APPEND CampvisModulesHeaders ${ThisModHeaders})
LIST(APPEND CampvisModulesCoreSources ${ThisModCoreSources})
LIST(APPEND CampvisModulesCoreHeaders ${ThisModCoreHeaders})
LIST(APPEND CampvisExternalDllsDebug ${ThisModExternalDllsDebug})
LIST(APPEND CampvisExternalDllsRelease ${ThisModExternalDllsRelease})
# add definition that this module is activated
LIST(APPEND CampvisGlobalDefinitions -DCAMPVIS_HAS_MODULE_${ModDirUpper})
......@@ -43,10 +46,13 @@ FOREACH(ModDir ${ModDirs})
UNSET(ThisModDefinitions)
UNSET(ThisModIncludeDirs)
UNSET(ThisModExternalLibs)
UNSET(ThisModLinkDirectories)
UNSET(ThisModSources)
UNSET(ThisModHeaders)
UNSET(ThisModCoreSources)
UNSET(ThisModCoreHeaders)
UNSET(ThisModExternalDllsDebug)
UNSET(ThisModExternalDllsRelease)
ELSE()
MESSAGE(STATUS "* Found Module '${ModDir}'")
ENDIF(CAMPVIS_BUILD_MODULE_${ModDirUpper})
......
// ================================================================================================
//
// This file is part of the CAMPVis Software Framework.
//
// If not explicitly stated otherwise: Copyright (C) 2012, all rights reserved,
// Christian Schulte zu Berge <christian.szb@in.tum.de>
// Chair for Computer Aided Medical Procedures
// Technische Universität München
// Boltzmannstr. 3, 85748 Garching b. München, Germany
// For a full list of authors and contributors, please refer to the file "AUTHORS.txt".
//
// The licensing of this softare is not yet resolved. Until then, redistribution in source or
// binary forms outside the CAMP chair is not permitted, unless explicitly stated in legal form.
// However, the names of the original authors and the above copyright notice must retain in its
// original state in any case.
//
// Legal disclaimer provided by the BSD license:
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
// ================================================================================================
#ifndef GENERICPOINTERDATA_H__
#define GENERICPOINTERDATA_H__
#include "core/datastructures/abstractdata.h"
#include <string>
namespace campvis {
/**
* Class that generically wraps around a pointer of the template type and takes ownership of it.
* \tparam T Type of the pointer this AbstractData wraps around.
*/
template<typename T>
class GenericPointerData : public AbstractData {
public:
/**
* Creates a new GenericPointerData and initializes its pointer with \a data.
* \param data The initial pointer for this data, may be 0, GenericPointerData takes ownerwhip.
*/
GenericPointerData(T* data)
: AbstractData()
, _data(data)
{};
/**
* Destructor, deletes the pointer.
*/
virtual ~GenericPointerData() {
delete _data;
};
/**
* Returns the pointer to the wrapped data.
* \return _data, may be 0, GenericPointerData has ownership
*/
const T* getData() const {
return _data;
};
/**
* Returns the pointer to the wrapped data.
* \return _data, may be 0, GenericPointerData has ownership
*/
T* getData() {
return _data;
};
/**
* Sets the data to \a data.
* \param data The new pointer for this data, may be 0, GenericPointerData takes ownerwhip.
*/
void setData(T* data) {
_data = data;
};
/**
* Prototype - clone method, some people call this virtual constructor...
* \return A SHALLOW copy of this object.
*/
virtual AbstractData* clone() const {
// FIXME: This is only a shallow copy - not what you expect from clone!
return new GenericPointerData<T>(_data);
};
/**
* Returns the local memory footprint of the data in bytes.
* \return Number of bytes occupied in local memory by the data.
*/
virtual size_t getLocalMemoryFootprint() const {
return sizeof(T) + sizeof(T*);
};
/**
* Returns the video memory footprint of the data in bytes.
* \return Number of bytes occupied in video memory by the data.
*/
virtual size_t getVideoMemoryFootprint() const {
return 0;
};
protected:
T* _data; ///< Pointer to the data.
};
}
#endif // GENERICPOINTERDATA_H__
......@@ -4,6 +4,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR)
MESSAGE(STATUS "Configuring Campvis Modules")
LINK_DIRECTORIES(${CampvisGlobalLinkDirectories} ${CampvisModulesLinkDirectories})
ADD_LIBRARY(campvis-modules
${CampvisModulesSources} ${CampvisModulesHeaders}
)
......@@ -13,7 +14,6 @@ ADD_LIBRARY(campvis-modules
FIND_PACKAGE(Qt4 ${CampvisRequiredQtVersion} REQUIRED QtCore QtGui QtOpenGL)
INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${CampvisGlobalDefinitions} ${CampvisModulesDefinitions} ${QT_DEFINITIONS})
INCLUDE_DIRECTORIES(${CampvisGlobalIncludeDirs} ${CampvisModulesIncludeDirs})
TARGET_LINK_LIBRARIES(campvis-modules campvis-core tgt ${CampvisGlobalExternalLibs} ${CampvisModulesExternalLibs} ${QT_LIBRARIES})
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment