Skip to content

Commit 12ac7f1

Browse files
committed
CMake: fix for python 2 and python include dirs
1 parent de1f0ec commit 12ac7f1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,10 @@ modernize_target_link_libraries(
217217
SCOPE
218218
PUBLIC
219219
TARGETS
220-
Python3::NumPy
220+
Python${PYTHON_VERSION_MAJOR}::NumPy
221221
INCLUDE_DIRS
222-
${NUMPY_INCLUDE_DIRS})
222+
${NUMPY_INCLUDE_DIRS}
223+
${PYTHON_INCLUDE_DIR})
223224
target_include_directories(${PROJECT_NAME} SYSTEM
224225
PRIVATE ${PYTHON_INCLUDE_DIRS})
225226

0 commit comments

Comments
 (0)