CMakeLists.txt 1.3 KB
Newer Older
1
2
3
4
5
6
cmake_minimum_required(VERSION 3.5)
project(muparser VERSION 1.34 LANGUAGES CXX)

include(GNUInstallDirs)

set(PUGIXML_HEADERS
7
8
  include/pugixml/pugiconfig.hpp
  include/pugixml/pugixml.hpp)
9
10
11
12
13
14
set(PUGIXML_SOURCES src/pugixml.cpp)
add_library(PugiXML ${PUGIXML_HEADERS} ${PUGIXML_SOURCES})
add_library(PugiXML::PugiXML ALIAS PugiXML)

target_include_directories(PugiXML
  PUBLIC
15
16
    $<INSTALL_INTERFACE:include>
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
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
)

configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/PugiXMLConfig.cmake.in
  ${PROJECT_BINARY_DIR}/PugiXMLConfig.cmake
  INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/pugixml/cmake
)

install(FILES ${NANOFLANN_HEADERS} DESTINATION include/pugixml)

install(FILES
  ${PROJECT_BINARY_DIR}/PugiXMLConfig.cmake
  DESTINATION ${CMAKE_INSTALL_LIBDIR}/pugixml/cmake)

install(TARGETS PugiXML
  EXPORT PugiXML-export
  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/pugixml
  ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/pugixml
)

install(EXPORT PugiXML-export
  FILE PugiXMLTargets.cmake
  NAMESPACE PugiXML::
  DESTINATION ${CMAKE_INSTALL_LIBDIR}/pugixml/cmake
)

# exports
export(EXPORT PugiXML-export
  FILE ${CMAKE_CURRENT_BINARY_DIR}/PugiXMLTargets.cmake
  NAMESPACE PugiXML::)

# Register the package in the user's package registry.
export(PACKAGE PugiXML)