File tree 6 files changed +16
-26
lines changed
6 files changed +16
-26
lines changed Original file line number Diff line number Diff line change 1
1
# Copyright 2013-2020 the openage authors. See copying.md for legal info.
2
2
3
- cmake_minimum_required (VERSION 3.12 )
3
+ cmake_minimum_required (VERSION 3.16 )
4
4
5
- # required for FindPython3.cmake
5
+ # finding numpy with the findpython3 module
6
6
# >3.8 required for CMAKE_CXX_STANDARD for C++17
7
7
8
8
# main build configuration file
Original file line number Diff line number Diff line change 1
- # Copyright 2015-2018 the openage authors. See copying.md for legal info.
1
+ # Copyright 2015-2020 the openage authors. See copying.md for legal info.
2
2
3
3
# finds the python interpreter, install destination and extension flags.
4
4
5
5
# the Python version number requirement is in modules/FindPython_test.cpp
6
6
find_package (Python ${PYTHON_MIN_VERSION} REQUIRED)
7
7
find_package (Cython ${CYTHON_MIN_VERSION} REQUIRED)
8
- find_package (Numpy REQUIRED)
9
8
10
9
py_get_config_var(EXT_SUFFIX PYEXT_SUFFIX)
11
10
12
11
# This is the only useful thing after cleaning up what python suggests
13
- set (PYEXT_CXXFLAGS "-fwrapv" )
12
+ if (NOT "${CMAKE_CXX_COMPILER_ID} " STREQUAL "MSVC" )
13
+ set (PYEXT_CXXFLAGS "-fwrapv" )
14
+ endif ()
14
15
15
16
if ("${CMAKE_CXX_COMPILER_ID} " STREQUAL "GNU" )
16
17
# suppress #warning about deprecated numpy api
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ endif()
33
33
set (Python3_FIND_REGISTRY "NEVER" )
34
34
35
35
# use cmake's FindPython3 to locate library and interpreter
36
- find_package (Python3 ${PYTHON_MIN_VERSION} COMPONENTS Interpreter Development)
36
+ find_package (Python3 ${PYTHON_MIN_VERSION} COMPONENTS Interpreter Development NumPy )
37
37
38
38
39
39
# python version string to cpython api test in modules/FindPython_test.cpp
@@ -65,6 +65,11 @@ elseif(PYTHON_TEST_RESULT)
65
65
set (PYTHON_INCLUDE_DIRS ${Python3_INCLUDE_DIRS} CACHE PATH "Location of the Python include dir" FORCE)
66
66
set (PYTHONLIBS_VERSION_STRING ${Python3_VERSION} )
67
67
68
+ # Numpy.cmake vars <= Python3.cmake vars
69
+ set (NUMPY_FOUND ${Python3_NumPy_FOUND} )
70
+ set (NUMPY_VERSION ${Python3_NumPy_VERSION} )
71
+ set (NUMPY_INCLUDE_DIR ${Python3_NumPy_INCLUDE_DIRS} CACHE STRING "Linker invocation for the NumPy library" FORCE)
72
+
68
73
include (FindPackageHandleStandardArgs)
69
74
find_package_handle_standard_args(Python REQUIRED_VARS PYTHON PYTHON_INCLUDE_DIRS PYTHON_LIBRARIES)
70
75
endif ()
Original file line number Diff line number Diff line change 1
- # Copyright 2014-2019 the openage authors. See copying.md for legal info.
1
+ # Copyright 2014-2020 the openage authors. See copying.md for legal info.
2
2
3
3
# provides macros for defining python extension modules and pxdgen sources.
4
4
# and a 'finalize' function that must be called in the end.
@@ -54,7 +54,7 @@ function(add_cython_modules)
54
54
# test.pyx is compiled to a shared library linked against PYEXT_LINK_LIBRARY
55
55
# __main__.pyx is compiled to a executable with embedded python interpreter,
56
56
# linked against libpython and PYEXT_LINK_LIBRARY.
57
- # foo/bar.pyx is compiled to a executable with embedded pytthon interpreter,
57
+ # foo/bar.pyx is compiled to a executable with embedded python interpreter,
58
58
# linked only against libpython.
59
59
# foo/test.pyx is compiled to a shared library linked against nothing, and will
60
60
# not be installed.
@@ -196,7 +196,7 @@ function(add_pxds)
196
196
endif ()
197
197
198
198
if (NOT "${source} " MATCHES ".*\\ .px[id]$" )
199
- message (FATAL_ERROR "non-pxd/pxi file given to add_pyd : ${source} " )
199
+ message (FATAL_ERROR "non-pxd/pxi file given to add_pxds : ${source} " )
200
200
endif ()
201
201
202
202
set_property (GLOBAL APPEND PROPERTY SFT_PXD_FILES "${source} " )
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ Dependency list:
30
30
C gcc >=7 or clang >=5
31
31
CRA python >=3.6
32
32
C cython >=0.25
33
- C cmake >=3.12
33
+ C cmake >=3.16
34
34
A numpy
35
35
A python imaging library (PIL) -> pillow
36
36
CR opengl >=3.3
You can’t perform that action at this time.
0 commit comments