1234567891011121314151617181920212223242526272829 |
- cmake_minimum_required(VERSION 3.10)
- # Set the project name
- project(NumpyCExample LANGUAGES C)
- find_package(PkgConfig)
- pkg_check_modules(PLPlot REQUIRED plplot)
- find_package(plplot REQUIRED)
- find_package(Python3 COMPONENTS Development REQUIRED)
- find_package(Python3 COMPONENTS NumPy REQUIRED)
- include_directories(
- ${Python3_INCLUDE_DIRS}
- ${Python3_NumPy_INCLUDE_DIRS}
- ${PLPlot_INCLUDE_DIRS}
- )
- add_executable(demo2 src/demo2.c)
- # Link against the Python library
- target_link_libraries(
- demo2
- ${Python3_LIBRARIES}
- ${PLPlot_LIBRARIES}
- )
- message(STATUS "PLplot libraries: ${PLPlot_LIBRARIES}")
- message(STATUS "Python libraries: ${Python3_LIBRARIES}")
|