1#############################################################################
2#
3# ViSP, open source Visual Servoing Platform software.
4# Copyright (C) 2005 - 2019 by Inria. All rights reserved.
5#
6# This software is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2 of the License, or
9# (at your option) any later version.
10# See the file LICENSE.txt at the root directory of this source
11# distribution for additional information about the GNU GPL.
12#
13# For using ViSP with software that can not be combined with the GNU
14# GPL, please contact Inria about acquiring a ViSP Professional
15# Edition License.
16#
17# See http://visp.inria.fr for more information.
18#
19# This software was developed at:
20# Inria Rennes - Bretagne Atlantique
21# Campus Universitaire de Beaulieu
22# 35042 Rennes Cedex
23# France
24#
25# If you have questions regarding the use of this file, please contact
26# Inria at visp@inria.fr
27#
28# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
29# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
30#
31# Description:
32# ViSP packaging configuration file.
33#
34# Authors:
35# Fabien Spindler
36#
37#############################################################################
38
39
40message(STATUS "Configuring CPack")
41#mark_as_advanced(BUILD_PACKAGE)
42
43
44SET(CPACK_PACKAGE_NAME "libvisp")
45SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Visual tracking and visual servoing library in C++ (development files)")
46SET(CPACK_PACKAGE_CONTACT "Fabien Spindler <Fabien.Spindler@inria.fr>")
47SET(CPACK_PACKAGE_VENDOR "Inria, French National Institute for Research in Computer Science and Control")
48SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.txt")
49SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt")
50
51SET(CPACK_PACKAGE_VERSION ${VISP_VERSION})
52SET(CPACK_PACKAGE_VERSION_MAJOR ${VISP_VERSION_MAJOR})
53SET(CPACK_PACKAGE_VERSION_MINOR ${VISP_VERSION_MINOR})
54SET(CPACK_PACKAGE_VERSION_PATCH ${VISP_VERSION_PATCH})
55
56SET(CPACK_COMPONENTS_ALL libraries headers)
57SET(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "Libraries")
58SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ Headers")
59SET(CPACK_COMPONENT_LIBRARIES_DESCRIPTION "ViSP ${VISP_VERSION} libraries")
60SET(CPACK_COMPONENT_HEADERS_DESCRIPTION "C/C++ header files for use with ViSP ${VISP_VERSION} libraries")
61SET(CPACK_COMPONENT_HEADERS_DEPENDS libraries)
62SET(CPACK_COMPONENT_LIBRARIES_GROUP "Development")
63SET(CPACK_COMPONENT_HEADERS_GROUP "Development")
64SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION "All of the tools you'll ever need to develop software with ViSP")
65SET(CPACK_ALL_INSTALL_TYPES Full Developer)
66SET(CPACK_COMPONENT_LIBRARIES_INSTALL_TYPES Developer Full)
67SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full)
68
69# The following components are regex's to match anywhere (unless anchored)
70# in absolute path + filename to find files or directories to be excluded
71# from source tarball.
72SET(CPACK_SOURCE_IGNORE_FILES
73  "/\\\\.svn/"
74  "/autom4te.cache/"
75  "/build/"
76  "/lib/"
77  "~$"
78)
79
80SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME} ${VISP_VERSION}")
81
82# In ViSP packages we only want to have the libraries and the headers (nor the demo, example, and test)
83# That's why we turn off the demo, example and test building
84SET(BUILD_DEMOS OFF CACHE BOOL "Build ViSP demos." FORCE )
85SET(BUILD_EXAMPLES OFF CACHE BOOL "Build ViSP examples." FORCE)
86SET(BUILD_TESTING OFF CACHE BOOL "Build ViSP tests." FORCE)
87SET(BUILD_TUTORIAL OFF CACHE BOOL "Build ViSP tutorials." FORCE)
88
89
90if(UNIX)
91  set(CMAKE_INSTALL_PREFIX "/usr" CACHE String "Package install prefix" FORCE)
92elseif(WIN32)
93  set(CMAKE_INSTALL_PREFIX "C:/Program Files/ViSP ${VISP_VERSION}" CACHE String "Package install prefix" FORCE)
94endif()
95
96set(BUILD_SHARED_LIBS ON CACHE BOOL "Build ViSP with shared libraries." FORCE)
97
98
99if(WIN32 AND NOT UNIX)
100  include(${VISP_CMAKE_MODULE_PATH}/CPackConfigNsis.cmake)
101elseif(APPLE)
102  set(CPACK_GENERATOR "PackageMaker;TBZ2")
103elseif(UNIX)
104  if(BUILD_PACKAGE_DEBIAN)
105    include(${VISP_CMAKE_MODULE_PATH}/CPackConfigDeb.cmake)
106  elseif(BUILD_PACKAGE_RPM)
107    include(${VISP_CMAKE_MODULE_PATH}/CPackConfigRpm.cmake)
108  endif()
109endif()
110
111INCLUDE(CPack)
112