cmake(python): Refactor

* Use new Python module
* Use setup.py.in input file (should fix windows error)
This commit is contained in:
Mizux Seiha
2020-05-19 16:58:10 +02:00
parent f384add856
commit 775aec03dd
9 changed files with 97 additions and 107 deletions

View File

@@ -10,7 +10,7 @@ swig_add_library(pywrapknapsack_solver
target_include_directories(pywrapknapsack_solver PRIVATE ${PYTHON_INCLUDE_DIRS})
set_property(TARGET pywrapknapsack_solver PROPERTY SWIG_USE_TARGET_INCLUDE_DIRECTORIES ON)
if(${PYTHON_VERSION_STRING} VERSION_GREATER_EQUAL 3)
if(Python_VERSION VERSION_GREATER_EQUAL 3)
target_compile_definitions(pywrapknapsack_solver PUBLIC "PY3")
endif()