Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit ac3092e8 authored by promayon's avatar promayon
Browse files

NEW camitk extension macro has a new optional parameter TARGET_NAME in order...

NEW camitk extension macro has a new optional parameter TARGET_NAME in order specify a target name different than the default (default is the action/component directory name)


git-svn-id: svn+ssh://scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/svn/camitk/trunk/camitk@693 ec899d31-69d1-42ba-9299-647d76f65fb3
parent 3289f05b
...@@ -263,8 +263,8 @@ endmacro() ...@@ -263,8 +263,8 @@ endmacro()
# Simplify writing a camitk extension (component, action) # Simplify writing a camitk extension (component, action)
# #
# usage: # usage:
# extension(<type> # extension(<type>
# [DEFAULT] # [DEFAULT]
# [NEEDS_ITK] # [NEEDS_ITK]
# [NEEDS_LIBXML2] # [NEEDS_LIBXML2]
# [NEEDS_OPENCV] # [NEEDS_OPENCV]
...@@ -279,7 +279,8 @@ endmacro() ...@@ -279,7 +279,8 @@ endmacro()
# [LIBRARIES lib1 lib2 ...] # [LIBRARIES lib1 lib2 ...]
# [HEADERS_TO_INSTALL header1.h header2.h ...] # [HEADERS_TO_INSTALL header1.h header2.h ...]
# [INSTALL_ALL_HEADERS] # [INSTALL_ALL_HEADERS]
# ) # [TARGET_NAME non-default-targetname]
# )
# #
# The name of the extension is automatically the name of the directory from where this macro # The name of the extension is automatically the name of the directory from where this macro
# is called. # is called.
...@@ -293,7 +294,7 @@ endmacro() ...@@ -293,7 +294,7 @@ endmacro()
# NEEDS_XSD = add this if your action needs Codesynthesis xsd cxx (xml schema compiler) # NEEDS_XSD = add this if your action needs Codesynthesis xsd cxx (xml schema compiler)
# NEEDS_OPENCV = add this if your component needs OpenCV # NEEDS_OPENCV = add this if your component needs OpenCV
# NEEDS_IGSTK = add this if your component needs IgsTK # NEEDS_IGSTK = add this if your component needs IgsTK
# NEEDS_XERCESC = add this if your action / component needs XercesC library # NEEDS_XERCESC = add this if your action / component needs XercesC library
# NEEDS_QTXML = this application needs QtXML # NEEDS_QTXML = this application needs QtXML
# NEEDS_TOOL = list of needed camitk tools # NEEDS_TOOL = list of needed camitk tools
# NEEDS_COMPONENT_EXTENSION = list of needed component extensions # NEEDS_COMPONENT_EXTENSION = list of needed component extensions
...@@ -310,13 +311,16 @@ endmacro() ...@@ -310,13 +311,16 @@ endmacro()
# The headers are installed ${CAMITK_INCLUDE_DIR} # The headers are installed ${CAMITK_INCLUDE_DIR}
# when the target "install-COMPONENT_NAMEcomponent" is called. # when the target "install-COMPONENT_NAMEcomponent" is called.
# INSTALL_ALL_HEADERS = install all of the headers (this is the lazy solution, please consider # INSTALL_ALL_HEADERS = install all of the headers (this is the lazy solution, please consider
# making a list and using HEADERS_TO_INSTALL parameter instead! # making a list and using HEADERS_TO_INSTALL parameter instead!
# TARGET_NAME = specify a target name different than the default (default is the action/component directory name)
# this can be very useful for example when you have action/component directory in your CEP that has
# the same name as one in the camitk opensource
macro(camitk_extension) macro(camitk_extension)
get_directory_name(${CMAKE_CURRENT_SOURCE_DIR} EXTENSION_NAME) get_directory_name(${CMAKE_CURRENT_SOURCE_DIR} EXTENSION_NAME)
parse_arguments(${EXTENSION_NAME_CMAKE} #prefix parse_arguments(${EXTENSION_NAME_CMAKE} #prefix
"NEEDS_TOOL;NEEDS_CEP_TOOL;NEEDS_COMPONENT_EXTENSION;NEEDS_ACTION_EXTENSION;INCLUDE_DIRECTORIES;LIBRARIES;HEADERS_TO_INSTALL;DEFINES;EXTERNAL_SOURCES" # possible lists "NEEDS_TOOL;NEEDS_CEP_TOOL;NEEDS_COMPONENT_EXTENSION;NEEDS_ACTION_EXTENSION;INCLUDE_DIRECTORIES;LIBRARIES;HEADERS_TO_INSTALL;DEFINES;EXTERNAL_SOURCES;TARGET_NAME" # possible lists
"ACTION_EXTENSION;COMPONENT_EXTENSION;DEFAULT;NEEDS_XERCESC;NEEDS_ITK;NEEDS_LIBXML2;NEEDS_XSD;NEEDS_QTXML;NEEDS_OPENCV;NEEDS_IGSTK;INSTALL_ALL_HEADERS" # possible options "ACTION_EXTENSION;COMPONENT_EXTENSION;DEFAULT;NEEDS_XERCESC;NEEDS_ITK;NEEDS_LIBXML2;NEEDS_XSD;NEEDS_QTXML;NEEDS_OPENCV;NEEDS_IGSTK;INSTALL_ALL_HEADERS" # possible options
${ARGN} ${ARGN}
) )
...@@ -351,7 +355,11 @@ macro(camitk_extension) ...@@ -351,7 +355,11 @@ macro(camitk_extension)
if (${TYPE_EXTENSION_CMAKE}_${EXTENSION_NAME_CMAKE}) if (${TYPE_EXTENSION_CMAKE}_${EXTENSION_NAME_CMAKE})
# check for target name # check for target name
set(${TYPE_EXTENSION_CMAKE}_TARGET_NAME ${TYPE_EXTENSION}-${EXTENSION_NAME}) if (${EXTENSION_NAME_CMAKE}_TARGET_NAME)
set(${TYPE_EXTENSION_CMAKE}_TARGET_NAME ${${EXTENSION_NAME_CMAKE}_TARGET_NAME})
else()
set(${TYPE_EXTENSION_CMAKE}_TARGET_NAME ${TYPE_EXTENSION}-${EXTENSION_NAME})
endif()
message(STATUS "Building extension ${${TYPE_EXTENSION_CMAKE}_TARGET_NAME}") message(STATUS "Building extension ${${TYPE_EXTENSION_CMAKE}_TARGET_NAME}")
# actions are compiled as shared object # actions are compiled as shared object
......
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
# to be compiled/generated by default # to be compiled/generated by default
# there are some header installation needed # there are some header installation needed
camitk_extension( camitk_extension(
COMPONENT_EXTENSION COMPONENT_EXTENSION
DEFAULT DEFAULT
DEFINES COMPILE_VTK_COMPONENT_API DEFINES COMPILE_VTK_COMPONENT_API
HEADERS_TO_INSTALL VtkMeshComponent.h HEADERS_TO_INSTALL VtkMeshComponent.h
VtkMeshComponentExtension.h VtkMeshComponentExtension.h
VtkMeshComponentRegistrationAddon.h VtkMeshComponentRegistrationAddon.h
VtkMeshComponentAPI.h VtkMeshComponentAPI.h
VtkMeshUtil.h VtkMeshUtil.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