endforeach(_p)
## == Some general configuration
-include(cmake/Definitions.cmake)
-include(cmake/Functions.cmake)
-
-## == Find ITK
-find_package(ITK CONFIG REQUIRED)
-include(${ITK_USE_FILE})
-
-## == Find VTK, only if linked against ITK
-set(cpPlugins_USE_VTK 0)
-if(ITKVtkGlue_LOADED)
- find_package(VTK CONFIG REQUIRED)
- include(${VTK_USE_FILE})
- set(cpPlugins_USE_VTK 1)
-endif(ITKVtkGlue_LOADED)
-
-## == Find Qt5, only if linked against VTK
-set(cpPlugins_USE_Qt5 0)
-if(VTK_FOUND)
- if(Qt5_DIR)
- find_package(Qt5 CONFIG REQUIRED COMPONENTS Widgets)
- set(CMAKE_INCLUDE_CURRENT_DIR ON)
- set(CMAKE_AUTOMOC ON)
- set(cpPlugins_USE_Qt5 1)
- endif(Qt5_DIR)
-endif(VTK_FOUND)
-
-## == Build packages
-subdirs(appli lib)
-
-## == Installation commands
-include(cmake/InstallCommands.cmake)
+include(cmake/cpPlgDefinitions.cmake)
+include(cmake/cpPlgFunctions.cmake)
+
+## == User could choose not to build
+option(cpPlugins_BUILD "Build targets." OFF)
+if(cpPlugins_BUILD)
+
+ ## == Find ITK
+ find_package(ITK CONFIG REQUIRED)
+ include(${ITK_USE_FILE})
+
+ ## == Find VTK, only if linked against ITK
+ set(cpPlugins_USE_VTK 0)
+ if(ITKVtkGlue_LOADED)
+ find_package(VTK CONFIG REQUIRED)
+ include(${VTK_USE_FILE})
+ set(cpPlugins_USE_VTK 1)
+ endif(ITKVtkGlue_LOADED)
+
+ ## == Find Qt5, only if linked against VTK
+ set(cpPlugins_USE_Qt5 0)
+ if(VTK_FOUND)
+ if(Qt5_DIR)
+ find_package(Qt5 CONFIG REQUIRED COMPONENTS Widgets)
+ set(CMAKE_INCLUDE_CURRENT_DIR ON)
+ set(CMAKE_AUTOMOC ON)
+ set(cpPlugins_USE_Qt5 1)
+ endif(Qt5_DIR)
+ endif(VTK_FOUND)
+
+ ## == Build packages
+ subdirs(appli lib)
+
+endif(cpPlugins_BUILD)
+
+## == CMake scripts
+subdirs(cmake)
## eof - $RCSfile$
--- /dev/null
+## =========================================================================
+## @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co)
+## =========================================================================
+
+include(cpPlgInstallCommands.cmake)
+
+#INSTALL: cpPlgDefinitions.cmake
+#INSTALL: cpPlgFunctions.cmake
+#INSTALL: cpPlgInstallCommands.cmake
+
+## eof - $RCSfile$
+
"${version_config}" COMPATIBILITY SameMajorVersion
)
configure_package_config_file(
- "cmake/${PROJECT_NAME}Config.cmake.in"
+ "${PROJECT_NAME}Config.cmake.in"
"${project_config}"
INSTALL_DESTINATION "${config_install_dir}"
)
-install(
- EXPORT "${targets_export_name}"
- NAMESPACE "${namespace}"
- DESTINATION "${config_install_dir}"
- )
+if(${PROJECT_NAME}_BUILD)
+ install(
+ EXPORT "${targets_export_name}"
+ NAMESPACE "${namespace}"
+ DESTINATION "${config_install_dir}"
+ )
+endif(${PROJECT_NAME}_BUILD)
install(
FILES "${project_config}"
DESTINATION "${config_install_dir}"
+## == Some general configuration
+include(@CMAKE_INSTALL_PREFIX@/lib/cmake/@PROJECT_NAME@/cpPlgDefinitions.cmake)
+include(@CMAKE_INSTALL_PREFIX@/lib/cmake/@PROJECT_NAME@/cpPlgFunctions.cmake)
+
+## == Automatically generated commands
@PACKAGE_INIT@
include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake")
check_required_components("@PROJECT_NAME@")
-## ===========================================
-## == Find needed packages and dependencies ==
-## ===========================================
-
-set(ITK_DIR "@ITK_DIR@")
-set(VTK_DIR "@VTK_DIR@")
-set(Qt5_DIR "@Qt5_DIR@")
+## ======================================
+## == Needed packages and dependencies ==
+## ======================================
+## == Find ITK
find_package(ITK CONFIG REQUIRED)
include(${ITK_USE_FILE})
-if(NOT "${VTK_DIR}" STREQUAL "")
+
+## == Find VTK, only if linked against ITK
+set(cpPlugins_USE_VTK 0)
+if(ITKVtkGlue_LOADED)
find_package(VTK CONFIG REQUIRED)
include(${VTK_USE_FILE})
-endif(NOT "${VTK_DIR}" STREQUAL "")
-if(NOT "${Qt5_DIR}" STREQUAL "")
- find_package(Qt5 CONFIG REQUIRED COMPONENTS Widgets)
- set(CMAKE_INCLUDE_CURRENT_DIR ON)
- set(CMAKE_AUTOMOC ON)
-endif(NOT "${Qt5_DIR}" STREQUAL "")
+ set(cpPlugins_USE_VTK 1)
+endif(ITKVtkGlue_LOADED)
+
+## == Find Qt5, only if linked against VTK
+set(cpPlugins_USE_Qt5 0)
+if(VTK_FOUND)
+ if(Qt5_DIR)
+ find_package(Qt5 CONFIG REQUIRED COMPONENTS Widgets)
+ set(CMAKE_INCLUDE_CURRENT_DIR ON)
+ set(CMAKE_AUTOMOC ON)
+ set(cpPlugins_USE_Qt5 1)
+ endif(Qt5_DIR)
+endif(VTK_FOUND)
## eof - $RCSfile$