File tree Expand file tree Collapse file tree 2 files changed +5
-12
lines changed
examples/simple-embedding/src Expand file tree Collapse file tree 2 files changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,9 @@ project(monilog CXX)
11
11
set (CMAKE_VERBOSE_MAKEFILE FALSE )
12
12
set (PYBIND11_PYTHON_VERSION 3.8)
13
13
14
- find_package (pybind11 REQUIRED)
15
14
find_package (Python COMPONENTS Interpreter Development REQUIRED)
15
+ set (pybind11_DIR "${Python_SITELIB} /pybind11/share/cmake/pybind11" )
16
+ find_package (pybind11 REQUIRED)
16
17
include_directories (${pybind11_INCLUDE_DIRS} ${Python_SITELIB} /monilog/include )
17
18
18
19
# EXECUTABLE simpleembedding
Original file line number Diff line number Diff line change @@ -11,24 +11,16 @@ set(CMAKE_CXX_FLAGS "-Wall -Wextra -O3")
11
11
project (monilog CXX)
12
12
set (CMAKE_VERBOSE_MAKEFILE TRUE )
13
13
14
- # CHECK CXX VERSION: must be done after the project() (CMAKE_CXX_COMPILER_ID not defined before)
15
- if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
16
- if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.1.0" )
17
- message (FATAL_ERROR "GCC minimum required version is 9.1.0. Please upgrade." )
18
- endif ()
19
- elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
20
- if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0.0" )
21
- message (FATAL_ERROR "Clang minimum required version is 9.0.0. Please upgrade." )
22
- endif ()
23
- endif ()
24
-
25
14
set (PYBIND11_PYTHON_VERSION 3.8)
15
+ find_package (Python COMPONENTS Interpreter Development REQUIRED)
16
+ set (pybind11_DIR "${Python_SITELIB} /pybind11/share/cmake/pybind11" )
26
17
find_package (pybind11 REQUIRED)
27
18
include_directories (${pybind11_INCLUDE_DIRS} monilog/include )
28
19
29
20
add_library (monilog SHARED MoniLog.cc)
30
21
target_link_libraries (monilog ${PYTHON_LIBRARIES} pybind11::embed)
31
22
23
+
32
24
# Python extension
33
25
pybind11_add_module(_monilog monilog_module.cc)
34
26
set_target_properties (_monilog PROPERTIES
You can’t perform that action at this time.
0 commit comments