#
# configure python dependencies
#

find_package(Numpy REQUIRED)
find_package(PythonLibs REQUIRED)

include_directories(
    ${NUMPY_INCLUDE_DIRS}
    ${PYTHON_INCLUDE_DIRS}
    )

#
# configure cython
#

find_package(Cython REQUIRED)

include(UseCython)

#
# source
#

install(
    FILES
        cargo_site_defaults.py
    DESTINATION lib
    )

#
# descend
#

add_subdirectory(borg)


#
# configure python dependencies
#

find_package(Numpy REQUIRED)
#find_package(PythonLibs REQUIRED)

execute_process(
    COMMAND
        "python-config"
        "--includes"
    OUTPUT_VARIABLE PYTHON_INCLUDE_DIRS
    #ERROR_VARIABLE NUMPY_FOUND_PATH
    #RESULT_VARIABLE ECHO_NUMPY_PATH_FAILED
    OUTPUT_STRIP_TRAILING_WHITESPACE
    )

message(STATUS "Python include path: ${PYTHON_INCLUDE_DIRS}")

include_directories(
    ${NUMPY_INCLUDE_DIRS}
    #${PYTHON_INCLUDE_DIRS}
    )

set(CMAKE_C_FLAGS         "${CMAKE_C_FLAGS} ${PYTHON_INCLUDE_DIRS}")
set(CMAKE_C_FLAGS_DEBUG   "${CMAKE_C_FLAGS_DEBUG} ${PYTHON_INCLUDE_DIRS}")

#
# configure cython
#

find_package(Cython REQUIRED)

include(UseCython)

#
# source
#

install(
    FILES
        cargo_site_defaults.py
    DESTINATION lib
    )

#
# descend
#

add_subdirectory(borg)


Use python-config to get include path(s).
Use python-config to get include path(s).
