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
......@@ -279,6 +279,7 @@ endmacro()
# [LIBRARIES lib1 lib2 ...]
# [HEADERS_TO_INSTALL header1.h header2.h ...]
# [INSTALL_ALL_HEADERS]
# [TARGET_NAME non-default-targetname]
# )
#
# The name of the extension is automatically the name of the directory from where this macro
......@@ -311,12 +312,15 @@ endmacro()
# when the target "install-COMPONENT_NAMEcomponent" is called.
# 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!
# 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)
get_directory_name(${CMAKE_CURRENT_SOURCE_DIR} EXTENSION_NAME)
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
${ARGN}
)
......@@ -351,7 +355,11 @@ macro(camitk_extension)
if (${TYPE_EXTENSION_CMAKE}_${EXTENSION_NAME_CMAKE})
# check for target 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}")
# actions are compiled as shared object
......
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