File: CMakeLists.txt

package info (click to toggle)
moarvm 2022.12%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 42,724 kB
  • sloc: cpp: 378,682; ansic: 288,257; perl: 8,229; java: 2,682; python: 1,287; makefile: 820; sh: 292
file content (70 lines) | stat: -rw-r--r-- 2,040 bytes parent folder | download | duplicates (2)
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
cmake_minimum_required(VERSION 2.8.12)
project(double-conversion)

include(GNUInstallDirs)

# pick a version #
set(double-conversion_VERSION 2.0.1)
set(double-conversion_SOVERSION_MAJOR 1)
set(double-conversion_SOVERSION_MINOR 0)
set(double-conversion_SOVERSION_PATCH 0)
set(double-conversion_SOVERSION
  ${double-conversion_SOVERSION_MAJOR}.${double-conversion_SOVERSION_MINOR}.${double-conversion_SOVERSION_PATCH})

# set suffix for CMake files used for packaging
if(WIN32 AND NOT CYGWIN)
  set(INSTALL_CMAKE_DIR CMake)
else()
  set(INSTALL_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/double-conversion)
endif()

# Add src subdirectory
add_subdirectory(double-conversion)

#
# set up testing if requested
option(BUILD_TESTING "Build test programs" OFF)
if(BUILD_TESTING)
  enable_testing()
  include(CTest)
  add_subdirectory(test)
endif()

#
# mention the library target as export library
export(TARGETS double-conversion
  FILE "${PROJECT_BINARY_DIR}/double-conversionLibraryDepends.cmake")

#
# set this build as an importable package
export(PACKAGE double-conversion)

#
# make a cmake file -- in this case, all that needs defining
# is double-conversion_INCLUDE_DIRS
configure_file(double-conversionBuildTreeSettings.cmake.in
  "${PROJECT_BINARY_DIR}/double-conversionBuildTreeSettings.cmake"
  @ONLY)

#
# sets up config to be used by CMake find_package
configure_file(double-conversionConfig.cmake.in
  "${PROJECT_BINARY_DIR}/double-conversionConfig.cmake"
  @ONLY)
#
# Export version # checked by find_package
configure_file(double-conversionConfigVersion.cmake.in
  "${PROJECT_BINARY_DIR}/double-conversionConfigVersion.cmake"
  @ONLY)
#
# install config files for find_package
install(FILES
  "${PROJECT_BINARY_DIR}/double-conversionConfig.cmake"
  "${PROJECT_BINARY_DIR}/double-conversionConfigVersion.cmake"
  DESTINATION "${INSTALL_CMAKE_DIR}" COMPONENT dev)


#
# generates install cmake files to find libraries in installation.
install(EXPORT double-conversionLibraryDepends DESTINATION
  "${INSTALL_CMAKE_DIR}" COMPONENT dev)