Skip to content

Commit

Permalink
Merge pull request #15 from lukacu/master
Browse files Browse the repository at this point in the history
Installation of header files on Unix systems
  • Loading branch information
Wenzel Jakob committed Nov 24, 2015
2 parents b56e4a6 + dcb9ba6 commit 5fee147
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,19 @@ include_directories(${PYTHON_INCLUDE_DIR})
# Include path for pybind11 header files
include_directories(include)

# Create the binding library
add_library(example SHARED
set(PYBIND11_HEADERS
include/pybind11/cast.h
include/pybind11/common.h
include/pybind11/operators.h
include/pybind11/pybind11.h
include/pybind11/pytypes.h
include/pybind11/typeid.h
include/pybind11/numpy.h
)

# Create the binding library
add_library(example SHARED
${PYBIND11_HEADERS}
example/example.cpp
example/example1.cpp
example/example2.cpp
Expand Down Expand Up @@ -147,3 +151,8 @@ set(RUN_TEST ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/example/run_test.p
foreach(i RANGE 1 12)
add_test(NAME example${i} COMMAND ${RUN_TEST} example${i})
endforeach()

if (UNIX)
install(FILES ${PYBIND11_HEADERS} DESTINATION include/pybind11)
endif()

0 comments on commit 5fee147

Please sign in to comment.