Commit ac9cbe81 authored by promayon's avatar promayon

UPDATED CEP macro management

FIXED (minor) unnecessary includes 


git-svn-id: svn+ssh://scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/svn/camitk/trunk/camitk@707 ec899d31-69d1-42ba-9299-647d76f65fb3
parent 1422daf6
......@@ -47,11 +47,11 @@ camitk_sub_project_init()
# add all subprojects
add_subdirectory(cmake) # rules for cmake install
add_subdirectory(applications)
add_subdirectory(actions)
add_subdirectory(components)
camitk_add_subdirectory(applications)
camitk_add_subdirectory(actions)
camitk_add_subdirectory(components)
add_subdirectory(core)
add_subdirectory(tools)
camitk_add_subdirectory(tools)
# Validate and write down the Project.xml file
# This file contains all the CamiTK project description with subprojects and their CMake target dependencies
......
......@@ -46,7 +46,6 @@
#include <vtkPolyDataNormals.h>
#include <vtkPolyDataConnectivityFilter.h>
#include <vtkPolyDataWriter.h>
#include <vtkPolyDataMapper.h>
#include <vtkMarchingCubes.h>
#include <vtkPointSet.h>
#include <vtkCallbackCommand.h>
......
......@@ -28,7 +28,7 @@
macro(camitk_cep_packaging)
# CEP Packaging only works for stand-alone CEP
if (NOT CAMITK_MULTI_CEP)
if (NOT CAMITK_EXTENSION_PROJECT_SET)
parse_arguments(CAMITK_CEP_PACKAGING
"NAME;VENDOR;CONTACT;APPLICATIONS;DESCRIPTION" # possible lists
......
#
# CamitK Macros
# CamiTK Macros
#
# MACRO get_subdirectories
......@@ -129,6 +129,28 @@ macro(get_directory_name FullPathDirectory VariableName)
string(TOUPPER ${${VariableName}} ${VariableName}_CMAKE)
endmacro()
#!
#! \addtogroup CamiTKMacros
#!
#! cep_add_subdirectory is a utility macro that add a source subdirectory only if:
#! 1. it exists
#! 2. it contains a CMakeLists
#! This can avoid CMake warning (see cmake --help-policy CMP0014), but do the
#! opposite: it prints out an information message when it succeed including the directory.
#!
#! Usage:
#! \code
#! cep_add_subdirectory(subdir)
#! \endcode
#!
#! \param subdir (required) the name of the source subdirectory to include
macro(camitk_add_subdirectory DirectoryName)
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${DirectoryName} AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${DirectoryName}/CMakeLists.txt)
message(STATUS "${CMAKE_PROJECT_NAME} ${CEP_NAME} provides ${DirectoryName}:")
add_subdirectory(${DirectoryName})
endif()
endmacro()
#!
#! \addtogroup CamiTKMacros
#!
......
......@@ -30,9 +30,9 @@ endif()
# CamiTK short version name we are looking for
set(CAMITK_SHORT_VERSION_STRING "camitk-${CAMITK_VER_MAJ}.${CAMITK_VER_MIN}")
# CAMITK_MULTI_CEP is not set if find(CamiTK) is called by a single CamiTK Extension Project
# if there is a multitude of CEP, set CAMITK_MULTI_CEP to TRUE in the global CMakeLists.txt
if (NOT CAMITK_MULTI_CEP)
# CAMITK_EXTENSION_PROJECT_SET is not set if find(CamiTK) is called by a single CamiTK Extension Project
# if there is more than one CEP, set CAMITK_EXTENSION_PROJECT_SET to TRUE in the global CMakeLists.txt
if (NOT CAMITK_EXTENSION_PROJECT_SET)
# first check if we can use the build version directly
find_path(CAMITK_ROOT_DIR_GUESS
......@@ -62,7 +62,7 @@ else()
set(CAMITK_BUILD_ROOT ${CMAKE_CURRENT_BINARY_DIR}/..)
# This is a multi CEP, CAMITK_INSTALL_ROOT should be set
message(STATUS "Find CamiTK inside multi CEP: ${CAMITK_INSTALL_ROOT}")
endif() # CAMITK_MULTI_CEP
endif() # CAMITK_EXTENSION_PROJECT_SET
if (NOT CAMITK_INSTALL_ROOT)
......
......@@ -361,6 +361,8 @@ class CAMITK_API Geometry : public InterfaceGeometry {
double oldAlphaPoints;
double oldPointsColor[4];
///@}
protected:
vtkSmartPointer< vtkPointSet > New();
};
......
......@@ -69,7 +69,6 @@
// ---- Text in the background
#include <vtkTextSource.h>
#include <vtkVectorText.h>
#include <vtkPolyDataMapper.h>
#include <vtkProperty.h>
#include <vtkTransformPolyDataFilter.h>
#include <vtkTextMapper.h>
......
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