mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 13:15:12 +00:00
Make header files viewable in IDEs (fixes #424)
This commit is contained in:
parent
5699986d12
commit
dac3858e7d
@ -153,28 +153,31 @@ function(pybind11_enable_warnings target_name)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
set(PYBIND11_HEADERS
|
||||
include/pybind11/attr.h
|
||||
include/pybind11/cast.h
|
||||
include/pybind11/chrono.h
|
||||
include/pybind11/common.h
|
||||
include/pybind11/complex.h
|
||||
include/pybind11/descr.h
|
||||
include/pybind11/eigen.h
|
||||
include/pybind11/eval.h
|
||||
include/pybind11/functional.h
|
||||
include/pybind11/numpy.h
|
||||
include/pybind11/operators.h
|
||||
include/pybind11/pybind11.h
|
||||
include/pybind11/pytypes.h
|
||||
include/pybind11/stl.h
|
||||
include/pybind11/stl_bind.h
|
||||
include/pybind11/typeid.h
|
||||
)
|
||||
string(REPLACE "include/" "${CMAKE_CURRENT_SOURCE_DIR}/include/"
|
||||
PYBIND11_HEADERS "${PYBIND11_HEADERS}")
|
||||
|
||||
if (PYBIND11_TEST)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
if (PYBIND11_INSTALL)
|
||||
set(PYBIND11_HEADERS
|
||||
include/pybind11/attr.h
|
||||
include/pybind11/cast.h
|
||||
include/pybind11/chrono.h
|
||||
include/pybind11/common.h
|
||||
include/pybind11/complex.h
|
||||
include/pybind11/descr.h
|
||||
include/pybind11/eigen.h
|
||||
include/pybind11/functional.h
|
||||
include/pybind11/numpy.h
|
||||
include/pybind11/operators.h
|
||||
include/pybind11/pybind11.h
|
||||
include/pybind11/pytypes.h
|
||||
include/pybind11/stl.h
|
||||
include/pybind11/stl_bind.h
|
||||
include/pybind11/typeid.h
|
||||
)
|
||||
|
||||
install(FILES ${PYBIND11_HEADERS} DESTINATION include/pybind11)
|
||||
endif()
|
||||
|
@ -54,7 +54,9 @@ if(PYBIND11_TEST_FILES_EIGEN_I GREATER -1)
|
||||
endif()
|
||||
|
||||
# Create the binding library
|
||||
pybind11_add_module(pybind11_tests pybind11_tests.cpp ${PYBIND11_TEST_FILES})
|
||||
pybind11_add_module(pybind11_tests pybind11_tests.cpp
|
||||
${PYBIND11_TEST_FILES} ${PYBIND11_HEADERS})
|
||||
|
||||
pybind11_enable_warnings(pybind11_tests)
|
||||
|
||||
if(EIGEN3_FOUND)
|
||||
|
Loading…
Reference in New Issue
Block a user