@@ -36,14 +36,15 @@ set(PYTHON_MODULE_EXTENSION ${PYTHON_MODULE_EXTENSION} CACHE INTERNAL "")
3636
3737# NB: when adding a header don't forget to also add it to setup.py
3838set (PYBIND11_HEADERS
39+ include /pybind11/detail/class.h
40+ include /pybind11/detail/common.h
41+ include /pybind11/detail/descr.h
42+ include /pybind11/detail/typeid.h
3943 include /pybind11/attr.h
4044 include /pybind11/buffer_info.h
4145 include /pybind11/cast.h
4246 include /pybind11/chrono.h
43- include /pybind11/class_support.h
44- include /pybind11/common.h
4547 include /pybind11/complex.h
46- include /pybind11/descr.h
4748 include /pybind11/options .h
4849 include /pybind11/eigen.h
4950 include /pybind11/embed.h
@@ -55,7 +56,6 @@ set(PYBIND11_HEADERS
5556 include /pybind11/pytypes.h
5657 include /pybind11/stl.h
5758 include /pybind11/stl_bind.h
58- include /pybind11/typeid.h
5959)
6060string (REPLACE "include/" "${CMAKE_CURRENT_SOURCE_DIR} /include/"
6161 PYBIND11_HEADERS "${PYBIND11_HEADERS} " )
@@ -68,7 +68,7 @@ include(GNUInstallDirs)
6868include (CMakePackageConfigHelpers)
6969
7070# extract project version from source
71- file (STRINGS "${PYBIND11_INCLUDE_DIR} /pybind11/common.h" pybind11_version_defines
71+ file (STRINGS "${PYBIND11_INCLUDE_DIR} /pybind11/detail/ common.h" pybind11_version_defines
7272 REGEX "#define PYBIND11_VERSION_(MAJOR|MINOR|PATCH) " )
7373foreach (ver ${pybind11_version_defines} )
7474 if (ver MATCHES "#define PYBIND11_VERSION_(MAJOR|MINOR|PATCH) +([^ ]+)$" )
@@ -107,8 +107,7 @@ if(NOT (CMAKE_VERSION VERSION_LESS 3.0)) # CMake >= 3.0
107107endif ()
108108
109109if (PYBIND11_INSTALL)
110- install (FILES ${PYBIND11_HEADERS}
111- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} /pybind11)
110+ install (DIRECTORY ${PYBIND11_INCLUDE_DIR} /pybind11 DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} )
112111 # GNUInstallDirs "DATADIR" wrong here; CMake search path wants "share".
113112 set (PYBIND11_CMAKECONFIG_INSTALL_DIR "share/cmake/${PROJECT_NAME} " CACHE STRING "install path for pybind11Config.cmake" )
114113
0 commit comments