[go: up one dir, main page]

File: CMakeLists.txt

package info (click to toggle)
lasi 1.1.0-1.1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,420 kB
  • ctags: 1,269
  • sloc: cpp: 1,049; makefile: 13
file content (128 lines) | stat: -rw-r--r-- 3,510 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# Top-level CMakeLists.txt for libLASi
###
### Process this file with cmake to produce Makefile
###

# Version 2.4.5 or above of cmake is required!
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.5 FATAL_ERROR)

project(libLASi CXX)

set(PACKAGE lasi)

# Location where libLASi cmake build system first looks for cmake modules.
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules)

# Version information.

include(lasi_version)

enable_testing()

# parameters to control overall cmake behaviour.

# Configure libLASi component variables....

include(lasi)

# Use configured variables to process configurable top-level files.

configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake 
${CMAKE_CURRENT_BINARY_DIR}/config.h
)

configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/lasi.pc.in
${CMAKE_CURRENT_BINARY_DIR}/lasi.pc
)

install(FILES
${CMAKE_CURRENT_BINARY_DIR}/lasi.pc 
DESTINATION ${PKG_CONFIG_DIR}
)

install(FILES include/LASi.h DESTINATION ${includedir})

add_subdirectory(src)

add_subdirectory(examples)

#
# Generating documentation with doxygen
#
if(DOXYGEN_EXECUTABLE AND UNIX)
  
  # N.B. Both the following custom rules assume the doc directory exists
  # at make time, and the following install(DIRECTORY... must have doc exist
  # at cmake time.  Therefore, create the doc directory at CMake time.
  # (Linux experimentation indicates this is a no-op if the empty or
  # non-empty directory already exists.)
  file(MAKE_DIRECTORY ${CMAKE_SOURCE_DIR}/doc)

  # The initial rm command gets rid of everything previously built by this
  # custom command.
  add_custom_command(
  OUTPUT ${CMAKE_SOURCE_DIR}/doc/user/html/index.html
  COMMAND rm -rf ${CMAKE_SOURCE_DIR}/doc/user
  COMMAND mkdir ${CMAKE_SOURCE_DIR}/doc/user
  COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_SOURCE_DIR}/Doxyfile.user
  DEPENDS ${CMAKE_SOURCE_DIR}/Doxyfile.user
  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
  )

  # The initial rm command gets rid of everything previously built by this
  # custom command.
  add_custom_command(
  OUTPUT ${CMAKE_SOURCE_DIR}/doc/developer/html/index.html
  COMMAND rm -rf ${CMAKE_SOURCE_DIR}/doc/developer
  COMMAND mkdir ${CMAKE_SOURCE_DIR}/doc/developer
  COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_SOURCE_DIR}/Doxyfile.developer
  DEPENDS ${CMAKE_SOURCE_DIR}/Doxyfile.developer
  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
  )

  add_custom_target(
  documentation ALL
  DEPENDS
  ${CMAKE_SOURCE_DIR}/doc/user/html/index.html
  ${CMAKE_SOURCE_DIR}/doc/developer/html/index.html
  )
  
  # Install the documentation generated at "make" time.
  install(DIRECTORY ${CMAKE_SOURCE_DIR}/doc/ DESTINATION ${docdir}/html)

endif(DOXYGEN_EXECUTABLE AND UNIX)

#
# Packing stuff
#
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
"The PostScript Complex Text Layout Library, LASi")
set(CPACK_PACKAGE_VENDOR "Ed Trager <ed.trager@gmail.com>")
set(CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_CURRENT_SOURCE_DIR}/README)
if(WIN32)
  set(CPACK_GENERATOR ZIP)
else(WIN32)
  set(CPACK_GENERATOR TGZ)
endif(WIN32)
set(
CPACK_SOURCE_PACKAGE_FILE_NAME
"libLASi-${VERSION}"
CACHE INTERNAL "tarball basename"
)
if(WIN32)
  set(CPACK_SOURCE_GENERATOR ZIP)
else(WIN32)
  set(CPACK_SOURCE_GENERATOR TGZ)
endif(WIN32)
# The following components are regex's to match anywhere (unless anchored)
# in absolute path + filename to find files or directories to be excluded
# from source tarball.
set(CPACK_SOURCE_IGNORE_FILES
"~$"
"^${PROJECT_SOURCE_DIR}.*\\\\.svn/"
)
#message("CPACK_SOURCE_IGNORE_FILES = ${CPACK_SOURCE_IGNORE_FILES}")
include(CPack)
summary()