-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
26 lines (22 loc) · 1.29 KB
/
CMakeLists.txt
File metadata and controls
26 lines (22 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
project( cvMat_pybind )
cmake_minimum_required(VERSION 3.15)
set (CMAKE_CXX_STANDARD 11)
set(PYBIND11_CPP_STANDARD -std=c++11)
add_subdirectory(pybind11)
# =============================================================================
# specify here which python interpreter you want to compile this module for
# =============================================================================
# set(PYTHON_EXECUTABLE "~/miniconda3/bin/python3")
# =============================================================================
# Define a precompiler macro
# =============================================================================
# add_compile_definitions(BUILDING_PYTHON_MODULE)
# =============================================================================
# Specify the sources file that will be compiled in your python module
# =============================================================================
# pybind11_add_module(<target name>, <pybind code>, <source 1>, <source 2>, ...)
pybind11_add_module(lib_example src/pybind_def.cpp src/mylib.cpp)
# =============================================================================
# Link an external library as usual
# =============================================================================
# target_link_libraries(lib_example PRIVATE ${THE_LIBRARY})